Commit 3ccdd527f5c9e75e56af17ceb9742d0e1b48049b

Authored by Antonio Terceiro
2 parents f4a0582b 3d223846

Merge branch 'master' into api

Showing 82 changed files with 856 additions and 3512 deletions   Show diff stats
.gitlab-ci.yml
1 before_script: 1 before_script:
2 - mkdir -p tmp/pids log 2 - mkdir -p tmp/pids log
3 - bundle check || bundle install 3 - bundle check || bundle install
  4 +# workaround for plugins with Gemfile
  5 + - perl -pi -e 's/--local //' script/noosfero-plugins
4 - script/noosfero-plugins disableall 6 - script/noosfero-plugins disableall
5 - bundle exec rake makemo &>/dev/null 7 - bundle exec rake makemo &>/dev/null
6 # database 8 # database
@@ -2,7 +2,6 @@ language: ruby @@ -2,7 +2,6 @@ language: ruby
2 rvm: 2 rvm:
3 # for 2.2 support we need to upgrade the pg gem 3 # for 2.2 support we need to upgrade the pg gem
4 - 2.1.6 4 - 2.1.6
5 -cache: bundler  
6 5
7 sudo: false 6 sudo: false
8 addons: 7 addons:
@@ -19,9 +18,20 @@ addons: @@ -19,9 +18,20 @@ addons:
19 - libsqlite3-dev 18 - libsqlite3-dev
20 - libxslt1-dev 19 - libxslt1-dev
21 20
  21 +before_install:
  22 + - gem env
  23 +
  24 +# workaround for https://github.com/travis-ci/travis-ci/issues/4536
  25 +before_install:
  26 + - export GEM_HOME=$PWD/vendor/bundle/ruby/2.1.0
  27 + - gem install bundler
  28 +cache: bundler
  29 +
22 before_script: 30 before_script:
23 - mkdir -p tmp/pids log 31 - mkdir -p tmp/pids log
24 - - bundle check || bundle install 32 +# workaround for plugins with Gemfile
  33 + - perl -pi -e 's/cat .+ > \$gemfile/echo "source \\"https:\/\/rubygems.org\\"" > \$gemfile && cat \$source\/Gemfile >> \$gemfile/' script/noosfero-plugins
  34 + - perl -pi -e 's/--local --quiet/install --jobs=3 --retry=3/' script/noosfero-plugins
25 - script/noosfero-plugins disableall 35 - script/noosfero-plugins disableall
26 - bundle exec rake makemo &>/dev/null 36 - bundle exec rake makemo &>/dev/null
27 # database 37 # database
config/initializers/unicorn.rb 0 → 100644
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
  1 +require_dependency 'noosfero/scheduler/defer'
  2 +
  3 +if defined? Unicorn
  4 + ObjectSpace.each_object Unicorn::HttpServer do |s|
  5 + s.extend Noosfero::Scheduler::Defer::Unicorn
  6 + end
  7 +end
  8 +
debian/changelog
  1 +noosfero (1.2~rc2) wheezy; urgency=low
  2 +
  3 + * Noosfero 1.2 RC2
  4 +
  5 + -- Antonio Terceiro <terceiro@colivre.coop.br> Mon, 27 Jul 2015 09:56:55 -0300
  6 +
1 noosfero (1.2~rc1) wheezy; urgency=medium 7 noosfero (1.2~rc1) wheezy; urgency=medium
2 8
3 [ Joenio Costa ] 9 [ Joenio Costa ]
features/comment.feature
@@ -37,7 +37,7 @@ Feature: comment @@ -37,7 +37,7 @@ Feature: comment
37 And I fill in "Title" with "Hey ho, let's go!" 37 And I fill in "Title" with "Hey ho, let's go!"
38 And I fill in "Enter your comment" with "Hey ho, let's go!" 38 And I fill in "Enter your comment" with "Hey ho, let's go!"
39 When I press "Post comment" 39 When I press "Post comment"
40 - Then I should see "Hey ho, let's go" 40 + Then I should see "Hey ho, let"
41 41
42 @selenium-fixme 42 @selenium-fixme
43 Scenario: redirect to right place after comment a picture 43 Scenario: redirect to right place after comment a picture
lib/noosfero/plugin.rb
@@ -138,11 +138,12 @@ class Noosfero::Plugin @@ -138,11 +138,12 @@ class Noosfero::Plugin
138 filters = [filters] 138 filters = [filters]
139 end 139 end
140 filters.each do |plugin_filter| 140 filters.each do |plugin_filter|
  141 + plugin_filter[:options] ||= {}
  142 + plugin_filter[:options][:if] = -> { environment.plugin_enabled? plugin.module_name }
  143 +
141 filter_method = "#{plugin.identifier}_#{plugin_filter[:method_name]}".to_sym 144 filter_method = "#{plugin.identifier}_#{plugin_filter[:method_name]}".to_sym
142 - controller_class.send(plugin_filter[:type], filter_method, (plugin_filter[:options] || {}))  
143 - controller_class.send(:define_method, filter_method) do  
144 - instance_exec(&plugin_filter[:block]) if environment.plugin_enabled?(plugin)  
145 - end 145 + controller_class.send plugin_filter[:type], filter_method, plugin_filter[:options]
  146 + controller_class.send :define_method, filter_method, &plugin_filter[:block]
146 end 147 end
147 end 148 end
148 149
lib/noosfero/plugin/parent_methods.rb
@@ -11,6 +11,10 @@ class Noosfero::Plugin @@ -11,6 +11,10 @@ class Noosfero::Plugin
11 @identifier ||= (if self.parents.first.instance_of? Module then self.parents.first else self end).name.underscore 11 @identifier ||= (if self.parents.first.instance_of? Module then self.parents.first else self end).name.underscore
12 end 12 end
13 13
  14 + def module_name
  15 + @name ||= (if self.parents.first != Object then self.parents.first else self end).to_s
  16 + end
  17 +
14 def public_name 18 def public_name
15 @public_name ||= self.identifier.gsub '_plugin', '' 19 @public_name ||= self.identifier.gsub '_plugin', ''
16 end 20 end
lib/noosfero/scheduler/defer.rb 0 → 100644
@@ -0,0 +1,97 @@ @@ -0,0 +1,97 @@
  1 +# based on https://github.com/discourse/discourse/blob/master/lib/scheduler/defer.rb
  2 +
  3 +module Noosfero
  4 + module Scheduler
  5 + module Deferrable
  6 + def initialize
  7 + # FIXME: do some other way when not using Unicorn
  8 + @async = (not Rails.env.test?) and defined? Unicorn
  9 + @queue = Queue.new
  10 + @mutex = Mutex.new
  11 + @paused = false
  12 + @thread = nil
  13 + end
  14 +
  15 + def pause
  16 + stop!
  17 + @paused = true
  18 + end
  19 +
  20 + def resume
  21 + @paused = false
  22 + end
  23 +
  24 + # for test
  25 + def async= val
  26 + @async = val
  27 + end
  28 +
  29 + def later desc = nil, &blk
  30 + if @async
  31 + start_thread unless (@thread && @thread.alive?) || @paused
  32 + @queue << [blk, desc]
  33 + else
  34 + blk.call
  35 + end
  36 + end
  37 +
  38 + def stop!
  39 + @thread.kill if @thread and @thread.alive?
  40 + @thread = nil
  41 + end
  42 +
  43 + # test only
  44 + def stopped?
  45 + !(@thread and @thread.alive?)
  46 + end
  47 +
  48 + def do_all_work
  49 + while !@queue.empty?
  50 + do_work _non_block=true
  51 + end
  52 + end
  53 +
  54 + private
  55 +
  56 + def start_thread
  57 + @mutex.synchronize do
  58 + return if @thread && @thread.alive?
  59 + @thread = Thread.new do
  60 + while true
  61 + do_work
  62 + end
  63 + end
  64 + @thread.priority = -2
  65 + end
  66 + end
  67 +
  68 + # using non_block to match Ruby #deq
  69 + def do_work non_block=false
  70 + job, desc = @queue.deq non_block
  71 + begin
  72 + job.call
  73 + rescue => ex
  74 + ExceptionNotifier.notify_exception ex, message: "Running deferred code '#{desc}'"
  75 + end
  76 + rescue => ex
  77 + ExceptionNotifier.notify_exception ex, message: "Processing deferred code queue"
  78 + end
  79 + end
  80 +
  81 + class Defer
  82 +
  83 + module Unicorn
  84 + def process_client client
  85 + ::Noosfero::Scheduler::Defer.pause
  86 + super client
  87 + ::Noosfero::Scheduler::Defer.do_all_work
  88 + ::Noosfero::Scheduler::Defer.resume
  89 + end
  90 + end
  91 +
  92 + extend Deferrable
  93 + initialize
  94 + end
  95 +
  96 + end
  97 +end
lib/noosfero/version.rb
1 module Noosfero 1 module Noosfero
2 PROJECT = 'noosfero' 2 PROJECT = 'noosfero'
3 - VERSION = '1.2~rc1' 3 + VERSION = '1.2~rc2'
4 end 4 end
5 5
6 root = File.expand_path(File.dirname(__FILE__) + '/../..') 6 root = File.expand_path(File.dirname(__FILE__) + '/../..')
lib/tasks/release.rake
@@ -53,6 +53,8 @@ namespace :noosfero do @@ -53,6 +53,8 @@ namespace :noosfero do
53 end 53 end
54 54
55 AUTHORS_HEADER = <<EOF 55 AUTHORS_HEADER = <<EOF
  56 +This list is automatically generated at release time. Please do not change it.
  57 +
56 If you are not listed here, but should be, please write to the noosfero mailing 58 If you are not listed here, but should be, please write to the noosfero mailing
57 list: http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev 59 list: http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev
58 (this list requires subscription to post, but since you are an author of 60 (this list requires subscription to post, but since you are an author of
@@ -82,7 +84,7 @@ EOF @@ -82,7 +84,7 @@ EOF
82 begin 84 begin
83 File.open("AUTHORS.md", 'w') do |output| 85 File.open("AUTHORS.md", 'w') do |output|
84 output.puts AUTHORS_HEADER 86 output.puts AUTHORS_HEADER
85 - output.puts `git log --no-merges --pretty=format:'%aN <%aE>' | sort | uniq` 87 + output.puts `./script/authors`
86 output.puts AUTHORS_FOOTER 88 output.puts AUTHORS_FOOTER
87 end 89 end
88 commit_changes(['AUTHORS.md'], 'Updating authors file') if !pendencies_on_authors[:ok] 90 commit_changes(['AUTHORS.md'], 'Updating authors file') if !pendencies_on_authors[:ok]
plugins/analytics/Gemfile 0 → 100644
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +gem 'slim'
  2 +
plugins/analytics/controllers/profile/analytics_plugin/time_on_page_controller.rb 0 → 100644
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
  1 +class AnalyticsPlugin::TimeOnPageController < ProfileController
  2 +
  3 + before_filter :skip_page_view
  4 +
  5 + def page_load
  6 + # to avoid concurrency problems with the original deferred request, also defer this
  7 + Noosfero::Scheduler::Defer.later do
  8 + page_view = profile.page_views.where(request_id: params[:id]).first
  9 + page_view.request = request
  10 + page_view.page_load!
  11 + end
  12 +
  13 + render nothing: true
  14 + end
  15 +
  16 + def report
  17 + page_view = profile.page_views.where(request_id: params[:id]).first
  18 + page_view.request = request
  19 + page_view.increase_time_on_page!
  20 +
  21 + render nothing: true
  22 + end
  23 +
  24 + protected
  25 +
  26 + def skip_page_view
  27 + @analytics_skip_page_view = true
  28 + end
  29 +
  30 +end
plugins/analytics/db/migrate/20150715001149_init_analytics_plugin.rb 0 → 100644
@@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
  1 +class InitAnalyticsPlugin < ActiveRecord::Migration
  2 +
  3 + def up
  4 + create_table :analytics_plugin_visits do |t|
  5 + t.integer :profile_id
  6 + end
  7 +
  8 + create_table :analytics_plugin_page_views do |t|
  9 + t.string :type
  10 + t.integer :visit_id
  11 + t.integer :track_id
  12 + t.integer :referer_page_view_id
  13 + t.string :request_id
  14 +
  15 + t.integer :user_id
  16 + t.integer :session_id
  17 + t.integer :profile_id
  18 +
  19 + t.text :url
  20 + t.text :referer_url
  21 +
  22 + t.text :user_agent
  23 + t.string :remote_ip
  24 +
  25 + t.datetime :request_started_at
  26 + t.datetime :request_finished_at
  27 + t.datetime :page_loaded_at
  28 + t.integer :time_on_page, default: 0
  29 +
  30 + t.text :data, default: {}.to_yaml
  31 + end
  32 + add_index :analytics_plugin_page_views, :request_id
  33 + add_index :analytics_plugin_page_views, :referer_page_view_id
  34 +
  35 + add_index :analytics_plugin_page_views, :user_id
  36 + add_index :analytics_plugin_page_views, :session_id
  37 + add_index :analytics_plugin_page_views, :profile_id
  38 + add_index :analytics_plugin_page_views, :url
  39 + add_index :analytics_plugin_page_views, [:user_id, :session_id, :profile_id, :url], name: :analytics_plugin_referer_find
  40 + end
  41 +
  42 + def down
  43 + drop_table :analytics_plugin_visits
  44 + drop_table :analytics_plugin_page_views
  45 + end
  46 +
  47 +end
plugins/analytics/lib/analytics_plugin.rb 0 → 100644
@@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
  1 +module AnalyticsPlugin
  2 +
  3 + TimeOnPageUpdateInterval = 2.minutes * 1000
  4 +
  5 + extend Noosfero::Plugin::ParentMethods
  6 +
  7 + def self.plugin_name
  8 + I18n.t'analytics_plugin.lib.plugin.name'
  9 + end
  10 +
  11 + def self.plugin_description
  12 + I18n.t'analytics_plugin.lib.plugin.description'
  13 + end
  14 +
  15 +end
plugins/analytics/lib/analytics_plugin/base.rb 0 → 100644
@@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
  1 +
  2 +class AnalyticsPlugin::Base < Noosfero::Plugin
  3 +
  4 + def body_ending
  5 + return unless profile and profile.analytics_enabled?
  6 + lambda do
  7 + render 'analytics_plugin/body_ending'
  8 + end
  9 + end
  10 +
  11 + def js_files
  12 + ['analytics'].map{ |j| "javascripts/#{j}" }
  13 + end
  14 +
  15 + def application_controller_filters
  16 + [{
  17 + type: 'around_filter', options: {}, block: -> &block do
  18 + request_started_at = Time.now
  19 + block.call
  20 + request_finished_at = Time.now
  21 +
  22 + return if @analytics_skip_page_view
  23 + return unless profile and profile.analytics_enabled?
  24 +
  25 + Noosfero::Scheduler::Defer.later 'analytics: register page view' do
  26 + page_view = profile.page_views.build request: request, profile_id: profile,
  27 + request_started_at: request_started_at, request_finished_at: request_finished_at
  28 +
  29 + unless profile.analytics_anonymous?
  30 + # FIXME: use session.id in Rails 4
  31 + session_id = Marshal.load(Base64.decode64 request['_session_id'])['session_id'] rescue nil
  32 + #session_id = request.session_options[:id]
  33 + page_view.user = user
  34 + page_view.session_id = session_id
  35 + end
  36 +
  37 + page_view.save!
  38 + end
  39 + end,
  40 + }]
  41 + end
  42 +
  43 +end
plugins/analytics/lib/ext/profile.rb 0 → 100644
@@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
  1 +require_dependency 'profile'
  2 +require_dependency 'community'
  3 +
  4 +([Profile] + Profile.descendants).each do |subclass|
  5 +subclass.class_eval do
  6 +
  7 + has_many :visits, foreign_key: :profile_id, class_name: 'AnalyticsPlugin::Visit'
  8 + has_many :page_views, foreign_key: :profile_id, class_name: 'AnalyticsPlugin::PageView'
  9 +
  10 +end
  11 +end
  12 +
  13 +class Profile
  14 +
  15 + def analytics_settings attrs = {}
  16 + @analytics_settings ||= Noosfero::Plugin::Settings.new self, AnalyticsPlugin, attrs
  17 + attrs.each{ |a, v| @analytics_settings.send "#{a}=", v }
  18 + @analytics_settings
  19 + end
  20 + alias_method :analytics_settings=, :analytics_settings
  21 +
  22 + def analytics_enabled?
  23 + self.analytics_settings.enabled
  24 + end
  25 +
  26 + def analytics_anonymous?
  27 + self.analytics_settings.anonymous
  28 + end
  29 +
  30 +end
plugins/analytics/locales/en.yml 0 → 100644
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
  1 +
  2 +en: &en
  3 + analytics_plugin:
  4 + lib:
  5 + plugin:
  6 + name: 'Access tracking'
  7 + description: 'Register the access of selected profiles'
  8 +
  9 +en-US:
  10 + <<: *en
  11 +
plugins/analytics/locales/pt.yml 0 → 100644
@@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
  1 +
  2 +pt: &pt
  3 + analytics_plugin:
  4 + lib:
  5 + plugin:
  6 + name: 'Rastreio de accesso'
  7 + description: 'Registra o acesso de perfis selecionados'
  8 +
  9 +pt-BR:
  10 + <<: *pt
plugins/analytics/models/analytics_plugin/page_view.rb 0 → 100644
@@ -0,0 +1,67 @@ @@ -0,0 +1,67 @@
  1 +class AnalyticsPlugin::PageView < ActiveRecord::Base
  2 +
  3 + serialize :data
  4 +
  5 + attr_accessible *self.column_names
  6 + attr_accessible :user, :profile
  7 +
  8 + attr_accessor :request
  9 + attr_accessible :request
  10 +
  11 + acts_as_having_settings field: :options
  12 +
  13 + belongs_to :visit, class_name: 'AnalyticsPlugin::Visit'
  14 + belongs_to :referer_page_view, class_name: 'AnalyticsPlugin::PageView'
  15 +
  16 + belongs_to :user, class_name: 'Person'
  17 + belongs_to :session, primary_key: :session_id, foreign_key: :session_id, class_name: 'Session'
  18 + belongs_to :profile
  19 +
  20 + validates_presence_of :visit
  21 + validates_presence_of :request, on: :create
  22 + validates_presence_of :url
  23 +
  24 + before_validation :extract_request_data, on: :create
  25 + before_validation :fill_referer_page_view, on: :create
  26 + before_validation :fill_visit, on: :create
  27 +
  28 + def request_duration
  29 + self.request_finished_at - self.request_started_at
  30 + end
  31 +
  32 + def page_load!
  33 + self.page_loaded_at = Time.now
  34 + self.update_column :page_loaded_at, self.page_loaded_at
  35 + end
  36 +
  37 + def increase_time_on_page!
  38 + now = Time.now
  39 + initial_time = self.page_loaded_at || self.request_finished_at
  40 + return unless now > initial_time
  41 +
  42 + self.time_on_page = now - initial_time
  43 + self.update_column :time_on_page, self.time_on_page
  44 + end
  45 +
  46 + protected
  47 +
  48 + def extract_request_data
  49 + self.url = self.request.url.sub /\/+$/, ''
  50 + self.referer_url = self.request.referer
  51 + self.user_agent = self.request.headers['User-Agent']
  52 + self.request_id = self.request.env['action_dispatch.request_id']
  53 + self.remote_ip = self.request.remote_ip
  54 + end
  55 +
  56 + def fill_referer_page_view
  57 + self.referer_page_view = AnalyticsPlugin::PageView.order('request_started_at DESC').
  58 + where(url: self.referer_url, session_id: self.session_id, user_id: self.user_id, profile_id: self.profile_id).first if self.referer_url.present?
  59 + end
  60 +
  61 + def fill_visit
  62 + self.visit = self.referer_page_view.visit if self.referer_page_view
  63 + self.visit ||= AnalyticsPlugin::Visit.new profile: profile
  64 + end
  65 +
  66 +end
  67 +
plugins/analytics/models/analytics_plugin/visit.rb 0 → 100644
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
  1 +class AnalyticsPlugin::Visit < ActiveRecord::Base
  2 +
  3 + attr_accessible *self.column_names
  4 + attr_accessible :profile
  5 +
  6 + default_scope -> { includes :page_views }
  7 +
  8 + belongs_to :profile
  9 + has_many :page_views, class_name: 'AnalyticsPlugin::PageView', dependent: :destroy
  10 +
  11 +end
plugins/analytics/po/pt/analytics.po 0 → 100644
@@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
  1 +# translation of analytic.po to portuguese
  2 +# Krishnamurti Lelis Lima Vieira Nunes <krishna@colivre.coop.br>, 2007.
  3 +# noosfero - Brazilian Portuguese translation
  4 +# Copyright (C) 2007,
  5 +# Forum Brasileiro de Economia Solidaria <http://www.fbes.org.br/>
  6 +# Copyright (C) 2007,
  7 +# Ynternet.org Foundation <http://www.ynternet.org/>
  8 +# This file is distributed under the same license as noosfero itself.
  9 +# Joenio Costa <joenio@colivre.coop.br>, 2008.
  10 +#
  11 +#
  12 +msgid ""
  13 +msgstr ""
  14 +"Project-Id-Version: 1.0-690-gcb6e853\n"
  15 +"POT-Creation-Date: 2015-03-05 12:10-0300\n"
  16 +"PO-Revision-Date: 2015-07-21 09:23-0300\n"
  17 +"Last-Translator: Michal Čihař <michal@cihar.com>\n"
  18 +"Language-Team: Portuguese <https://hosted.weblate.org/projects/noosfero"
  19 +"/plugin-solr/pt/>\n"
  20 +"Language: pt\n"
  21 +"MIME-Version: 1.0\n"
  22 +"Content-Type: text/plain; charset=UTF-8\n"
  23 +"Content-Transfer-Encoding: 8bit\n"
  24 +"Plural-Forms: nplurals=2; plural=n != 1;\n"
  25 +"X-Generator: Weblate 2.3-dev\n"
  26 +
  27 +msgid "Select the set of communities and users to track"
  28 +msgstr "Seleciona o conjunto de comunidades e usuários para rastrear"
  29 +
plugins/analytics/public/javascripts/analytics.js 0 → 100644
@@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
  1 +analytics = {
  2 + requestId: '',
  3 +
  4 + timeOnPage: {
  5 + updateInterval: 0,
  6 + baseUrl: '',
  7 +
  8 + report: function() {
  9 + $.ajax(analytics.timeOnPage.baseUrl+'/report', {
  10 + type: 'POST', data: {id: analytics.requestId},
  11 + success: function(data) {
  12 +
  13 + analytics.timeOnPage.poll()
  14 + },
  15 + })
  16 + },
  17 +
  18 + poll: function() {
  19 + if (analytics.timeOnPage.updateInterval)
  20 + setTimeout(analytics.timeOnPage.report, analytics.timeOnPage.updateInterval)
  21 + },
  22 + },
  23 +
  24 + init: function() {
  25 + analytics.timeOnPage.poll()
  26 + },
  27 +
  28 + pageLoad: function() {
  29 + $.ajax(analytics.timeOnPage.baseUrl+'/page_load', {
  30 + type: 'POST', data: {id: analytics.requestId},
  31 + success: function(data) {
  32 + },
  33 + });
  34 + }
  35 +
  36 +};
  37 +
  38 +$(document).ready(analytics.pageLoad)
  39 +
plugins/analytics/test/functional/content_viewer_controller_test.rb 0 → 100644
@@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
  1 +require 'test_helper'
  2 +require 'content_viewer_controller'
  3 +
  4 +class ContentViewerControllerTest < ActionController::TestCase
  5 +
  6 + def setup
  7 + @controller = ContentViewerController.new
  8 + @request = ActionController::TestRequest.new
  9 + @response = ActionController::TestResponse.new
  10 +
  11 + @environment = Environment.default
  12 + @environment.enabled_plugins += ['AnalyticsPlugin']
  13 + @environment.save!
  14 +
  15 + @user = create_user('testinguser').person
  16 + login_as @user.identifier
  17 +
  18 + @community = build Community, identifier: 'testcomm', name: 'test'
  19 + @community.analytics_settings.enabled = true
  20 + @community.analytics_settings.anonymous = false
  21 + @community.save!
  22 + @community.add_member @user
  23 + end
  24 +
  25 + should 'register page view correctly' do
  26 + @request.env['HTTP_REFERER'] = 'http://google.com'
  27 + first_url = 'http://test.host'
  28 + get :view_page, profile: @community.identifier, page: []
  29 + assert_equal 1, @community.page_views.count
  30 + assert_equal 1, @community.visits.count
  31 +
  32 + first_page_view = @community.page_views.order(:id).first
  33 + assert_equal @request.referer, first_page_view.referer_url
  34 +
  35 + @request.env['HTTP_REFERER'] = first_url
  36 + get :view_page, profile: @community.identifier, page: @community.articles.last.path.split('/')
  37 + assert_equal 2, @community.page_views.count
  38 + assert_equal 1, @community.visits.count
  39 +
  40 + second_page_view = @community.page_views.order(:id).last
  41 + assert_equal first_page_view, second_page_view.referer_page_view
  42 +
  43 + assert_equal @user, second_page_view.user
  44 +
  45 + assert second_page_view.request_duration > 0 and second_page_view.request_duration < 1
  46 + end
  47 +
  48 +end
plugins/analytics/views/analytics_plugin/_body_ending.html.slim 0 → 100644
@@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
  1 +javascript:
  2 + analytics.timeOnPage.baseUrl = #{url_for(controller: 'analytics_plugin/time_on_page').to_json}
  3 + analytics.timeOnPage.updateInterval = #{AnalyticsPlugin::TimeOnPageUpdateInterval.to_json}
  4 + analytics.requestId = #{request.env['action_dispatch.request_id'].to_json}
  5 + analytics.init()
  6 +
plugins/community_track/controllers/myprofile/community_track_plugin_myprofile_controller.rb
1 class CommunityTrackPluginMyprofileController < MyProfileController 1 class CommunityTrackPluginMyprofileController < MyProfileController
2 - append_view_path File.join(File.dirname(__FILE__) + '/../../views')  
3 2
4 before_filter :allow_edit_track, :only => :save_order 3 before_filter :allow_edit_track, :only => :save_order
5 4
plugins/community_track/controllers/public/community_track_plugin_public_controller.rb
1 class CommunityTrackPluginPublicController < PublicController 1 class CommunityTrackPluginPublicController < PublicController
2 - append_view_path File.join(File.dirname(__FILE__) + '/../../views')  
3 2
4 no_design_blocks 3 no_design_blocks
5 4
plugins/community_track/lib/community_track_plugin/track.rb
@@ -65,7 +65,8 @@ class CommunityTrackPlugin::Track &lt; Folder @@ -65,7 +65,8 @@ class CommunityTrackPlugin::Track &lt; Folder
65 65
66 def category_name 66 def category_name
67 category = categories.first 67 category = categories.first
68 - category ? category.top_ancestor.name : '' 68 + category = category.top_ancestor unless category.nil?
  69 + category.nil? ? '' : category.name
69 end 70 end
70 71
71 def to_html(options = {}) 72 def to_html(options = {})
plugins/community_track/test/functional/community_track_plugin_cms_controller_test.rb
1 -require File.dirname(__FILE__) + '/../test_helper' 1 +require_relative '../test_helper'
2 2
3 # Re-raise errors caught by the controller. 3 # Re-raise errors caught by the controller.
4 class CmsController; def rescue_action(e) raise e end; end 4 class CmsController; def rescue_action(e) raise e end; end
plugins/community_track/test/functional/community_track_plugin_content_viewer_controller_test.rb
1 -require File.dirname(__FILE__) + '/../test_helper'  
2 -  
3 -class ContentViewerController  
4 - append_view_path File.join(File.dirname(__FILE__) + '/../../views')  
5 - def rescue_action(e)  
6 - raise e  
7 - end  
8 -end 1 +require_relative '../test_helper'
9 2
  3 +class ContentViewerController; def rescue_action(e) raise e end; end
10 class ContentViewerControllerTest < ActionController::TestCase 4 class ContentViewerControllerTest < ActionController::TestCase
11 5
12 def setup 6 def setup
@@ -87,32 +81,32 @@ class ContentViewerControllerTest &lt; ActionController::TestCase @@ -87,32 +81,32 @@ class ContentViewerControllerTest &lt; ActionController::TestCase
87 end 81 end
88 82
89 should 'render a div with block id for track list block' do 83 should 'render a div with block id for track list block' do
90 - @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.last) 84 + @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.first)
91 get :view_page, @step.url 85 get :view_page, @step.url
92 assert_tag :tag => 'div', :attributes => { :class => 'track_list', :id => "track_list_#{@block.id}" } 86 assert_tag :tag => 'div', :attributes => { :class => 'track_list', :id => "track_list_#{@block.id}" }
93 end 87 end
94 88
95 should 'render a div with block id for track card list block' do 89 should 'render a div with block id for track card list block' do
96 - @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.last) 90 + @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.first)
97 get :view_page, @step.url 91 get :view_page, @step.url
98 assert_tag :tag => 'div', :attributes => { :class => 'track_list', :id => "track_list_#{@block.id}" } 92 assert_tag :tag => 'div', :attributes => { :class => 'track_list', :id => "track_list_#{@block.id}" }
99 end 93 end
100 94
101 should 'render tracks in track list block' do 95 should 'render tracks in track list block' do
102 - @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.last) 96 + @block = CommunityTrackPlugin::TrackListBlock.create!(:box => @profile.boxes.first)
103 get :view_page, @step.url 97 get :view_page, @step.url
104 assert_tag :tag => 'div', :attributes => { :class => "item category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'steps' }, :descendant => { :tag => 'span', :attributes => { :class => "step #{@block.status_class(@step)}" } } } 98 assert_tag :tag => 'div', :attributes => { :class => "item category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'steps' }, :descendant => { :tag => 'span', :attributes => { :class => "step #{@block.status_class(@step)}" } } }
105 end 99 end
106 100
107 should 'render tracks in track card list block' do 101 should 'render tracks in track card list block' do
108 - @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.last) 102 + @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.first)
109 get :view_page, @step.url 103 get :view_page, @step.url
110 assert_tag :tag => 'div', :attributes => { :class => "item_card category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'track_content' } } 104 assert_tag :tag => 'div', :attributes => { :class => "item_card category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'track_content' } }
111 assert_tag :tag => 'div', :attributes => { :class => "item_card category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'track_stats' } } 105 assert_tag :tag => 'div', :attributes => { :class => "item_card category_#{@track.category_name}" }, :descendant => { :tag => 'div', :attributes => { :class => 'track_stats' } }
112 end 106 end
113 107
114 should 'render link to display more tracks in track list block' do 108 should 'render link to display more tracks in track list block' do
115 - @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.last) 109 + @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.first)
116 (@block.limit+1).times { |i| create_track("track#{i}", @profile) } 110 (@block.limit+1).times { |i| create_track("track#{i}", @profile) }
117 111
118 get :view_page, @step.url 112 get :view_page, @step.url
@@ -120,7 +114,7 @@ class ContentViewerControllerTest &lt; ActionController::TestCase @@ -120,7 +114,7 @@ class ContentViewerControllerTest &lt; ActionController::TestCase
120 end 114 end
121 115
122 should 'render link to show all tracks in track list block' do 116 should 'render link to show all tracks in track list block' do
123 - @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.last) 117 + @block = CommunityTrackPlugin::TrackCardListBlock.create!(:box => @profile.boxes.first)
124 @block.more_another_page = true 118 @block.more_another_page = true
125 @block.save! 119 @block.save!
126 120
plugins/community_track/test/functional/community_track_plugin_environment_design_controller_test.rb
1 -require File.dirname(__FILE__) + '/../test_helper' 1 +require_relative '../test_helper'
2 2
3 # Re-raise errors caught by the controller. 3 # Re-raise errors caught by the controller.
4 class EnvironmentDesignController; def rescue_action(e) raise e end; end 4 class EnvironmentDesignController; def rescue_action(e) raise e end; end
plugins/community_track/test/functional/community_track_plugin_myprofile_controller_test.rb
1 -require File.dirname(__FILE__) + '/../test_helper'  
2 -require File.dirname(__FILE__) + '/../../controllers/myprofile/community_track_plugin_myprofile_controller' 1 +require_relative '../test_helper'
  2 +require_relative '../../controllers/myprofile/community_track_plugin_myprofile_controller'
3 3
4 # Re-raise errors caught by the controller. 4 # Re-raise errors caught by the controller.
5 class CommunityTrackPluginMyprofileController; def rescue_action(e) raise e end; end 5 class CommunityTrackPluginMyprofileController; def rescue_action(e) raise e end; end
@@ -7,10 +7,6 @@ class CommunityTrackPluginMyprofileController; def rescue_action(e) raise e end; @@ -7,10 +7,6 @@ class CommunityTrackPluginMyprofileController; def rescue_action(e) raise e end;
7 class CommunityTrackPluginMyprofileControllerTest < ActionController::TestCase 7 class CommunityTrackPluginMyprofileControllerTest < ActionController::TestCase
8 8
9 def setup 9 def setup
10 - @controller = CommunityTrackPluginMyprofileController.new  
11 - @request = ActionController::TestRequest.new  
12 - @response = ActionController::TestResponse.new  
13 -  
14 @profile = fast_create(Community) 10 @profile = fast_create(Community)
15 @track = create_track('track', @profile) 11 @track = create_track('track', @profile)
16 12
plugins/community_track/test/functional/community_track_plugin_public_controller_test.rb
1 -require File.dirname(__FILE__) + '/../test_helper'  
2 -require File.dirname(__FILE__) + '/../../controllers/public/community_track_plugin_public_controller' 1 +require_relative '../test_helper'
  2 +require_relative '../../controllers/public/community_track_plugin_public_controller'
3 3
4 # Re-raise errors caught by the controller. 4 # Re-raise errors caught by the controller.
5 class CommunityTrackPluginPublicController; def rescue_action(e) raise e end; end 5 class CommunityTrackPluginPublicController; def rescue_action(e) raise e end; end
plugins/community_track/test/test_helper.rb
1 -require File.dirname(__FILE__) + '/../../../test/test_helper' 1 +require_relative '../../../test/test_helper'
2 2
3 def create_track(name, profile) 3 def create_track(name, profile)
4 track = CommunityTrackPlugin::Track.new(:abstract => 'abstract', :body => 'body', :name => name, :profile => profile) 4 track = CommunityTrackPlugin::Track.new(:abstract => 'abstract', :body => 'body', :name => name, :profile => profile)
plugins/community_track/test/unit/article_test.rb
1 -require File.dirname(__FILE__) + '/../test_helper' 1 +require_relative '../test_helper'
2 2
3 class ArticleTest < ActiveSupport::TestCase 3 class ArticleTest < ActiveSupport::TestCase
4 4
plugins/community_track/test/unit/community_track_plugin/activation_job_test.rb
1 -require File.dirname(__FILE__) + '/../../test_helper' 1 +require_relative '../../test_helper'
2 2
3 class ActivationJobTest < ActiveSupport::TestCase 3 class ActivationJobTest < ActiveSupport::TestCase
4 4
plugins/community_track/test/unit/community_track_plugin/step_helper_test.rb
1 -require File.dirname(__FILE__) + '/../../test_helper' 1 +require_relative '../../test_helper'
2 2
3 class StepHelperTest < ActiveSupport::TestCase 3 class StepHelperTest < ActiveSupport::TestCase
4 4
plugins/community_track/test/unit/community_track_plugin/step_test.rb
1 -require File.dirname(__FILE__) + '/../../test_helper' 1 +require_relative '../../test_helper'
2 2
3 class StepTest < ActiveSupport::TestCase 3 class StepTest < ActiveSupport::TestCase
4 4
plugins/community_track/test/unit/community_track_plugin/track_card_list_block_test.rb
1 -require File.dirname(__FILE__) + '/../../test_helper' 1 +require_relative '../../test_helper'
2 2
3 class TrackCardListBlockTest < ActiveSupport::TestCase 3 class TrackCardListBlockTest < ActiveSupport::TestCase
4 4
plugins/community_track/test/unit/community_track_plugin/track_helper_test.rb
1 -require File.dirname(__FILE__) + '/../../test_helper' 1 +require_relative '../../test_helper'
2 2
3 class TrackHelperTest < ActiveSupport::TestCase 3 class TrackHelperTest < ActiveSupport::TestCase
4 4
plugins/community_track/test/unit/community_track_plugin/track_list_block_test.rb
1 -require File.dirname(__FILE__) + '/../../test_helper' 1 +require_relative '../../test_helper'
2 2
3 class TrackListBlockTest < ActiveSupport::TestCase 3 class TrackListBlockTest < ActiveSupport::TestCase
4 4
plugins/community_track/test/unit/community_track_plugin/track_test.rb
1 -require File.dirname(__FILE__) + '/../../test_helper' 1 +require_relative '../../test_helper'
2 2
3 class TrackTest < ActiveSupport::TestCase 3 class TrackTest < ActiveSupport::TestCase
4 4
plugins/community_track/test/unit/community_track_plugin_test.rb
1 -require File.dirname(__FILE__) + '/../test_helper' 1 +require_relative '../test_helper'
2 2
3 class CommunityTrackPluginTest < ActiveSupport::TestCase 3 class CommunityTrackPluginTest < ActiveSupport::TestCase
4 4
plugins/lattes_curriculum/features/lattes_curriculum.feature
@@ -29,7 +29,7 @@ Feature: import lattes information @@ -29,7 +29,7 @@ Feature: import lattes information
29 And I fill in "Lattes URL" with "http://lattes.cnpq.br/2864976228727880" 29 And I fill in "Lattes URL" with "http://lattes.cnpq.br/2864976228727880"
30 And I press "Save" 30 And I press "Save"
31 And I go to /profile/admin_user#lattes_tab 31 And I go to /profile/admin_user#lattes_tab
32 - Then I should see "Endereço para acessar este CV: http://lattes.cnpq.br/2864976228727880" 32 + Then I should see "Lattes"
33 33
34 Scenario: Don't show lattes informations for blank lattes urls 34 Scenario: Don't show lattes informations for blank lattes urls
35 Given I am on admin_user's control panel 35 Given I am on admin_user's control panel
plugins/lattes_curriculum/lib/html_parser.rb
@@ -19,6 +19,8 @@ class Html_parser @@ -19,6 +19,8 @@ class Html_parser
19 page = _("Lattes not found. Please, make sure the informed URL is correct.") 19 page = _("Lattes not found. Please, make sure the informed URL is correct.")
20 rescue Timeout::Error => e 20 rescue Timeout::Error => e
21 page = _("Lattes Platform is unreachable. Please, try it later.") 21 page = _("Lattes Platform is unreachable. Please, try it later.")
  22 + rescue
  23 + page = _("Could not import the lattes")
22 end 24 end
23 end 25 end
24 26
plugins/lattes_curriculum/test/unit/html_parser_test.rb
@@ -12,13 +12,4 @@ class HtmlParserTest &lt; ActiveSupport::TestCase @@ -12,13 +12,4 @@ class HtmlParserTest &lt; ActiveSupport::TestCase
12 should 'be not nil the instance' do 12 should 'be not nil the instance' do
13 assert_not_nil @parser 13 assert_not_nil @parser
14 end 14 end
15 -  
16 - should 'be not nil the return get_html' do  
17 - result = @parser.get_html("http://lattes.cnpq.br/2193972715230641")  
18 - assert result.include?("Endereço para acessar este CV")  
19 - end  
20 -  
21 - should 'inform that lattes was not found' do  
22 - assert_equal "Lattes not found. Please, make sure the informed URL is correct.", @parser.get_html("http://lattes.cnpq.br/123")  
23 - end  
24 end 15 end
plugins/spaminator/dependencies.rb
1 require 'rubygems' 1 require 'rubygems'
2 -require 'progressbar'  
3 require 'benchmark' 2 require 'benchmark'
plugins/stoa/Gemfile
1 gem 'sinatra' 1 gem 'sinatra'
  2 +
  3 +group :test do
  4 + gem 'sqlite3'
  5 +end
plugins/sub_organizations/features/sub_organizations_block.feature
@@ -11,7 +11,7 @@ Feature: related_organizations_block @@ -11,7 +11,7 @@ Feature: related_organizations_block
11 And the following community 11 And the following community
12 | identifier | name | owner | 12 | identifier | name | owner |
13 | springfield | Springfield | homer | 13 | springfield | Springfield | homer |
14 - | moe | Moe's | homer | 14 + | moe | Moe | homer |
15 And the following enterprise 15 And the following enterprise
16 | identifier | name | owner | 16 | identifier | name | owner |
17 | duff | Duff | homer | 17 | duff | Duff | homer |
@@ -30,7 +30,7 @@ Feature: related_organizations_block @@ -30,7 +30,7 @@ Feature: related_organizations_block
30 And I follow "Add a block" 30 And I follow "Add a block"
31 And I choose "Related Organizations" 31 And I choose "Related Organizations"
32 And I press "Add" 32 And I press "Add"
33 - Then I should see "Moe's" within ".related-organizations-block" 33 + Then I should see "Moe" within ".related-organizations-block"
34 And I should see "Duff" within ".related-organizations-block" 34 And I should see "Duff" within ".related-organizations-block"
35 35
36 Scenario: display only sub-communities 36 Scenario: display only sub-communities
@@ -41,12 +41,12 @@ Feature: related_organizations_block @@ -41,12 +41,12 @@ Feature: related_organizations_block
41 And I follow "Edit" within ".related-organizations-block" 41 And I follow "Edit" within ".related-organizations-block"
42 And I select "Community" from "block_organization_type" 42 And I select "Community" from "block_organization_type"
43 And I press "Save" 43 And I press "Save"
44 - Then I should see "Moe's" within ".related-organizations-block" 44 + Then I should see "Moe" within ".related-organizations-block"
45 And I should not see "Duff" within ".related-organizations-block" 45 And I should not see "Duff" within ".related-organizations-block"
46 46
47 Scenario: display both sub types on sub-organizations page 47 Scenario: display both sub types on sub-organizations page
48 When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin 48 When I go to springfield's "children" page from "SubOrganizationsPluginProfileController" of "SubOrganizations" plugin
49 - Then I should see "Moe's" 49 + Then I should see "Moe"
50 And I should see "Duff" 50 And I should see "Duff"
51 51
52 Scenario: display only sub-communities on sub-organizations page 52 Scenario: display only sub-communities on sub-organizations page
@@ -58,5 +58,5 @@ Feature: related_organizations_block @@ -58,5 +58,5 @@ Feature: related_organizations_block
58 And I select "Community" from "block_organization_type" 58 And I select "Community" from "block_organization_type"
59 And I press "Save" 59 And I press "Save"
60 And I follow "View all" within ".related-organizations-block" 60 And I follow "View all" within ".related-organizations-block"
61 - Then I should see "Moe's" within ".profile-list" 61 + Then I should see "Moe" within ".profile-list"
62 And I should not see "Duff" within ".profile-list" 62 And I should not see "Duff" within ".profile-list"
po/hy/noosfero.po
@@ -7,15 +7,16 @@ msgid &quot;&quot; @@ -7,15 +7,16 @@ msgid &quot;&quot;
7 msgstr "" 7 msgstr ""
8 "Project-Id-Version: 1.1-166-gaf47713\n" 8 "Project-Id-Version: 1.1-166-gaf47713\n"
9 "POT-Creation-Date: 2015-06-01 17:26-0300\n" 9 "POT-Creation-Date: 2015-06-01 17:26-0300\n"
10 -"PO-Revision-Date: 2009-10-26 16:20-0300\n"  
11 -"Last-Translator: Anahit Minassian <anahit.minassian@cooperation.net>\n"  
12 -"Language-Team: LANGUAGE <LL@li.org>\n" 10 +"PO-Revision-Date: 2015-07-24 21:19+0200\n"
  11 +"Last-Translator: Andrey Aleksanyants <aaleksanyants@yahoo.com>\n"
  12 +"Language-Team: Armenian "
  13 +"<https://hosted.weblate.org/projects/noosfero/noosfero/hy/>\n"
13 "Language: hy\n" 14 "Language: hy\n"
14 "MIME-Version: 1.0\n" 15 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n" 16 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n" 17 "Content-Transfer-Encoding: 8bit\n"
17 -"Plural-Forms: nplurals=2; plural=(n > 1);\n"  
18 -"X-Generator: Pootle 1.1.0\n" 18 +"Plural-Forms: nplurals=2; plural=(n != 1);\n"
  19 +"X-Generator: Weblate 2.4-dev\n"
19 20
20 #: app/models/approve_comment.rb:17 21 #: app/models/approve_comment.rb:17
21 #, fuzzy 22 #, fuzzy
@@ -286,7 +287,7 @@ msgstr &quot;Վերբեռնած ֆայլ&quot; @@ -286,7 +287,7 @@ msgstr &quot;Վերբեռնած ֆայլ&quot;
286 287
287 #: app/models/uploaded_file.rb:103 288 #: app/models/uploaded_file.rb:103
288 msgid "Upload any kind of file you want." 289 msgid "Upload any kind of file you want."
289 -msgstr "Վերբեռնեք ցանկացած տիպի ֆայլ" 290 +msgstr "Վերբեռնեք ցանկացած տեսակի ֆայլ։"
290 291
291 #: app/models/invite_friend.rb:12 292 #: app/models/invite_friend.rb:12
292 #, fuzzy 293 #, fuzzy
@@ -440,7 +441,7 @@ msgstr &quot;Կառավարել մեկնաբանությունները&quot; @@ -440,7 +441,7 @@ msgstr &quot;Կառավարել մեկնաբանությունները&quot;
440 441
441 #: app/models/environment.rb:101 442 #: app/models/environment.rb:101
442 msgid "Disable search for articles " 443 msgid "Disable search for articles "
443 -msgstr "Դիզակտիվացնել հոդվածների որոնումը" 444 +msgstr "Անջատել որոնումը ըստ հոդվածների "
444 445
445 #: app/models/environment.rb:102 446 #: app/models/environment.rb:102
446 msgid "Disable search for enterprises" 447 msgid "Disable search for enterprises"
@@ -658,7 +659,7 @@ msgstr &quot;Արտադրանք և ծառայություններ&quot; @@ -658,7 +659,7 @@ msgstr &quot;Արտադրանք և ծառայություններ&quot;
658 659
659 #: app/models/environment.rb:980 660 #: app/models/environment.rb:980
660 msgid "have unsupported languages." 661 msgid "have unsupported languages."
661 -msgstr "" 662 +msgstr "պարունակում է չաջակցվող լեզուներ։"
662 663
663 #: app/models/communities_block.rb:6 app/helpers/application_helper.rb:564 664 #: app/models/communities_block.rb:6 app/helpers/application_helper.rb:564
664 #: app/helpers/application_helper.rb:1128 app/helpers/assets_helper.rb:11 665 #: app/helpers/application_helper.rb:1128 app/helpers/assets_helper.rb:11
@@ -666,14 +667,13 @@ msgstr &quot;&quot; @@ -666,14 +667,13 @@ msgstr &quot;&quot;
666 #: app/controllers/public/search_controller.rb:184 667 #: app/controllers/public/search_controller.rb:184
667 #: app/controllers/public/search_controller.rb:259 668 #: app/controllers/public/search_controller.rb:259
668 msgid "Communities" 669 msgid "Communities"
669 -msgstr "Համայնքներ" 670 +msgstr "Հանրություններ"
670 671
671 #: app/models/communities_block.rb:10 672 #: app/models/communities_block.rb:10
672 -#, fuzzy  
673 msgid "{#} community" 673 msgid "{#} community"
674 msgid_plural "{#} communities" 674 msgid_plural "{#} communities"
675 -msgstr[0] "Մեկ համայնք"  
676 -msgstr[1] "%{num} համայնքներ" 675 +msgstr[0] "{#} հանրություն"
  676 +msgstr[1] "{#} հանրություն"
677 677
678 #: app/models/communities_block.rb:14 678 #: app/models/communities_block.rb:14
679 msgid "This block displays the communities in which the user is a member." 679 msgid "This block displays the communities in which the user is a member."
@@ -685,11 +685,11 @@ msgstr &quot;&quot; @@ -685,11 +685,11 @@ msgstr &quot;&quot;
685 #: app/views/spam/_suggest_article.html.erb:12 685 #: app/views/spam/_suggest_article.html.erb:12
686 #: app/views/cms/_media_new_folder.html.erb:9 686 #: app/views/cms/_media_new_folder.html.erb:9
687 msgid "Folder" 687 msgid "Folder"
688 -msgstr "Թղթապանակ" 688 +msgstr "Պանակ"
689 689
690 #: app/models/folder.rb:28 690 #: app/models/folder.rb:28
691 msgid "A folder, inside which you can put other articles." 691 msgid "A folder, inside which you can put other articles."
692 -msgstr "Այս թղթապանակում կարող եք տեղադրել Ձեր հոդվածները:" 692 +msgstr "Պանակ, որի մեջ կարող եք տեղադրել այլ հոդվածներ։"
693 693
694 #: app/models/event.rb:9 app/models/event.rb:67 694 #: app/models/event.rb:9 app/models/event.rb:67
695 #: app/models/link_list_block.rb:30 app/helpers/application_helper.rb:938 695 #: app/models/link_list_block.rb:30 app/helpers/application_helper.rb:938
public/javascripts/application.js
@@ -14,7 +14,6 @@ @@ -14,7 +14,6 @@
14 *= require jquery.ba-bbq.min.js 14 *= require jquery.ba-bbq.min.js
15 *= require jquery.tokeninput.js 15 *= require jquery.tokeninput.js
16 *= require jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js 16 *= require jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js
17 -*= require select-or-die/_src/selectordie  
18 *= require inputosaurus.js 17 *= require inputosaurus.js
19 *= require reflection.js 18 *= require reflection.js
20 *= require rails.js 19 *= require rails.js
public/javascripts/search.js
@@ -20,12 +20,6 @@ @@ -20,12 +20,6 @@
20 $('form.search_form').submit(); 20 $('form.search_form').submit();
21 }); 21 });
22 22
23 - // Custom styled select  
24 - $('#search-filters select').selectOrDie();  
25 -  
26 - // Custom styled select  
27 - $('#search-subheader select').selectOrDie();  
28 -  
29 // Form Ajax submission 23 // Form Ajax submission
30 $('form.search_form').submit(function () { 24 $('form.search_form').submit(function () {
31 $.ajax({ 25 $.ajax({
public/javascripts/select-or-die/LICENSE
@@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
1 -The MIT License (MIT)  
2 -  
3 -Copyright (c) 2014 Per Vestman  
4 -  
5 -Permission is hereby granted, free of charge, to any person obtaining a copy  
6 -of this software and associated documentation files (the "Software"), to deal  
7 -in the Software without restriction, including without limitation the rights  
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell  
9 -copies of the Software, and to permit persons to whom the Software is  
10 -furnished to do so, subject to the following conditions:  
11 -  
12 -The above copyright notice and this permission notice shall be included in all  
13 -copies or substantial portions of the Software.  
14 -  
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE  
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,  
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE  
21 -SOFTWARE.  
public/javascripts/select-or-die/README.md
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -Select-or-Die  
2 -=============  
3 -  
4 -Yet another jQuery plugin to style select elements. I'll update the reademe file in a couple of days, meanwhile you can find a demo and documentation over at http://vst.mn/selectordie  
5 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_demo/!inc/css/demo.css
@@ -1,318 +0,0 @@ @@ -1,318 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: demo.css  
4 - * Updated: 2014-04-27  
5 - * Created by: Per V @ Vst.mn  
6 - * What?: CSS for the Select or Die demo  
7 - *  
8 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
9 - * =========================================================== */  
10 -  
11 -*  
12 - {  
13 - -webkit-box-sizing: border-box;  
14 - -moz-box-sizing: border-box;  
15 - box-sizing: border-box;  
16 - }  
17 -  
18 -html { height: 100%; }  
19 -  
20 -body  
21 - {  
22 - height: 100%;  
23 - min-height: 100%;  
24 - padding: 0;  
25 - margin: 0;  
26 - background: #f5f5f5;  
27 - color: #707070;  
28 - font-family: 'Lato', 'sans-serif';  
29 - font-size: 13px;  
30 - line-height: 23px;  
31 - font-weight: 300;  
32 - }  
33 -  
34 -ul { padding-left: 15px; }  
35 -  
36 -a,  
37 -.action  
38 - {  
39 - color: inherit;  
40 - border-bottom: 1px solid #cccccc;  
41 - padding-bottom: 1px;  
42 - text-decoration: none;  
43 - cursor: pointer;  
44 - }  
45 -  
46 - a:hover,  
47 - .method:hover { border-bottom: 1px solid #444444; }  
48 -  
49 -.cover  
50 - {  
51 - width: 100%;  
52 - height: 100%;  
53 - background: #000000 url(../../!pix/bg.jpg) center no-repeat;  
54 - background-size: cover;  
55 - border-bottom: 1px solid #000000;  
56 - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);  
57 - }  
58 -  
59 - .cover_sod  
60 - {  
61 - position: relative;  
62 - top: 50%;  
63 - left: 50%;  
64 - -webkit-transform: translate(-50%,-50%);  
65 - -ms-transform: translate(-50%,-50%);  
66 - transform: translate(-50%,-50%);  
67 - width: 80%;  
68 - max-width: 600px;  
69 - background: rgba(0,0,0,.3);  
70 - border: 10px solid #ffffff;  
71 - border-radius: 0;  
72 - padding: 20px;  
73 - color: #ffffff;  
74 - font-size: 30px;  
75 - font-weight: 700;  
76 - letter-spacing: 5px;  
77 - }  
78 -  
79 - .cover_sod:hover  
80 - {  
81 - background: rgba(0,0,0,.3);  
82 - border-color: #ffffff;  
83 - }  
84 -  
85 - .cover_sod.open  
86 - {  
87 - background: #ffffff;  
88 - border-color: #ffffff;  
89 - color: #000000;  
90 - border-radius: 0;  
91 - }  
92 -  
93 - .cover_sod.focus { border-color: #ffffff; }  
94 -  
95 - .cover_sod:before  
96 - {  
97 - content: "";  
98 - top: 50%;  
99 - right: 20px;  
100 - -webkit-transform: translateY(-50%);  
101 - -ms-transform: translateY(-50%);  
102 - transform: translateY(-50%);  
103 - width: 24px;  
104 - height: 18px;  
105 - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMjQgMTcuNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMTcuNiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNMjQsMHYzLjRIMFYwSDI0eiBNMCwxMC41aDI0VjcuMUgwVjEwLjV6IE0wLDE3LjZoMjR2LTMuNEgwVjE3LjZ6Ii8+DQo8L3N2Zz4NCg==);  
106 - }  
107 - .cover_sod.open:before { background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMjQgMTcuNiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMTcuNiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8cGF0aCBkPSJNMjQsMHYzLjRIMFYwSDI0eiBNMCwxMC41aDI0VjcuMUgwVjEwLjV6IE0wLDE3LjZoMjR2LTMuNEgwVjE3LjZ6Ii8+DQo8L3N2Zz4NCg==); }  
108 -  
109 - .cover_sod:after { display: none; }  
110 -  
111 - .cover_sod .sod_label { padding-right: 30px; }  
112 -  
113 - .cover_sod .sod_list  
114 - {  
115 - top: calc(100% + 10px);  
116 - width: calc(100% + 20px);  
117 - margin-left: -10px;  
118 - border: none;  
119 - border-radius: 0;  
120 - font-size: 20px;  
121 - font-weight: 300;  
122 - }  
123 -  
124 - .cover_sod .sod_list li { padding: 15px 30px; }  
125 -  
126 -.content  
127 - {  
128 - position: relative;  
129 - padding: 60px;  
130 - margin: 50px auto;  
131 - width: 90%;  
132 - max-width: 600px;  
133 - background: #ffffff;  
134 - text-align: justify;  
135 - }  
136 -  
137 - .arrow { margin-bottom: 30px; }  
138 -  
139 - .arrow:after  
140 - {  
141 - content: "";  
142 - position: absolute;  
143 - top: 100%;  
144 - left: 50%;  
145 - height: 0;  
146 - width: 0;  
147 - margin-left: -15px;  
148 - border: solid transparent;  
149 - border-color: rgba(255, 255, 255, 0);  
150 - border-top-color: #ffffff;  
151 - border-width: 15px;  
152 - pointer-events: none;  
153 - }  
154 -  
155 - table { width: 100%; }  
156 -  
157 - tr:nth-child(even) { background: #f8f8f8; }  
158 -  
159 - th  
160 - {  
161 - background: #e8e8e8;  
162 - text-align: left;  
163 - }  
164 -  
165 - td,  
166 - td.option  
167 - {  
168 - padding: 10px;  
169 - vertical-align: top;  
170 - }  
171 -  
172 - td.option { background: transparent; }  
173 -  
174 - .option  
175 - {  
176 - padding: 3px 5px;  
177 - background: #f2f2f2;  
178 - color: #000000;  
179 - font-family: "Courier New", Courier, monospace;  
180 - font-size: 13px;  
181 - }  
182 -  
183 - .hidden.option  
184 - {  
185 - background: transparent;  
186 - padding: 0;  
187 - }  
188 -  
189 - h1  
190 - {  
191 - margin: 0;  
192 - font-size: 20px;  
193 - font-weight: 300;  
194 - letter-spacing: 3px;  
195 - text-align: center;  
196 - text-transform: uppercase;  
197 - }  
198 -  
199 - h1:after  
200 - {  
201 - content: "";  
202 - position: relative;  
203 - display: block;  
204 - width: 20px;  
205 - height: 2px;  
206 - margin: 20px auto;  
207 - background: #838383;  
208 - }  
209 -  
210 - p { text-align: center; }  
211 -  
212 - pre  
213 - {  
214 - padding: 20px;  
215 - margin: 0;  
216 - overflow-x: auto;  
217 - border: 1px solid #ededed;  
218 - border-width: 1px 0;  
219 - font-family: "Courier New", Courier, monospace;  
220 - font-size: 12px;  
221 - }  
222 -  
223 - .pre_methods { margin-top: 30px; }  
224 -  
225 - .buttons { margin-top: 40px; }  
226 -  
227 - .button  
228 - {  
229 - display: inline-block;  
230 - width: 48%;  
231 - padding: 17px 10px;  
232 - border: 5px solid #000000;  
233 - color: #000000;  
234 - font-size: 18px;  
235 - font-weight: 900;  
236 - letter-spacing: 3px;  
237 - text-align: center;  
238 - text-transform: uppercase;  
239 - }  
240 -  
241 - .button:first-child { margin-right: 10px; }  
242 -  
243 - .button:hover  
244 - {  
245 - border: 5px solid #000eff;  
246 - color: #000eff;  
247 - }  
248 -  
249 - .button:active  
250 - {  
251 - border-color: #ff0000;  
252 - color: #ff0000;  
253 - }  
254 -  
255 - .actions  
256 - {  
257 - margin-bottom: 20px;  
258 - text-align: center;  
259 - }  
260 -  
261 - .trigger  
262 - {  
263 - display: block;  
264 - padding: 10px;  
265 - margin: 10px 5px;  
266 - border: 3px solid #000000;  
267 - color: #000000;  
268 - font-size: 11px;  
269 - font-weight: 700;  
270 - letter-spacing: 1px;  
271 - text-transform: uppercase;  
272 - cursor: pointer;  
273 - -webkit-user-select: none;  
274 - -moz-user-select: none;  
275 - -ms-user-select: none;  
276 - }  
277 -  
278 - .trigger:hover  
279 - {  
280 - border-color: #000eff;  
281 - color: #000eff;  
282 - }  
283 -  
284 - .trigger:active  
285 - {  
286 - border-color: #ff0000;  
287 - color: #ff0000;  
288 - }  
289 -  
290 - .hidden { display: none; }  
291 -  
292 - .list li { margin-bottom: 10px; }  
293 -  
294 - .preview { text-align: center; }  
295 -  
296 - .bones { color: #ff0000;}  
297 -  
298 -@media (max-width: 600px) {  
299 - .cover_sod { font-size: 20px; }  
300 - .cover_sod ul { font-size: 18px; }  
301 - .content { padding: 40px; }  
302 - h1 { font-size: 15px; }  
303 - p { text-align: justify; }  
304 - .button { width: 100%; }  
305 - .button:first-child { margin-bottom: 10px; }  
306 - tr th:nth-child(-n+2),  
307 - tr td:nth-child(-n+2) { display: none; }  
308 -  
309 - td .hidden { display: inline; }  
310 -  
311 - td .hidden:after  
312 - {  
313 - content: "\A";  
314 - white-space: pre;  
315 - }  
316 -}  
317 -  
318 -  
public/javascripts/select-or-die/_demo/!inc/css/selectordie_theme_02.css
@@ -1,282 +0,0 @@ @@ -1,282 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: selectordie_theme_02.css  
4 - * Updated: 2014-04-27  
5 - * Created by: Per V @ Vst.mn  
6 - * What?: Custom "theme" for Select or Die.  
7 - * This is pretty much same as theme_02.css  
8 - * found in the "_themes" folder. The only  
9 - * difference is that it has .cusom appended  
10 - * to all the selectors. .  
11 - *  
12 - *  
13 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
14 - * =========================================================== */  
15 -  
16 -  
17 -/* The SoD - Please keep this first three lines intact, otherwise all hell will break looooooose */  
18 -.sod_select.custom.custom  
19 - {  
20 - display: inline-block;  
21 - position: relative;  
22 - line-height: 1;  
23 -  
24 - width: 200px;  
25 - padding: 13px 10px;  
26 - background: #fcfcfc;  
27 - border: 1px solid #d4d4d4;  
28 - box-shadow: inset 0 -1px 2px rgba(0,0,0,.05);  
29 - border-radius: 3px;  
30 - color: #808080;  
31 - font-size: 12px;  
32 - font-weight: 700;  
33 - text-align: left;  
34 - text-transform: none;  
35 - outline: 0;  
36 - outline-offset: -2px; /* Opera */  
37 - cursor: default;  
38 - }  
39 -  
40 - /* Up/Down arrows */  
41 - .sod_select.custom:before,  
42 - .sod_select.custom:after  
43 - {  
44 - content: "";  
45 - position: absolute;  
46 - right: 30px;  
47 - top: 10px;  
48 - bottom: 10px;  
49 - border-left: 1px solid #e5e5e5;  
50 - }  
51 -  
52 - /* Down arrow */  
53 - .sod_select.custom:after  
54 - {  
55 - content: "\25BC";  
56 - right: 12px;  
57 - top: 16px;  
58 - border-left: none;  
59 - font-size: 7px;  
60 - }  
61 - .sod_select.custom.above:after { content: "\25B2"; }  
62 -  
63 - /* Change the border color on hover, focus and when open */  
64 - .sod_select.custom:hover,  
65 - .sod_select.custom.open,  
66 - .sod_select.custom.focus  
67 - {  
68 - background: #ffffff;  
69 - border-color: #d4d4d4;  
70 - }  
71 -  
72 - .sod_select.custom.open { color: #919191; }  
73 - .sod_select.custom.focus { box-shadow: inset 0 -1px 2px rgba(0,0,0,.05), 0 0 5px rgba(0,0,0,.1); }  
74 -  
75 - /* When the entire SoD is disabled, go crazy! */  
76 - .sod_select.custom.disabled  
77 - {  
78 - border-color: #d4d4d4;  
79 - color: #b2b2b2;  
80 - cursor: not-allowed;  
81 - }  
82 -  
83 - .sod_select.custom.disabled:hover { background: #fcfcfc; }  
84 -  
85 - /* The "label", or whatever we should call it. Keep the first three lines for truncating. */  
86 - .sod_select.custom .sod_label  
87 - {  
88 - overflow: hidden;  
89 - white-space: nowrap;  
90 - text-overflow: ellipsis;  
91 -  
92 - padding-right: 15px;  
93 - }  
94 -  
95 - .sod_select.custom .sod_prefix { /* Use this if you're using a prefix and want to style it */ }  
96 - .sod_select.custom .sod_placeholder { /* Use this if you're using a placeholder and want to style it */ }  
97 -  
98 -  
99 -  
100 - /* Options list wrapper */  
101 - .sod_select.custom .sod_list  
102 - {  
103 - position: absolute;  
104 - top: 100%;  
105 - left: 0;  
106 - display: none;  
107 - height: auto;  
108 - width: 200px;  
109 - margin: 10px 0 0 -1px;  
110 - border: 1px solid #d4d4d4;  
111 - border-radius: 3px;  
112 - box-shadow: 0 2px 4px rgba(0,0,0,.1);  
113 - background: #ffffff;  
114 - color: #808080;  
115 - font-weight: 300;  
116 - z-index: 1;  
117 - }  
118 -  
119 - /* Shows the option list (don't edit) */  
120 - .sod_select.custom.open .sod_list { display: block; }  
121 -  
122 - /* Don't display the options when */  
123 - .sod_select.custom.disabled.open .sod_list { display: none; }  
124 -  
125 - /* When the option list is displayed above the SoD */  
126 - .sod_select.custom.above .sod_list  
127 - {  
128 - top: auto;  
129 - bottom: 100%;  
130 - margin: 0 0 10px -1px;  
131 - border: 1px solid #d4d4d4;  
132 - box-shadow: 0 -2px 4px rgba(0,0,0,.1);  
133 - }  
134 -  
135 - /* Arrow(s) displayed when the SoD is active, only in this "theme" */  
136 - .sod_select.custom .sod_list:after,  
137 - .sod_select.custom .sod_list:before  
138 - {  
139 - content: "";  
140 - position: absolute;  
141 - bottom: 100%;  
142 - right: 10px;  
143 - border: solid transparent;  
144 - height: 0;  
145 - width: 0;  
146 - pointer-events: none;  
147 - }  
148 -  
149 - .sod_select.custom.above .sod_list:after,  
150 - .sod_select.custom.above .sod_list:before  
151 - {  
152 - top: 100%;  
153 - bottom: auto;  
154 - }  
155 -  
156 - .sod_select.custom .sod_list:after  
157 - {  
158 - border-color: rgba(255, 255, 255, 0);  
159 - border-bottom-color: #ffffff;  
160 - border-width: 6px;  
161 - }  
162 -  
163 - .sod_select.custom.above .sod_list:after  
164 - {  
165 - border-color: rgba(255, 255, 255, 0);  
166 - border-top-color: #ffffff;  
167 - }  
168 -  
169 - .sod_select.custom .sod_list:before  
170 - {  
171 - margin-right: -2px;  
172 - border-color: rgba(212, 212, 212, 0);  
173 - border-bottom-color: #d4d4d4;  
174 - border-width: 8px;  
175 - }  
176 -  
177 - .sod_select.custom.above .sod_list:before  
178 - {  
179 - border-color: rgba(255, 255, 255, 0);  
180 - border-top-color: #d4d4d4;  
181 - }  
182 -  
183 -  
184 - /* Options list container */  
185 - .sod_select.custom .sod_list ul  
186 - {  
187 - overflow-y: auto;  
188 - padding: 0 4px;  
189 - margin: 4px 0;  
190 - border-radius: 3px;  
191 - }  
192 -  
193 - /* All the options. Keep the first three lines for truncating... */  
194 - .sod_select.custom .sod_list li  
195 - {  
196 - overflow: hidden;  
197 - white-space: nowrap;  
198 - text-overflow: ellipsis;  
199 -  
200 - position: relative;  
201 - padding: 10px;  
202 - list-style-type: none;  
203 - border-bottom: 1px solid #f7f7f7;  
204 - }  
205 -  
206 - /* Remove the bottom border from the last item */  
207 - .sod_select.custom .sod_list li:last-child { border-bottom: none; }  
208 -  
209 - /* Optgroups */  
210 - .sod_select.custom .sod_list .optgroup,  
211 - .sod_select.custom .sod_list .optgroup.disabled  
212 - {  
213 - background: inherit;  
214 - color: #939393;  
215 - font-size: 10px;  
216 - font-style: italic;  
217 - }  
218 -  
219 - /* Children of an optgroup */  
220 - .sod_select.custom .sod_list .groupchild { padding-left: 20px; }  
221 -  
222 - /* Disabled option */  
223 - .sod_select.custom .sod_list .disabled  
224 - {  
225 - background: inherit;  
226 - color: #cccccc;  
227 - }  
228 -  
229 - /* Hover state for options, also used when a user uses his/hers up/down keys */  
230 - .sod_select.custom .sod_list .active  
231 - {  
232 - background: #f7f7f7;  
233 - border-radius: 3px;  
234 - color: #676767;  
235 - }  
236 -  
237 - /*Make room for the check mark */  
238 - .sod_select.custom .sod_list .selected  
239 - {  
240 - padding-right: 25px;  
241 - font-weight: 700;  
242 - }  
243 -  
244 - /* Displays a check mark for the selected option */  
245 - .sod_select.custom .sod_list .selected:before  
246 - {  
247 - content: "";  
248 - position: absolute;  
249 - right: 10px;  
250 - top: 50%;  
251 - -webkit-transform: translateY(-50%);  
252 - -ms-transform: translateY(-50%);  
253 - transform: translateY(-50%);  
254 - display: inline-block;  
255 - color: #808080;  
256 - height: 9px;  
257 - width: 10px;  
258 - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMTAgOSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTAgOSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBmaWxsPSIjRDlEOUQ4IiBkPSJNNCw2LjdDMy42LDYuMywzLjUsNi4xLDMuMSw1LjdDMi42LDUuMiwyLDQuNiwxLjUsNC4xYy0wLjgtMC44LTIsMC40LTEuMiwxLjJjMC45LDAuOSwxLjksMS45LDIuOCwyLjgNCgkJYzAuNywwLjcsMS4zLDEsMiwwQzYuNyw2LDguMywzLjcsOS44LDEuNUMxMC41LDAuNSw5LTAuMyw4LjMsMC42bDAsMEM2LjcsMi45LDUuNyw0LjQsNCw2LjciLz4NCjwvZz4NCjwvc3ZnPg0K);  
259 - }  
260 -  
261 - /* Add a .no_highlight class to you SoD to hide the check mark */  
262 - .sod_select.custom.no_highlight .sod_list .selected:before { display: none; }  
263 -  
264 -  
265 -  
266 - /* Hide native select */  
267 - .sod_select.custom select { display: none !important; }  
268 -  
269 - /* The native select in touch mode. Keep this first line. Sorry, keep everything. */  
270 - .sod_select.custom.touch select  
271 - {  
272 - -webkit-appearance: menulist-button;  
273 -  
274 - position: absolute;  
275 - top: 0;  
276 - left: 0;  
277 - display: block !important;  
278 - height: 100%;  
279 - width: 100%;  
280 - opacity: 0;  
281 - z-index: 1;  
282 - }  
283 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_demo/!inc/js/demo.js
@@ -1,88 +0,0 @@ @@ -1,88 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: global.js  
4 - * Updated: 2014-04-15  
5 - * What?: Random crap for the Select or Die demo  
6 - *  
7 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
8 - * =========================================================== */  
9 -  
10 -  
11 -function random_word() {  
12 - var $words = ['Frightened', 'By', 'Your', 'Own', 'Smell', 'Bitterness', 'Will', 'Run', 'You', 'Through']; // In FLames - Bullet Ride (http://www.youtube.com/watch?v=lDwqzGtjGMU)  
13 - var $randomizer = $words[Math.floor(Math.random() * $words.length)];  
14 - return $randomizer;  
15 -}  
16 -  
17 -jQuery(document).ready(function ($) {  
18 - $(".basic").selectOrDie();  
19 -  
20 - $(".well_hello_there").selectOrDie({  
21 - onChange: function() {  
22 - var $target = $(this).val(),  
23 - $position = $($target).position().top - 40 + "px";  
24 - $("html, body").animate({scrollTop: $position}, 500);  
25 - }  
26 - });  
27 -  
28 - $(".callback").selectOrDie({  
29 - onChange: function() {  
30 - alert($(this).val());  
31 - }  
32 - });  
33 -  
34 - $(".trigger").click(function(){  
35 - var $method = $(this).data("method").replace(/'/g, '"'),  
36 - $subMethod = $(this).data("sub-method"),  
37 - $parent = $(this).closest("section"),  
38 - $parentID = $parent.prop("id"),  
39 - $parentSelect = $parent.find("select"),  
40 - $preMethod;  
41 -  
42 - if( $method === "update" ) {  
43 - var $randomWord = random_word();  
44 - $("#" + $parentID + " select").append('<option value="' + $randomWord + '" selected="selected">' + $randomWord + '</option>');  
45 - $("#" + $parentID + " select").selectOrDie($method);  
46 - $("#" + $parentID + " pre").html('$("select").append("&lt;option value=\\"' + $randomWord + '\\"&gt;' + $randomWord + '&lt;/option&gt;");\n$("select").selectOrDie("update");').show();  
47 - } else if ( $method === "destroy" && !$parentSelect.is(":hidden") ) {  
48 - $("#" + $parentID + " pre").html("$(\"select\").selectOrDie();").show();  
49 - $("#" + $parentID + " select").selectOrDie();  
50 - } else {  
51 - if ( $subMethod === "group" ) {  
52 - $("#" + $parentID + " select").selectOrDie($method, 'Option Group Label');  
53 - $preMethod = $method + "\", \"Option Group Label";  
54 - } else if ( $subMethod === "option" ) {  
55 - $("#" + $parentID + " select").selectOrDie($method, 'three');  
56 - $preMethod = $method + "\", \"three";  
57 - } else {  
58 - $("#" + $parentID + " select").selectOrDie($method);  
59 - $preMethod = $method;  
60 - }  
61 -  
62 - $("#" + $parentID + " pre").html("$(\"select\").selectOrDie(\"" + $preMethod + "\");").show();  
63 -  
64 - if ( $method === "disable" ) {  
65 - $(this).data("method", "enable");  
66 - } else if ( $method === "enable" ) {  
67 - $(this).data("method", "disable");  
68 - }  
69 - }  
70 -  
71 - $("span", this).toggle();  
72 - $("#" + $parentID + " pre").litelighter('enable');  
73 - });  
74 -  
75 - /* - - - */  
76 -  
77 - $("a:not(.external)").click(function(){  
78 - var $target = $(this).attr("href"),  
79 - $position = $($target).position().top - 40 + "px";  
80 - $("html, body").animate({scrollTop: $position}, 500);  
81 - });  
82 -  
83 - $("pre").litelighter({  
84 - style: 'light',  
85 - language: 'js'  
86 - });  
87 -  
88 -});  
public/javascripts/select-or-die/_demo/!inc/js/jquery-1.8.0.min.js
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -/*! jQuery v@1.8.0 jquery.com | jquery.org/license */  
2 -(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bX(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b in a)return b}return d}function bY(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function bZ(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bY(c)&&(e[f]=p._data(c,"olddisplay",cb(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b$(a,b,c){var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function b_(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bU[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bU[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bU[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bU[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bU[e]+"Width"))||0));return f}function ca(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bP.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+b_(a,b,c||(f?"border":"content"),e)+"px"}function cb(a){if(bR[a])return bR[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cz(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cu;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cz(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cz(a,c,d,e,"*",g)),h}function cA(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cB(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cC(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cK(){try{return new a.XMLHttpRequest}catch(b){}}function cL(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cT(){return setTimeout(function(){cM=b},0),cM=p.now()}function cU(a,b){p.each(b,function(b,c){var d=(cS[b]||[]).concat(cS["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cV(a,b,c){var d,e=0,f=0,g=cR.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cM||cT(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cM||cT(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cW(k,j.opts.specialEasing);for(;e<g;e++){d=cR[e].call(j,a,k,j.opts);if(d)return d}return cU(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cW(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cX(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bY(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cb(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cO.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cY(a,b,c,d,e){return new cY.prototype.init(a,b,c,d,e)}function cZ(a,b){var c,d={height:a},e=0;for(;e<4;e+=2-b)c=bU[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function c_(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=r.test("Â ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,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(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":a.toString().replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete"||e.readyState!=="loading"&&e.addEventListener)setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){p.isFunction(c)&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)(d=p._data(g[h],a+"queueHooks"))&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=[].slice.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click")){g=p(this),g.context=this;for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){i={},k=[],g[0]=f;for(d=0;d<q;d++)l=o[d],m=l.selector,i[m]===b&&(i[m]=g.is(m)),i[m]&&k.push(l);k.length&&u.push({elem:f,matches:k})}}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){j=u[d],c.currentTarget=j.elem;for(e=0;e<j.matches.length&&!c.isImmediatePropagationStopped();e++){l=j.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,h=((p.event.special[l.origType]||{}).handle||l.handler).apply(j.elem,r),h!==b&&(c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{ready:{setup:p.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)Z(a,b[e],c,d)}function be(a,b,c,d,e,f){var g,h=$.setFilters[b.toLowerCase()];return h||Z.error(b),(a||!(g=e))&&bd(a||"*",d,g=[],e),g.length>0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(g[a]=b)};for(;p<q;p++){s.exec(""),a=f[p],j=[],i=0,k=e;while(g=s.exec(a)){n=s.lastIndex=g.index+g[0].length;if(n>i){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="<a name='"+q+"'></a><div name='"+q+"'></div>",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}};$.setFilters.nth=$.setFilters.eq,$.filters=$.pseudos,X||($.attrHandle={href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}}),V&&($.order.push("NAME"),$.find.NAME=function(a,b){if(typeof b.getElementsByName!==j)return b.getElementsByName(a)}),Y&&($.order.splice(1,0,"CLASS"),$.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!==j&&!c)return b.getElementsByClassName(a)});try{n.call(i.childNodes,0)[0].nodeType}catch(_){n=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}var ba=Z.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},bb=Z.contains=i.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc=Z.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=bc(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=bc(b);return c};Z.attr=function(a,b){var c,d=ba(a);return d||(b=b.toLowerCase()),$.attrHandle[b]?$.attrHandle[b](a):U||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},Z.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},[0,0].sort(function(){return l=0}),i.compareDocumentPosition?e=function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:(e=function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return f(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=e.length,d=g.length;for(var l=0;l<c&&l<d;l++)if(e[l]!==g[l])return f(e[l],g[l]);return l===c?f(a,g[l],-1):f(e[l],b,1)},f=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),Z.uniqueSort=function(a){var b,c=1;if(e){k=l,a.sort(e);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1)}return a};var bl=Z.compile=function(a,b,c){var d,e,f,g=O[a];if(g&&g.context===b)return g;e=bg(a,b,c);for(f=0;d=e[f];f++)e[f]=bj(d,b,c);return g=O[a]=bk(e),g.context=b,g.runs=g.dirruns=0,P.push(a),P.length>$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j<k;j++){p=$.order[j];if(s=L[p].exec(m)){h=$.find[p]((s[1]||"").replace(K,""),q,g);if(h==null)continue;m===r&&(a=a.slice(0,a.length-r.length)+m.replace(L[p],""),a||o.apply(e,n.call(h,0)));break}}}if(a){i=bl(a,b,g),d=i.dirruns++,h==null&&(h=$.find.TAG("*",G.test(a)&&b.parentNode||b));for(j=0;l=h[j];j++)c=i.runs++,i(l,b)&&e.push(l)}return e};h.querySelectorAll&&function(){var a,b=bm,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[],f=[":active"],g=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;T(function(a){a.innerHTML="<select><option selected></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=(c[0]||c).ownerDocument||c[0]||c,typeof c.createDocumentFragment=="undefined"&&(c=e),a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cS[c]=cS[c]||[],cS[c].unshift(b)},prefilter:function(a,b){b?cR.unshift(a):cR.push(a)}}),p.Tween=cY,cY.prototype={constructor:cY,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cY.propHooks[this.prop];return a&&a.get?a.get(this):cY.propHooks._default.get(this)},run:function(a){var b,c=cY.propHooks[this.prop];return this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration),this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cY.propHooks._default.set(this),this}},cY.prototype.init.prototype=cY.prototype,cY.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cY.propHooks.scrollTop=cY.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(cZ(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bY).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cV(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cQ.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:cZ("show"),slideUp:cZ("hide"),slideToggle:cZ("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cY.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cN&&(cN=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cN),cN=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c$=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j,k,l,m=this[0],n=m&&m.ownerDocument;if(!n)return;return(e=n.body)===m?p.offset.bodyOffset(m):(d=n.documentElement,p.contains(d,m)?(c=m.getBoundingClientRect(),f=c_(n),g=d.clientTop||e.clientTop||0,h=d.clientLeft||e.clientLeft||0,i=f.pageYOffset||d.scrollTop,j=f.pageXOffset||d.scrollLeft,k=c.top+i-g,l=c.left+j-h,{top:k,left:l}):{top:0,left:0})},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);  
3 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_demo/!inc/js/jquery-2.1.0.min.js
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -/*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */  
2 -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;  
3 -while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?o.queue(this[0],a):void 0===b?this:this.each(function(){var c=o.queue(this,a,b);o._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&o.dequeue(this,a)})},dequeue:function(a){return this.each(function(){o.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=o.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===o.css(a,"display")||!o.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=m.createDocumentFragment(),b=a.appendChild(m.createElement("div"));b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(a){}}o.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=o.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof o!==U&&o.event.triggered!==b.type?o.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n&&(l=o.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=o.event.special[n]||{},k=o.extend({type:n,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&o.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),o.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n){l=o.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||o.removeEvent(a,n,r.handle),delete i[n])}else for(n in i)o.event.remove(a,n+b[j],c,d,!0);o.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,p=[d||m],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||m,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+o.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[o.expando]?b:new o.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:o.makeArray(c,[b]),n=o.event.special[q]||{},e||!n.trigger||n.trigger.apply(d,c)!==!1)){if(!e&&!n.noBubble&&!o.isWindow(d)){for(i=n.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||m)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:n.bindType||q,l=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),l&&l.apply(g,c),l=k&&g[k],l&&l.apply&&o.acceptData(g)&&(b.result=l.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||n._default&&n._default.apply(p.pop(),c)!==!1||!o.acceptData(d)||k&&o.isFunction(d[q])&&!o.isWindow(d)&&(h=d[k],h&&(d[k]=null),o.event.triggered=q,d[q](),o.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=o.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=o.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=o.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((o.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?o(e,this).index(i)>=0:o.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||m,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[o.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new o.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=m),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&o.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return o.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=o.extend(new o.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?o.event.trigger(e,null,b):o.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},o.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},o.Event=function(a,b){return this instanceof o.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.getPreventDefault&&a.getPreventDefault()?Z:$):this.type=a,b&&o.extend(this,b),this.timeStamp=a&&a.timeStamp||o.now(),void(this[o.expando]=!0)):new o.Event(a,b)},o.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z,this.stopPropagation()}},o.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){o.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!o.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.focusinBubbles||o.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){o.event.simulate(b,a.target,o.event.fix(a),!0)};o.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),o.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return o().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=o.guid++)),this.each(function(){o.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,o(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){o.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){o.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?o.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return o.nodeName(a,"table")&&o.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)o.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=o.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&o.nodeName(a,b)?o.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}o.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=o.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||o.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===o.type(e))o.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;o.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===o.inArray(e,d))&&(i=o.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f,g,h=o.event.special,i=0;void 0!==(c=a[i]);i++){if(o.acceptData(c)&&(f=c[L.expando],f&&(b=L.cache[f]))){if(d=Object.keys(b.events||{}),d.length)for(g=0;void 0!==(e=d[g]);g++)h[e]?o.event.remove(c,e):o.removeEvent(c,e,b.handle);L.cache[f]&&delete L.cache[f]}delete M.cache[c[M.expando]]}}}),o.fn.extend({text:function(a){return J(this,function(a){return void 0===a?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?o.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||o.cleanData(ob(c)),c.parentNode&&(b&&o.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(o.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return o.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(o.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,o.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,n=k-1,p=a[0],q=o.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(c=o.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=o.map(ob(c,"script"),kb),g=f.length;k>j;j++)h=c,j!==n&&(h=o.clone(h,!0,!0),g&&o.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,o.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&o.contains(i,h)&&(h.src?o._evalUrl&&o._evalUrl(h.src):o.globalEval(h.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){o.fn[a]=function(a){for(var c,d=[],e=o(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),o(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d=o(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:o.css(d[0],"display");return d.detach(),e}function tb(a){var b=m,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||o("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||o.contains(a.ownerDocument,a)||(g=o.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",e=m.documentElement,f=m.createElement("div"),g=m.createElement("div");g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",f.appendChild(g);function h(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",e.appendChild(f);var d=a.getComputedStyle(g,null);b="1%"!==d.top,c="4px"===d.width,e.removeChild(f)}a.getComputedStyle&&o.extend(l,{pixelPosition:function(){return h(),b},boxSizingReliable:function(){return null==c&&h(),c},reliableMarginRight:function(){var b,c=g.appendChild(m.createElement("div"));return c.style.cssText=g.style.cssText=d,c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.innerHTML="",b}})}(),o.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:0,fontWeight:400},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=o.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=o.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=o.css(a,"border"+R[f]+"Width",!0,e))):(g+=o.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=o.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===o.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):f[g]||(e=S(d),(c&&"none"!==c||!e)&&L.set(d,"olddisplay",e?c:o.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}o.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=o.camelCase(b),i=a.style;return b=o.cssProps[h]||(o.cssProps[h]=Fb(i,h)),g=o.cssHooks[b]||o.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(o.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||o.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]="",i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=o.camelCase(b);return b=o.cssProps[h]||(o.cssProps[h]=Fb(a.style,h)),g=o.cssHooks[b]||o.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||o.isNumeric(f)?f||0:e):e}}),o.each(["height","width"],function(a,b){o.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&zb.test(o.css(a,"display"))?o.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===o.css(a,"boxSizing",!1,e),e):0)}}}),o.cssHooks.marginRight=yb(l.reliableMarginRight,function(a,b){return b?o.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),o.each({margin:"",padding:"",border:"Width"},function(a,b){o.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(o.cssHooks[a+b].set=Gb)}),o.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(o.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=o.css(a,b[g],!1,d);return f}return void 0!==c?o.style(a,b,c):o.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?o(this).show():o(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}o.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(o.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?o.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=o.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){o.fx.step[a.prop]?o.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[o.cssProps[a.prop]]||o.cssHooks[a.prop])?o.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},o.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},o.fx=Kb.prototype.init,o.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(o.cssNumber[a]?"":"px"),g=(o.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(o.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,o.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=o.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k=this,l={},m=a.style,n=a.nodeType&&S(a),p=L.get(a,"fxshow");c.queue||(h=o._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,k.always(function(){k.always(function(){h.unqueued--,o.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],j=o.css(a,"display"),"none"===j&&(j=tb(a.nodeName)),"inline"===j&&"none"===o.css(a,"float")&&(m.display="inline-block")),c.overflow&&(m.overflow="hidden",k.always(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(n?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;n=!0}l[d]=p&&p[d]||o.style(a,d)}if(!o.isEmptyObject(l)){p?"hidden"in p&&(n=p.hidden):p=L.access(a,"fxshow",{}),f&&(p.hidden=!n),n?o(a).show():k.done(function(){o(a).hide()}),k.done(function(){var b;L.remove(a,"fxshow");for(b in l)o.style(a,b,l[b])});for(d in l)g=Ub(n?p[d]:0,d,k),d in p||(p[d]=g.start,n&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=o.camelCase(c),e=b[d],f=a[c],o.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=o.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=o.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:o.extend({},b),opts:o.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=o.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return o.map(k,Ub,j),o.isFunction(j.opts.start)&&j.opts.start.call(a,j),o.fx.timer(o.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}o.Animation=o.extend(Xb,{tweener:function(a,b){o.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),o.speed=function(a,b,c){var d=a&&"object"==typeof a?o.extend({},a):{complete:c||!c&&b||o.isFunction(a)&&a,duration:a,easing:c&&b||b&&!o.isFunction(b)&&b};return d.duration=o.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in o.fx.speeds?o.fx.speeds[d.duration]:o.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){o.isFunction(d.old)&&d.old.call(this),d.queue&&o.dequeue(this,d.queue)},d},o.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=o.isEmptyObject(a),f=o.speed(b,c,d),g=function(){var b=Xb(this,o.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=o.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&o.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=o.timers,g=d?d.length:0;for(c.finish=!0,o.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),o.each(["toggle","show","hide"],function(a,b){var c=o.fn[b];o.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),o.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){o.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),o.timers=[],o.fx.tick=function(){var a,b=0,c=o.timers;for(Lb=o.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||o.fx.stop(),Lb=void 0},o.fx.timer=function(a){o.timers.push(a),a()?o.fx.start():o.timers.pop()},o.fx.interval=13,o.fx.start=function(){Mb||(Mb=setInterval(o.fx.tick,o.fx.interval))},o.fx.stop=function(){clearInterval(Mb),Mb=null},o.fx.speeds={slow:600,fast:200,_default:400},o.fn.delay=function(a,b){return a=o.fx?o.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=m.createElement("input"),b=m.createElement("select"),c=b.appendChild(m.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=m.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var Yb,Zb,$b=o.expr.attrHandle;o.fn.extend({attr:function(a,b){return J(this,o.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){o.removeAttr(this,a)})}}),o.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?o.prop(a,b,c):(1===f&&o.isXMLDoc(a)||(b=b.toLowerCase(),d=o.attrHooks[b]||(o.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=o.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void o.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=o.propFix[c]||c,o.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&o.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?o.removeAttr(a,c):a.setAttribute(c,c),c}},o.each(o.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||o.find.attr;$b[b]=function(a,b,d){var e,f;  
4 -return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;o.fn.extend({prop:function(a,b){return J(this,o.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[o.propFix[a]||a]})}}),o.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!o.isXMLDoc(a),f&&(b=o.propFix[b]||b,e=o.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),l.optSelected||(o.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),o.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){o.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;o.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=o.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?o.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(o.isFunction(a)?function(c){o(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=o(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;o.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=o.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,o(this).val()):a,null==e?e="":"number"==typeof e?e+="":o.isArray(e)&&(e=o.map(e,function(a){return null==a?"":a+""})),b=o.valHooks[this.type]||o.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=o.valHooks[e.type]||o.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),o.extend({valHooks:{select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&o.nodeName(c.parentNode,"optgroup"))){if(b=o(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=o.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=o.inArray(o(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),o.each(["radio","checkbox"],function(){o.valHooks[this]={set:function(a,b){return o.isArray(b)?a.checked=o.inArray(o(a).val(),b)>=0:void 0}},l.checkOn||(o.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),o.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){o.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),o.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=o.now(),dc=/\?/;o.parseJSON=function(a){return JSON.parse(a+"")},o.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&o.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=m.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(o.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,o.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=o.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&o.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}o.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":o.parseJSON,"text xml":o.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,o.ajaxSettings),b):tc(o.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=o.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?o(l):o.event,n=o.Deferred(),p=o.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(n.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=o.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=o.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===o.active++&&o.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(o.lastModified[d]&&v.setRequestHeader("If-Modified-Since",o.lastModified[d]),o.etag[d]&&v.setRequestHeader("If-None-Match",o.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(o.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(o.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?n.resolveWith(l,[r,x,v]):n.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--o.active||o.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return o.get(a,b,c,"json")},getScript:function(a,b){return o.get(a,void 0,b,"script")}}),o.each(["get","post"],function(a,b){o[b]=function(a,c,d,e){return o.isFunction(c)&&(e=e||d,d=c,c=void 0),o.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),o.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){o.fn[b]=function(a){return this.on(b,a)}}),o._evalUrl=function(a){return o.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},o.fn.extend({wrapAll:function(a){var b;return o.isFunction(a)?this.each(function(b){o(this).wrapAll(a.call(this,b))}):(this[0]&&(b=o(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(o.isFunction(a)?function(b){o(this).wrapInner(a.call(this,b))}:function(){var b=o(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=o.isFunction(a);return this.each(function(c){o(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){o.nodeName(this,"body")||o(this).replaceWith(this.childNodes)}).end()}}),o.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},o.expr.filters.visible=function(a){return!o.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(o.isArray(b))o.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==o.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}o.param=function(a,b){var c,d=[],e=function(a,b){b=o.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=o.ajaxSettings&&o.ajaxSettings.traditional),o.isArray(a)||a.jquery&&!o.isPlainObject(a))o.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},o.fn.extend({serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=o.prop(this,"elements");return a?o.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!o(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=o(this).val();return null==c?null:o.isArray(c)?o.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),o.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=o.ajaxSettings.xhr();a.ActiveXObject&&o(a).on("unload",function(){for(var a in Dc)Dc[a]()}),l.cors=!!Fc&&"withCredentials"in Fc,l.ajax=Fc=!!Fc,o.ajaxTransport(function(a){var b;return l.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort"),f.send(a.hasContent&&a.data||null)},abort:function(){b&&b()}}:void 0}),o.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return o.globalEval(a),a}}}),o.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),o.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=o("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),m.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;o.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||o.expando+"_"+cc++;return this[a]=!0,a}}),o.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=o.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||o.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&o.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),o.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||m;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=o.buildFragment([a],b,e),e&&e.length&&o(e).remove(),o.merge([],d.childNodes))};var Ic=o.fn.load;o.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h),a=a.slice(0,h)),o.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&o.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?o("<div>").append(o.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},o.expr.filters.animated=function(a){return o.grep(o.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return o.isWindow(a)?a:9===a.nodeType&&a.defaultView}o.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=o.css(a,"position"),l=o(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=o.css(a,"top"),i=o.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),o.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},o.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){o.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,o.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===o.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),o.nodeName(a[0],"html")||(d=a.offset()),d.top+=o.css(a[0],"borderTopWidth",!0),d.left+=o.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-o.css(c,"marginTop",!0),left:b.left-d.left-o.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!o.nodeName(a,"html")&&"static"===o.css(a,"position"))a=a.offsetParent;return a||Jc})}}),o.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;o.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),o.each(["top","left"],function(a,b){o.cssHooks[b]=yb(l.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?o(a).position()[b]+"px":c):void 0})}),o.each({Height:"height",Width:"width"},function(a,b){o.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){o.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return o.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?o.css(b,c,g):o.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),o.fn.size=function(){return this.length},o.fn.andSelf=o.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return o});var Lc=a.jQuery,Mc=a.$;return o.noConflict=function(b){return a.$===o&&(a.$=Mc),b&&a.jQuery===o&&(a.jQuery=Lc),o},typeof b===U&&(a.jQuery=a.$=o),o});  
5 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_demo/!inc/js/jquery.litelighter.js
@@ -1,173 +0,0 @@ @@ -1,173 +0,0 @@
1 -/*  
2 - * jQuery Litelighter  
3 - * By: Trent Richardson [http://trentrichardson.com]  
4 - *  
5 - * Copyright 2013 Trent Richardson  
6 - * Dual licensed under the MIT or GPL licenses.  
7 - * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt  
8 - * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt  
9 - */  
10 -(function($){  
11 - $.litelighter = function($this, options){  
12 - this.settings = $.extend({},{ clone: false, style: 'light', language: 'generic', tab: ' ' },options);  
13 - this.code = $this;  
14 - this.enable();  
15 - };  
16 -  
17 - $.extend($.litelighter.prototype, {  
18 - enable: function(){  
19 - this.codelite = this.code.data('llcode', this.code.text());  
20 - if(this.settings.clone == true)  
21 - this.codelite = $('<pre />').text(this.code.text()).addClass('litelighter').insertAfter(this.code.css('display','none'));  
22 -  
23 - if(this.code.data('lllanguage'))  
24 - this.settings.language = this.code.data('lllanguage');  
25 - if(this.code.data('llstyle'))  
26 - this.settings.style = this.code.data('llstyle');  
27 -  
28 - var style = $.litelighter.styles[this.settings.style],  
29 - lang = $.litelighter.languages[this.settings.language],  
30 - txt = $.litelighter.highlight(this.codelite.html(), style, lang).replace(/\t/g, this.settings.tab);  
31 -  
32 - this.codelite.attr('style', style.code).html(txt);  
33 - return this.code;  
34 - },  
35 - disable: function(){  
36 - if(this.settings.clone){  
37 - this.codelite.remove();  
38 - return this.code.css('display','block');  
39 - }  
40 - return this.code.html('').text(this.code.data('llcode'));  
41 - },  
42 - destroy: function(){  
43 - this.disable();  
44 - return this.code.removeData('litelighter');  
45 - },  
46 - option: function(key, val){  
47 - if(val !== undefined){  
48 - this.code.data('ll'+key, val);  
49 - this.settings[key] = val;  
50 - this.disable();  
51 - return this.enable();  
52 - }  
53 - return this[key];  
54 - }  
55 - });  
56 -  
57 - $.litelighter.lookup = {  
58 - i: 0  
59 - };  
60 -  
61 - $.fn.litelighter = function(o) {  
62 - o = o || {};  
63 - var tmp_args = Array.prototype.slice.call(arguments);  
64 -  
65 - if (typeof(o) == 'string') return this.each(function() {  
66 - var inst = $.litelighter.lookup[$(this).data('litelighter')];  
67 - inst[o].apply(inst, tmp_args.slice(1));  
68 - });  
69 - else return this.each(function() {  
70 - var $t = $(this);  
71 - $.litelighter.lookup[++$.litelighter.lookup.i] = new $.litelighter($t, o);  
72 - $t.data('litelighter', $.litelighter.lookup.i );  
73 - });  
74 - };  
75 -  
76 - $.litelighter.highlight = function(txt, style, lang){  
77 - // recursively do any sub templating...  
78 - var sublangsi = 0,  
79 - sublangs = [];  
80 - for(var i in lang){  
81 - if(lang.hasOwnProperty(i) && lang[i].language !== undefined && $.litelighter.languages[lang[i].language] !== undefined){  
82 - txt = txt.replace(lang[i].re, function($1, $2, $3){  
83 - sublangs[sublangsi++] = $.litelighter.highlight($2, style, $.litelighter.languages[lang[i].language]);  
84 - return $1.replace($2, '___subtmpl'+ (sublangsi-1) +'___');  
85 - });  
86 - }  
87 - }  
88 -  
89 - // do current level templating  
90 - for(var i in lang){  
91 - if(lang.hasOwnProperty(i) && lang[i].language === undefined){  
92 - txt = txt.replace(lang[i].re, "___"+ i +"___$1___end"+ i +"___");  
93 - }  
94 - }  
95 -  
96 - var lvls = [];  
97 - txt = txt.replace(/___(?!subtmpl)\w+?___/g, function($0){  
98 - var end = ($0.substr(3,3)=='end')? true:false,  
99 - tag = (!end? $0.substr(3):$0.substr(6)).replace(/_/g,''),  
100 - lastTag = lvls.length>0? lvls[lvls.length-1] : null;  
101 -  
102 - if(!end && (lastTag == null || tag == lastTag || (lastTag != null && lang[lastTag].embed != undefined && $.inArray(tag,lang[lastTag].embed)>=0 ))){  
103 - lvls.push(tag);  
104 - return $0;  
105 - }  
106 - else if(end && tag == lastTag){  
107 - lvls.pop();  
108 - return $0;  
109 - }  
110 - return "";  
111 - });  
112 - for(var i in lang){  
113 - if(lang.hasOwnProperty(i)){  
114 - txt = txt.replace(new RegExp("___end"+ i +"___","g"), "</span>").replace(new RegExp("___"+ i +"___","g"), "<span class='litelighterstyle' style='"+ style[lang[i].style] +"'>");  
115 - }  
116 - }  
117 -  
118 - // finally replace those sub templates  
119 - for(var i in lang){  
120 - if(lang.hasOwnProperty(i) && lang[i].language !== undefined && $.litelighter.languages[lang[i].language] !== undefined){  
121 - txt = txt.replace(/___subtmpl\d+___/g, function($tmpl){  
122 - var i = parseInt($tmpl.replace(/___subtmpl(\d+)___/, "$1"), 10);  
123 - return sublangs[i];  
124 - });  
125 - }  
126 - }  
127 - return txt;  
128 - };  
129 -  
130 - $.litelighter.styles = {  
131 - light: {  
132 - code: 'background-color:#fafafa;color:#555;',  
133 - comment: 'color:#999',  
134 - string: 'color:#8F9657',  
135 - number: 'color:#CF6745;',  
136 - keyword: 'color:#6F87A8;',  
137 - operators: 'color:#9e771e;'  
138 - },  
139 - dark: {  
140 - code: 'background-color:#141414;color:#ffffff;',  
141 - comment: 'color:#999',  
142 - string: 'color:#8F9657',  
143 - number: 'color:#CF6745;',  
144 - keyword: 'color:#6F87A8;',  
145 - operators: 'color:#fee79e;'  
146 - }  
147 - };  
148 - $.litelighter.languages = {  
149 - generic: {  
150 - comment: { re: /(\/\/.*|\/\*([\s\S]*?)\*\/)/g, style: 'comment' },  
151 - string: { re: /((\'.*?\')|(\".*?\"))/g, style: 'string' },  
152 - numbers: { re: /(\-?(\d+|\d+\.\d+|\.\d+))/g, style: 'number' },  
153 - regex: { re: /([^\/]\/[^\/].+\/(g|i|m)*)/g, style: 'number' },  
154 - keywords: { re: /(?:\b)(function|for|foreach|while|if|else|elseif|switch|break|as|return|this|class|self|default|var|false|true|null|undefined)(?:\b)/gi, style: 'keyword' },  
155 - operators: { re: /(\+|\-|\/|\*|\%|\=|\&lt;|\&gt;|\||\?|\.)/g, style: 'operators' }  
156 - }  
157 - };  
158 - $.litelighter.languages.js = $.litelighter.languages.generic;  
159 - $.litelighter.languages.css = {  
160 - comment: $.litelighter.languages.generic.comment,  
161 - string: $.litelighter.languages.generic.string,  
162 - numbers: { re: /((\-?(\d+|\d+\.\d+|\.\d+)(\%|px|em|pt|in)?)|\#[0-9a-fA-F]{3}[0-9a-fA-F]{3})/g, style: 'number' },  
163 - keywords: { re: /(\@\w+|\:?\:\w+|[a-z\-]+\:)/g, style: 'keyword' }  
164 - };  
165 - $.litelighter.languages.html = {  
166 - comment: { re: /(\&lt\;\!\-\-([\s\S]*?)\-\-\&gt\;)/g, style: 'comment' },  
167 - tag: { re: /(\&lt\;\/?\w(.|\n)*?\/?\&gt\;)/g, style: 'keyword', embed: ['string'] },  
168 - string: $.litelighter.languages.generic.string,  
169 - css: { re: /(?:\&lt;style.*?\&gt;)([\s\S]+?)(?:\&lt;\/style\&gt;)/gi, language: 'css'},  
170 - script: { re: /(?:\&lt;script.*?\&gt;)([\s\S]+?)(?:\&lt;\/script\&gt;)/gi, language: 'js'}  
171 - };  
172 -  
173 -})(window.jQuery || window.Zepto || window.$);  
174 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_demo/!pix/bg.jpg

589 KB

public/javascripts/select-or-die/_demo/index.html
@@ -1,777 +0,0 @@ @@ -1,777 +0,0 @@
1 -<!DOCTYPE html>  
2 -  
3 -<html lang="en">  
4 -<head>  
5 -  
6 - <meta charset="utf-8">  
7 - <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">  
8 - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  
9 -  
10 - <title>Select or Die</title>  
11 -  
12 - <link href='http://fonts.googleapis.com/css?family=Lato:300,700,900' rel='stylesheet' type='text/css'>  
13 - <link href="../_src/selectordie.css" rel="stylesheet" type="text/css">  
14 - <link href="!inc/css/selectordie_theme_02.css" rel="stylesheet" type="text/css">  
15 - <link href="!inc/css/demo.css" rel="stylesheet" type="text/css">  
16 -  
17 - <!-- <script src="!inc/js/jquery-2.1.0.min.js"></script> -->  
18 - <script src="!inc/js/jquery-1.8.0.min.js"></script>  
19 - <script src="!inc/js/jquery.litelighter.js"></script>  
20 - <script src="../_src/selectordie.min.js"></script>  
21 - <script src="!inc/js/demo.js"></script>  
22 -  
23 -</head>  
24 -  
25 -<body>  
26 -  
27 - <section id="cover" class="cover">  
28 -  
29 - <!-- Photo from https://www.flickr.com/photos/nlireland/11833296283/ - Found at http://nos.twnsnd.co/ -->  
30 -  
31 - <select class="well_hello_there" data-placeholder="Select or Die" data-custom-class="cover_sod no_highlight">  
32 - <option value="#intro">What?</option>  
33 - <option value="#config">Config</option>  
34 - <option value="#methods">Methods</option>  
35 - <option value="#download">Download / Usage</option>  
36 - </select>  
37 -  
38 - </section>  
39 -  
40 -  
41 - <section id="intro">  
42 -  
43 - <div class="content">  
44 - <h1>What?</h1>  
45 - <p>Here we go again, yet another jQuery plugin to style <span class="option">&lt;select&gt;</span> elements. That's pretty much it. Scroll down and take a look if it might be something for you.</p>  
46 - </div>  
47 -  
48 - </section>  
49 -  
50 -  
51 - <section id="config">  
52 -  
53 - <div class="content">  
54 - <header>  
55 - <h1>Config</h1>  
56 - <p>A couple of configurable options to use with Select or Die (SoD).</p>  
57 - </header>  
58 -  
59 - <table border="0" cellpadding="10" cellspacing="0">  
60 - <thead>  
61 - <tr>  
62 - <th scope="col">Option</th>  
63 - <th scope="col">Type</th>  
64 - <th scope="col">Description</th>  
65 - </tr>  
66 - </thead>  
67 -  
68 - <tbody>  
69 - <tr>  
70 - <td class="option"><a href="#custom" title="customID">customID</a></td>  
71 - <td class="option">string</td>  
72 - <td>  
73 - <div class="hidden option">  
74 - <a href="#custom" title="customID">customID</a> - <span class="type">string</span>  
75 - </div>  
76 - Add a custom class to the SoD element  
77 - </td>  
78 - </tr>  
79 -  
80 - <tr>  
81 - <td class="option"><a href="#custom" title="customClass">customClass</a></td>  
82 - <td class="option">string</td>  
83 - <td>  
84 - <div class="hidden option">  
85 - <a href="#custom" title="customClass">customClass</a> - <span class="type">string</span>  
86 - </div>  
87 - Add a custom class to the SoD element  
88 - </td>  
89 - </tr>  
90 -  
91 - <tr>  
92 - <td class="option"><a href="#placeholder" title="placeholder">placeholder</a></td>  
93 - <td class="option">string</td>  
94 - <td>  
95 - <div class="hidden option">  
96 - <a href="#placeholder" title="placeholder">placeholder</a> - <span class="type">string</span>  
97 - </div>  
98 - Add a placeholder that's show before a selection has been made  
99 - </td>  
100 - </tr>  
101 -  
102 - <tr>  
103 - <td class="option"><a href="#prefix" title="prefix">prefix</a></td>  
104 - <td class="option">string</td>  
105 - <td>  
106 - <div class="hidden option">  
107 - <a href="#prefix" title="prefix">prefix</a> - <span class="type">string</span>  
108 - </div>  
109 - Add a prefix that's always shown before the selected option  
110 - </td>  
111 - </tr>  
112 -  
113 - <tr>  
114 - <td class="option"><a href="#cycle" title="cycle">cycle</a></td>  
115 - <td class="option">boolean</td>  
116 - <td>  
117 - <div class="hidden option">  
118 - <a href="#cycle" title="cycle">cycle</a> - <span class="type">boolean</span>  
119 - </div>  
120 - Keyboard support is always enabled, but if you set this to <span class="option">true</span> the end user will be able to cycle the list of options. Example: when you've reach the bottom of the list and press the down/right arrow key it will jump back up to the first option.  
121 - </td>  
122 - </tr>  
123 -  
124 - <tr>  
125 - <td class="option"><a href="#links" title="links">links</a></td>  
126 - <td class="option">boolean</td>  
127 - <td>  
128 - <div class="hidden option">  
129 - <a href="#links" title="links">links</a> - <span class="type">boolean</span>  
130 - </div>  
131 - Treat the options as links?  
132 - </td>  
133 - </tr>  
134 -  
135 - <tr>  
136 - <td class="option"><a href="#links" title="links">linksExternal</a></td>  
137 - <td class="option">boolean</td>  
138 - <td>  
139 - <div class="hidden option">  
140 - <a href="#links" title="links">links</a> - <span class="type">boolean</span>  
141 - </div>  
142 - Treat the options as external links?  
143 - </td>  
144 - </tr>  
145 -  
146 - <tr>  
147 - <td class="option"><a href="#size" title="size">size</a></td>  
148 - <td class="option">integer</td>  
149 - <td>  
150 - <div class="hidden option">  
151 - <a href="#size" title="size">size</a> - <span class="type">integer</span>  
152 - </div>  
153 - Do you have a long list of options? Set the <span class="option">size</span> to control how many options that's visible in the SoD before the need to scrol  
154 - </td>  
155 - </tr>  
156 -  
157 - <tr>  
158 - <td class="option"><a href="#tabindex" title="tabindex">tabindex</a></td>  
159 - <td class="option">integer</td>  
160 - <td>  
161 - <div class="hidden option">  
162 - <a href="#tabindex" title="tabindex">tabindex</a> - <span class="type">integer</span>  
163 - </div>  
164 - Set a custom tabindex on the SoD  
165 - </td>  
166 - </tr>  
167 -  
168 - <tr>  
169 - <td class="option"><a href="#callback" title="onChange">onChange</a></td>  
170 - <td class="option">function</td>  
171 - <td>  
172 - <div class="hidden option">  
173 - <a href="#callback" title="onChange">onChange</a> - function  
174 - </div>  
175 - Provide a callback that will fire when a selection has been made  
176 - </td>  
177 - </tr>  
178 - </tbody>  
179 - </table>  
180 -  
181 - <p>There's also a couple of public methods available, more about them in the <a href="#methods">methods section</a> further down on the page.</p>  
182 - </div>  
183 -  
184 - </section>  
185 -  
186 -  
187 - <section id="basic">  
188 -  
189 - <div class="content arrow">  
190 - <header>  
191 - <h1>Basic example</h1>  
192 - <p>Apply the plugin and you're good to go.</p>  
193 - </header>  
194 -  
195 - <code>  
196 - <pre>$("select").selectOrDie();</pre>  
197 - </code>  
198 - </div>  
199 -  
200 - <div class="preview">  
201 - <select class="basic">  
202 - <option value="one">One</option>  
203 - <option value="two">Two</option>  
204 - <option value="three">Three</option>  
205 - <optgroup label="Option Group Label">  
206 - <option value="group.one">Option Group.One</option>  
207 - <option value="group.two">Option Group.Two</option>  
208 - </optgroup>  
209 - <option value="four">Four</option>  
210 - <option value="five">Five</option>  
211 - </select>  
212 - </div>  
213 -  
214 - </section>  
215 -  
216 -  
217 - <section id="custom">  
218 -  
219 - <div class="content arrow">  
220 - <header>  
221 - <h1>Custom class/ID</h1>  
222 - <p><span class="option">""</span> by default</p>  
223 - <p>Maybe you have multiple selects on the same page and one should look different, or whatever need you can find for a custom class/ID. In this example we're using a custom class give the SoD a different look.</p>  
224 - </header>  
225 -  
226 - <code>  
227 - <pre>  
228 -$("select").selectOrDie({  
229 - customClass: "custom",  
230 - customID: "custom"  
231 -});</pre>  
232 -  
233 - <p>or</p>  
234 -  
235 - <pre>  
236 -$("select").selectOrDie();  
237 -&lt;select data-custom-id="custom" data-custom-class="custom"&gt;</pre>  
238 - </code>  
239 - </div>  
240 -  
241 - <div class="preview">  
242 - <select class="basic" data-custom-id="custom" data-custom-class="custom">  
243 - <option value="one">One</option>  
244 - <option value="two">Two</option>  
245 - <option value="three">Three</option>  
246 - <optgroup label="Option Group Label">  
247 - <option value="group.one">Option Group.One</option>  
248 - <option value="group.two">Option Group.Two</option>  
249 - </optgroup>  
250 - <option value="four">Four</option>  
251 - <option value="five">Five</option>  
252 - </select>  
253 - </div>  
254 -  
255 - </section>  
256 -  
257 -  
258 - <section id="placeholder">  
259 -  
260 - <div class="content arrow">  
261 - <header>  
262 - <h1>Placeholder</h1>  
263 - <p><span class="option">null</span> by default</p>  
264 - <p>If you feel like adding a placeholder that's displayed before anything is selected. Once a selection has been made the placeholder will be removed until the user clicks the SoD again, then it will be shown until the user makes a new selection or focus is lost on the SoD. The "placeholder" is given the class <span class="option">.sod_placeholder</span></p>  
265 - </header>  
266 -  
267 - <code>  
268 - <pre>  
269 -$("select").selectOrDie({  
270 - placeholder: "Choose a number"  
271 -});</pre>  
272 -  
273 - <p>or</p>  
274 -  
275 - <pre>  
276 -$("select").selectOrDie();  
277 -&lt;select data-placeholder="Choose a number"&gt;</pre>  
278 - </code>  
279 - </div>  
280 -  
281 - <div class="preview">  
282 - <select class="basic" data-placeholder="Choose a number">  
283 - <option value="one">One</option>  
284 - <option value="two">Two</option>  
285 - <option value="three">Three</option>  
286 - <option value="four">Four</option>  
287 - <option value="five">Five</option>  
288 - </select>  
289 - </div>  
290 -  
291 - </section>  
292 -  
293 -  
294 - <section id="prefix">  
295 -  
296 - <div class="content arrow">  
297 - <header>  
298 - <h1>Prefix</h1>  
299 - <p><span class="option">null</span> by default</p>  
300 - <p>Add a prefix that's displayed in front of the selected option. The "prefix" is given the class <span class="option">.sod_prefix</span>,</p>  
301 - </header>  
302 -  
303 - <code>  
304 - <pre>  
305 -$("select").selectOrDie({  
306 - prefix: "Number:"  
307 -});</pre>  
308 -  
309 - <p>or</p>  
310 -  
311 - <pre>  
312 -$("select").selectOrDie();  
313 -&lt;select data-prefix="Number:"&gt;</pre>  
314 - </code>  
315 - </div>  
316 -  
317 - <div class="preview">  
318 - <select class="basic" data-prefix="Number:">  
319 - <option value="one">One</option>  
320 - <option value="two">Two</option>  
321 - <option value="three">Three</option>  
322 - <option value="four">Four</option>  
323 - <option value="five">Five</option>  
324 - </select>  
325 - </div>  
326 -  
327 - </section>  
328 -  
329 -  
330 - <section id="cycle">  
331 -  
332 - <div class="content arrow">  
333 - <header>  
334 - <h1>Keyboard cycle</h1>  
335 - <p><span class="option">false</span> by default</p>  
336 - <p>When enabled it allows the user to cycle the list using his/hers arrow keys.</p>  
337 - </header>  
338 -  
339 - <code>  
340 - <pre>  
341 -$("select").selectOrDie({  
342 - cycle: true  
343 -});</pre>  
344 -  
345 - <p>or</p>  
346 -  
347 - <pre>  
348 -$("select").selectOrDie();  
349 -&lt;select data-cycle="true"&gt;</pre>  
350 - </code>  
351 - </div>  
352 -  
353 - <div class="preview">  
354 - <select class="basic" data-cycle="true">  
355 - <option value="one">One</option>  
356 - <option value="two">Two</option>  
357 - <option value="three">Three</option>  
358 - <option value="four">Four</option>  
359 - <option value="five">Five</option>  
360 - </select>  
361 - </div>  
362 -  
363 - </section>  
364 -  
365 -  
366 - <section id="links">  
367 -  
368 - <div class="content arrow">  
369 - <header>  
370 - <h1>Links / External links</h1>  
371 - <p><span class="option">false</span> by default</p>  
372 - <p>There's two different ways of defining links. By using <span class="option">links</span> the links will open in the same window/tab, if you use <span class="option">linksExternal</span> the links will be opened in a new window/tab.</p>  
373 - <p>You can also define a specific option to act as a link by adding a data attribute to the specific option in the native select. More on that in the <a href="#various">various</a> section below.</p>  
374 - </header>  
375 -  
376 - <code>  
377 - <pre>  
378 -$("select").selectOrDie({  
379 - links: true,  
380 - placeholder: "Go to...",  
381 - customClass: "no_highlight"  
382 -});</pre>  
383 -  
384 - <p>or</p>  
385 -  
386 - <pre>  
387 -$("select").selectOrDie();  
388 -&lt;select data-links="true" data-placeholder="Go to..." data-custom-class="no_highlight"&gt;</pre>  
389 - </code>  
390 - </div>  
391 -  
392 - <div class="preview">  
393 - <select class="basic" data-links="true" data-placeholder="Go to..." data-custom-class="no_highlight">  
394 - <option value="https://github.com/vestman/">GitHub</option>  
395 - <option value="http://dribbble.com/MyBeardAndI/">Dribbble</option>  
396 - <option value="http://twitter.com/MyBeardAndI">Twitter</option>  
397 - </select>  
398 - </div>  
399 -  
400 - </section>  
401 -  
402 -  
403 - <section id="size">  
404 -  
405 - <div class="content arrow">  
406 - <header>  
407 - <h1>Size</h1>  
408 - <p><span class="option">0</span> by default</p>  
409 - <p>The select below consists of 10 options, but since the size is set to 4 it will only show 4 before you have to scroll (or use your up/down keys) to see the rest of the options.</p>  
410 - </header>  
411 -  
412 - <code>  
413 - <pre>  
414 -$("select").selectOrDie({  
415 - size: 5  
416 -});</pre>  
417 -  
418 - <p>or</p>  
419 -  
420 - <pre>  
421 -$("select").selectOrDie();  
422 -&lt;select data-size="5"&gt;</pre>  
423 - </code>  
424 - </div>  
425 -  
426 - <div class="preview">  
427 - <select class="basic" data-size="5">  
428 - <option value="one">One</option>  
429 - <option value="two">Two</option>  
430 - <option value="three">Three</option>  
431 - <option value="four">Four</option>  
432 - <option value="five">Five</option>  
433 - <option value="six">Six</option>  
434 - <option value="seven">Seven</option>  
435 - <option value="eight">Eight</option>  
436 - <option value="Nine">Nine</option>  
437 - <option value="Ten">Ten</option>  
438 - <option value="Eleven">Eleven</option>  
439 - <option value="Twelve">Twelve</option>  
440 - <option value="Thirteen">Thirteen</option>  
441 - <option value="Fourteen">Fourteen</option>  
442 - <option value="Fifteen">Fifteen</option>  
443 - </select>  
444 - </div>  
445 -  
446 - </section>  
447 -  
448 -  
449 - <section id="tabindex">  
450 -  
451 - <div class="content arrow">  
452 - <header>  
453 - <h1>Tabindex</h1>  
454 - <p><span class="option">0</span> by default</p>  
455 - <p>The SoD will grab the <span class="option">tabindex</span> set on the native select, but you can override the default tabindex by specifying a custom one. If no tabindex is set on the native select or no custom tabindex is defined then the tabindex of the SoD will be set to <span class="option">0</span></p>  
456 - </header>  
457 -  
458 - <code>  
459 - <pre>  
460 -$("select").selectOrDie({  
461 - tabindex: 10  
462 -});</pre>  
463 -  
464 - <p>or</p>  
465 -  
466 - <pre>  
467 -$("select").selectOrDie();  
468 -&lt;select data-tabindex="10"&gt;</pre>  
469 - </code>  
470 - </div>  
471 -  
472 - <div class="preview">  
473 - <select class="basic" data-tabindex="10">  
474 - <option value="one">One</option>  
475 - <option value="two">Two</option>  
476 - <option value="three">Three</option>  
477 - <option value="four">Four</option>  
478 - <option value="five">Five</option>  
479 - </select>  
480 - </div>  
481 -  
482 - </section>  
483 -  
484 -  
485 - <section id="callback">  
486 -  
487 - <div class="content arrow">  
488 - <header>  
489 - <h1>Callback</h1>  
490 - <p><span class="option">$.noop</span> by default</p>  
491 - <p>So you want to do something after the user has made a selection? Go ahead.</p>  
492 - </header>  
493 -  
494 - <code>  
495 - <pre>  
496 -$("select").selectOrDie({  
497 - onChange: function() { alert( $(this).val() ) }  
498 -});</pre>  
499 - </code>  
500 - </div>  
501 -  
502 - <div class="preview">  
503 - <select class="callback">  
504 - <option value="one">One</option>  
505 - <option value="two">Two</option>  
506 - <option value="three">Three</option>  
507 - <option value="four">Four</option>  
508 - <option value="five">Five</option>  
509 - </select>  
510 - </div>  
511 -  
512 - </section>  
513 -  
514 -  
515 - <section id="methods">  
516 -  
517 - <div class="content">  
518 - <header>  
519 - <h1>Methods</h1>  
520 - <p>These might come in handy one day. Click the different methods below to see them in action.</p>  
521 - </header>  
522 -  
523 - <table border="0" cellpadding="10" cellspacing="0">  
524 - <thead>  
525 - <tr>  
526 - <th scope="col">Method</th>  
527 - <th scope="col">Description</th>  
528 - </tr>  
529 - </thead>  
530 -  
531 - <tbody>  
532 - <tr>  
533 - <td class="option"><a href="#destroy" title="destroy">destroy</a></td>  
534 - <td>  
535 - <a href="#destroy" class="hidden option" title="destroy">destroy</a>  
536 - Kills the SoD element and restore everything back to normal  
537 - </td>  
538 - </tr>  
539 -  
540 - <tr>  
541 - <td class="option"><a href="#update" title="update">update</a></td>  
542 - <td>  
543 - <a href="#update" class="hidden option" title="update">update</a>  
544 - Update the SoD to reflect changes made to the native <span class="option">&lt;select&gt;</span>  
545 - </td>  
546 - </tr>  
547 -  
548 - <tr>  
549 - <td class="option"><a href="#disable_enable" title="disable">disable</a></td>  
550 - <td>  
551 - <a href="#disable_enable" class="hidden option" title="disable">disable</a>  
552 - Disable the SoD (and the native <span class="option">&lt;select&gt;</span>), an entire option group or an option  
553 - </td>  
554 - </tr>  
555 -  
556 - <tr>  
557 - <td class="option"><a href="#disable_enable" title="enable">enable</a></td>  
558 - <td>  
559 - <a href="#disable_enable" class="hidden option" title="enable">enable</a>  
560 - Enable the SoD (and the native <span class="option">&lt;select&gt;</span>), an entire option group or an option  
561 - </td>  
562 - </tr>  
563 - </tbody>  
564 - </table>  
565 - </div>  
566 -  
567 - </section>  
568 -  
569 -  
570 - <section id="destroy">  
571 -  
572 - <div class="content arrow">  
573 - <header>  
574 - <h1>Destroy</h1>  
575 - <p>Destroy the SoD and remove all traces of it.</p>  
576 - </header>  
577 -  
578 - <div class="actions">  
579 - <span class="trigger" data-method="destroy">  
580 - <span>Destroy</span>  
581 - <span class="hidden">Initiate</span>  
582 - the SoD  
583 - </span>  
584 - </div>  
585 -  
586 - <code>  
587 - <pre>$("select").selectOrDie();</pre>  
588 - </code>  
589 - </div>  
590 -  
591 - <div class="preview">  
592 - <select class="basic">  
593 - <option value="one">One</option>  
594 - <option value="two">Two</option>  
595 - <option value="three">Three</option>  
596 - <option value="four">Four</option>  
597 - <option value="five">Five</option>  
598 - </select>  
599 - </div>  
600 -  
601 - </section>  
602 -  
603 -  
604 - <section id="update">  
605 -  
606 - <div class="content arrow">  
607 - <header>  
608 - <h1>Update</h1>  
609 - <p>Lets say an option have been added to the native <span class="option">&lt;select&gt;</span>, then you might want to update the SoD to reflect the native <span class="option">&lt;select&gt;</span>. Then it's just a matter of running the <span class="option">update</span> method and the SoD will update with the new option.</p>  
610 - </header>  
611 -  
612 - <div class="actions">  
613 - <span class="trigger" data-method="update">Append an option and update the SoD</span>  
614 - </div>  
615 -  
616 - <code>  
617 - <pre>$("select").selectOrDie();</pre>  
618 - </code>  
619 - </div>  
620 -  
621 - <div class="preview">  
622 - <select class="basic">  
623 - <option value="one">One</option>  
624 - <option value="two">Two</option>  
625 - <option value="three">Three</option>  
626 - </select>  
627 - </div>  
628 -  
629 - </section>  
630 -  
631 - <section id="disable_enable">  
632 -  
633 - <div class="content arrow">  
634 - <header>  
635 - <h1>Disable / Enable</h1>  
636 - <p>If you need to disable/enable a SoD or any of its option groups/options manually, then use the <span class="option">disable</span> or <span class="option">enable</span> method.</p>  
637 - </header>  
638 -  
639 - <div class="actions">  
640 - <span class="trigger" data-method="disable">  
641 - <span>Disable</span>  
642 - <span class="hidden">Enable</span>  
643 - the SoD  
644 - </span>  
645 -  
646 - <label for="enable_disable">  
647 - <span class="trigger" data-sub-method="option" data-method="disable">  
648 - <span>Disable</span>  
649 - <span class="hidden">Enable</span>  
650 - option "Three"  
651 - </span>  
652 - </label>  
653 -  
654 - <label for="enable_disable">  
655 - <span class="trigger" data-sub-method="group" data-method="disable">  
656 - <span>Disable</span>  
657 - <span class="hidden">Enable</span>  
658 - optgroup "Option Group Label"  
659 - </span>  
660 - </label>  
661 - </div>  
662 -  
663 - <code>  
664 - <pre>$("select").selectOrDie();</pre>  
665 - </code>  
666 - </div>  
667 -  
668 - <div class="preview">  
669 - <select class="basic" id="enable_disable">  
670 - <option value="one">One</option>  
671 - <option value="two">Two</option>  
672 - <option value="three">Three</option>  
673 - <optgroup label="Option Group Label">  
674 - <option value="group.one">Option Group.One</option>  
675 - <option value="group.two">Option Group.Two</option>  
676 - </optgroup>  
677 - <option value="four">Four</option>  
678 - <option value="five">Five</option>  
679 - </select>  
680 - </div>  
681 -  
682 - </section>  
683 -  
684 -  
685 - <section id="download">  
686 -  
687 - <div class="content">  
688 - <header>  
689 - <h1>Download / Usage</h1>  
690 - </header>  
691 -  
692 - <p>Download the .zip file by clicking the download button below. Once downloaded, unzip it and include the <span class="option">selectordie.css</span> and either of the two <span class="option">.js</span> files found in the "_src" folder. Initialize the plugin, targeting the desired element in the jQuery selector. Just like in the <a href="#basic">basic</a> example above. Then you're all good!</p>  
693 -  
694 - <p class="buttons">  
695 - <a href="https://github.com/vestman/Select-or-Die/archive/master.zip" class="external button">Download</a>  
696 - <a href="https://github.com/vestman/Select-or-Die/fork" class="external button">Fork</a>  
697 - </p>  
698 - </div>  
699 -  
700 - </section>  
701 -  
702 -  
703 - <section id="various">  
704 -  
705 - <div class="content arrow">  
706 - <header>  
707 - <h1>Various</h1>  
708 - </header>  
709 -  
710 - <ul class="list">  
711 - <li>Touch devices triggers the native select element</li>  
712 - <li>SoD will automatically detect a disabled <span class="option">&lt;select&gt;</span>, the same goes for option groups and options</li>  
713 - <li>When in focus (the SoD gets focus when tabbing to it or clicking it) you can use your keys to "search" the SoD, just like a native <span class="option">&lt;select&gt;</span></li>  
714 - <li>Option groups (<span class="option">&lt;optgroup&gt;</span>) are given the class <span class="option">.optgroup</span> and its children the class <span class="option">.groupchild</span></li>  
715 - <li>Options that won't fit the width of the SoD gets automatically truncated</li>  
716 - <li>SoD will detect if any part of the options list is below the user viewport. If it is and it will fit above it will be shown above the SoD</li>  
717 - <li>You can pass a custom class or ID to individual options in the SoD by adding either <span class="option">data-custom-class</span> or <span class="option">data-custom-id</span> to an option in the native select</li>  
718 - <li>You can set a single option to act as a link without using the <a href="#links" title="links">links</a> option. To do so you add either <span class="option">data-link="true"</span> or <span class="option">data-link-external="true"</span> to the specific option in the native select. The <span class="option">data-link-external</span> can also be used to open a specific link in a new window/tab even if the SoD itself is defined as internal links using the <a href="#links">links</a> option.</li>  
719 - <li>If you add the class <span class="option">.no_highlight</span> as a custom class to your SoD then the default check mark highlighting the selected option will not be displayed</li>  
720 - <li><span class="option">&lt;label&gt;</span> elements targeting the native select will set focus on the SoD. Once a SoD has focus the user can press the space bar to open it or use the arrow keys to move around in the SoD. Give it a try: <label for="label_test" class="action">I'm a label</label> for the SoD below</li>  
721 - </ul>  
722 - </div>  
723 -  
724 - <div class="preview">  
725 - <select class="basic" id="label_test">  
726 - <option value="one">Regular option</option>  
727 - <option value="two" disabled="disabled">Disabled option</option>  
728 - <option value="three">Regular option</option>  
729 - <optgroup label="Option Group Label (disabled)" disabled="disabled">  
730 - <option value="group.one">Option Group.One</option>  
731 - <option value="group.two">Option Group.Two</option>  
732 - </optgroup>  
733 - <option value="four">An option that's a bit too long for its own good</option>  
734 - <option value="six" data-custom-class="bones">Custom class option</option>  
735 - <option value="http://www.google.com/" data-link="true">Link option (google.com)</option>  
736 - <option value="http://www.google.com/" data-link-external="true">External link option (google.com)</option>  
737 - </select>  
738 - </div>  
739 -  
740 - </section>  
741 -  
742 - <section id="compability">  
743 -  
744 - <div class="content">  
745 - <header>  
746 - <h1>Compability / Misc</h1>  
747 - <p>I'll try to keep it short.</p>  
748 - </header>  
749 -  
750 - <ul class="list">  
751 - <li>Tested with jQuery v1.8 and jQuery v2.1 and nothing in between (it should work just fine with a version in between the tested versions). Please note that if you use jQuery 2.x IE8 will not be supported, you can read more about this over att the <a class="external" href="http://blog.jquery.com/2013/04/18/jquery-2-0-released/" title="http://blog.jquery.com/2013/04/18/jquery-2-0-released/">jQuery blog</a>.</li>  
752 - <li>Tested in Firefox / Chrome / Safari / Opera / IE8+</li>  
753 - <li>This demo is using <a class="external" href="http://trentrichardson.com/examples/jQuery-Litelighter/" title="http://trentrichardson.com/examples/jQuery-Litelighter/">jQuery Litelighter</a> by Trent Richardson. The jQuery Litelighter is NOT required by Select or Die, it's just used to format the code blocks in this demo.</li>  
754 - <li>Cover photo found over at <a class="external" href="http://nos.twnsnd.co/image/81190207271" title="http://nos.twnsnd.co/image/81190207271">New Old Stock</a></li>  
755 - </ul>  
756 - </div>  
757 -  
758 - </section>  
759 -  
760 - <section id="todo">  
761 -  
762 - <div class="content">  
763 - <header>  
764 - <h1>Todo</h1>  
765 - <p>There's probably a ton of things to do/fix, but here's a couple:</p>  
766 - </header>  
767 -  
768 - <ul class="list">  
769 - <li>Add support for <span class="option">&lt;select multiple&gt;</span></li>  
770 - <li>Fix typos/grammar in this demo. If you spot any, feel free to send me an email.</li>  
771 - </ul>  
772 - </div>  
773 -  
774 - </section>  
775 -  
776 -</body>  
777 -</html>  
778 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_src/selectordie.css
@@ -1,231 +0,0 @@ @@ -1,231 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: selectordie.css  
4 - * Updated: 2014-04-27  
5 - * Created by: Per V @ Vst.mn  
6 - * What?: Base CSS for Select or Die  
7 - *  
8 - * Copyright (c) 2014 Per Vestman  
9 - * Dual licensed under the MIT and GPL licenses.  
10 - *  
11 - * No, I don't usually comment my CSS, but in this  
12 - * case it might "help" someone.  
13 - *  
14 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
15 - * =========================================================== */  
16 -  
17 -/* Remove, change to fit your needs */  
18 -@import url(http://fonts.googleapis.com/css?family=Lato:300,700);  
19 -  
20 -.sod_select,  
21 -.sod_select *  
22 - {  
23 - -webkit-box-sizing: border-box;  
24 - -moz-box-sizing: border-box;  
25 - box-sizing: border-box;  
26 - -webkit-user-select: none;  
27 - -moz-user-select: none;  
28 - -ms-user-select: none;  
29 - }  
30 -  
31 -/* The SoD - Please keep this first three lines intact, otherwise all hell will break looooooose */  
32 -.sod_select  
33 - {  
34 - display: inline-block;  
35 - position: relative;  
36 - line-height: 1;  
37 -  
38 - width: 200px;  
39 - padding: 15px 10px;  
40 - border: 3px solid #5e5e5e;  
41 - background: #ffffff;  
42 - color: #444444;  
43 - font-size: 11px;  
44 - font-weight: 700;  
45 - text-align: left;  
46 - text-transform: uppercase;  
47 - outline: 0;  
48 - outline-offset: -2px; /* Opera */  
49 - cursor: default;  
50 - }  
51 -  
52 - /* Up/Down arrows */  
53 - .sod_select:before,  
54 - .sod_select:after  
55 - {  
56 - content: "\25B2";  
57 - position: absolute;  
58 - right: 10px;  
59 - top: 12px;  
60 - font-size: 7px;  
61 - }  
62 -  
63 - /* Down arrow */  
64 - .sod_select:after  
65 - {  
66 - content: "\25BC";  
67 - top: auto;  
68 - bottom: 12px;  
69 - }  
70 -  
71 - /* Change the border color on hover, focus and when open */  
72 - .sod_select:hover,  
73 - .sod_select.open,  
74 - .sod_select.focus { border-color: #000000; }  
75 -  
76 - .sod_select.open { color: #919191; }  
77 - .sod_select.focus { box-shadow: 0 0 5px rgba(0,0,0,.2); }  
78 -  
79 - /* When the entire SoD is disabled, go crazy! */  
80 - .sod_select.disabled  
81 - {  
82 - border-color: #828282;  
83 - color: #b2b2b2;  
84 - cursor: not-allowed;  
85 - }  
86 -  
87 - /* The "label", or whatever we should call it. Keep the first three lines for truncating. */  
88 - .sod_select .sod_label  
89 - {  
90 - overflow: hidden;  
91 - white-space: nowrap;  
92 - text-overflow: ellipsis;  
93 -  
94 - padding-right: 15px;  
95 - }  
96 -  
97 - .sod_select .sod_prefix { /* Use this if you're using a prefix and want to style it */ }  
98 - .sod_select .sod_placeholder { /* Use this if you're using a placeholder and want to style it */ }  
99 -  
100 -  
101 -  
102 - /* Options list wrapper */  
103 - .sod_select .sod_list  
104 - {  
105 - position: absolute;  
106 - top: 100%;  
107 - left: 0;  
108 - display: none;  
109 - height: auto;  
110 - width: 200px;  
111 - margin: 0 0 0 -3px;  
112 - background: #ffffff;  
113 - border: 3px solid #000000;  
114 - border-top: none;  
115 - color: #444444;  
116 - font-weight: 300;  
117 - z-index: 1;  
118 - }  
119 -  
120 - /* Shows the option list (don't edit) */  
121 - .sod_select.open .sod_list { display: block; }  
122 -  
123 - /* Don't display the options when */  
124 - .sod_select.disabled.open .sod_list { display: none; }  
125 -  
126 - /* When the option list is displayed above the SoD */  
127 - .sod_select.above .sod_list  
128 - {  
129 - top: auto;  
130 - bottom: 100%;  
131 - border-top: 3px solid #000000;  
132 - border-bottom: none;  
133 - }  
134 -  
135 - /* Options list container */  
136 - .sod_select .sod_list ul  
137 - {  
138 - overflow-y: auto;  
139 - padding: 0;  
140 - margin: 0;  
141 - }  
142 -  
143 - /* All the options. Keep the first three lines for truncating... */  
144 - .sod_select .sod_list li  
145 - {  
146 - overflow: hidden;  
147 - white-space: nowrap;  
148 - text-overflow: ellipsis;  
149 -  
150 - position: relative;  
151 - padding: 10px 10px;  
152 - list-style-type: none;  
153 - }  
154 -  
155 - /* Optgroups */  
156 - .sod_select .sod_list .optgroup,  
157 - .sod_select .sod_list .optgroup.disabled  
158 - {  
159 - background: inherit;  
160 - color: #939393;  
161 - font-size: 10px;  
162 - font-style: italic;  
163 - }  
164 -  
165 - /* Children of an optgroup */  
166 - .sod_select .sod_list .groupchild { padding-left: 20px; }  
167 -  
168 - /* Disabled option */  
169 - .sod_select .sod_list .disabled  
170 - {  
171 - background: inherit;  
172 - color: #cccccc;  
173 - }  
174 -  
175 - /* Hover state for options, also used when a user uses his/hers up/down keys */  
176 - .sod_select .sod_list .active  
177 - {  
178 - background: #f7f7f7;  
179 - color: #333333;  
180 - }  
181 -  
182 - /*Make room for the check mark */  
183 - .sod_select .sod_list .selected  
184 - {  
185 - font-weight: 700;  
186 - padding-right: 25px;  
187 - }  
188 -  
189 - /* Displays a check mark for the selected option */  
190 - .sod_select .sod_list .selected:before  
191 - {  
192 - content: "";  
193 - position: absolute;  
194 - right: 10px;  
195 - top: 50%;  
196 - -webkit-transform: translateY(-50%);  
197 - -ms-transform: translateY(-50%);  
198 - transform: translateY(-50%);  
199 - display: inline-block;  
200 - color: #808080;  
201 - height: 9px;  
202 - width: 10px;  
203 - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMTAgOSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTAgOSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBmaWxsPSIjRDlEOUQ4IiBkPSJNNCw2LjdDMy42LDYuMywzLjUsNi4xLDMuMSw1LjdDMi42LDUuMiwyLDQuNiwxLjUsNC4xYy0wLjgtMC44LTIsMC40LTEuMiwxLjJjMC45LDAuOSwxLjksMS45LDIuOCwyLjgNCgkJYzAuNywwLjcsMS4zLDEsMiwwQzYuNyw2LDguMywzLjcsOS44LDEuNUMxMC41LDAuNSw5LTAuMyw4LjMsMC42bDAsMEM2LjcsMi45LDUuNyw0LjQsNCw2LjciLz4NCjwvZz4NCjwvc3ZnPg0K);  
204 - }  
205 -  
206 - /* Add a .no_highlight class to you SoD to hide the check mark and don't bold the option */  
207 - .sod_select.no_highlight .sod_list .selected { font-weight: 300; }  
208 - .sod_select.no_highlight .sod_list .selected:before { display: none; }  
209 -  
210 - .sod_select .sod_list .link { /* If data-link is set on a specific option */ }  
211 - .sod_select .sod_list .linkexternal { /* If data-link-external is set on a specific option */ }  
212 -  
213 -  
214 -  
215 - /* Hide native select */  
216 - .sod_select select { display: none !important; }  
217 -  
218 - /* The native select in touch mode. Keep this first line. Sorry, keep everything. */  
219 - .sod_select.touch select  
220 - {  
221 - -webkit-appearance: menulist-button;  
222 -  
223 - position: absolute;  
224 - top: 0;  
225 - left: 0;  
226 - display: block !important;  
227 - height: 100%;  
228 - width: 100%;  
229 - opacity: 0;  
230 - z-index: 1;  
231 - }  
232 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_src/selectordie.js
@@ -1,563 +0,0 @@ @@ -1,563 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: selectordie.js  
4 - * Updated: 2014-04-28  
5 - * Version: 0.1.3  
6 - * Created by: Per V @ Vst.mn  
7 - * What?: The Select or Die JS  
8 - *  
9 - * Copyright (c) 2014 Per Vestman  
10 - * Dual licensed under the MIT and GPL licenses.  
11 - *  
12 - * To much comments in the code. Please, I know.  
13 - *  
14 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
15 - *  
16 - * =========================================================== */  
17 -  
18 -; (function ($) {  
19 - $.fn.selectOrDie = function (method) {  
20 - "use strict";  
21 -  
22 - var $defaults = {  
23 - customID: null, // String - "" by default - Adds an ID to the SoD  
24 - customClass: "", // String - "" by default - Adds a class to the SoD  
25 - placeholder: null, // String - "" by default - Adds a placeholder that will be shown before a selection has been made  
26 - prefix: null, // String - "" by default - Adds a prefix that always will be shown before the selected value  
27 - cycle: false, // Boolean - false by default - Should keyboard cycle through options or not?  
28 - links: false, // Boolean - false by default - Should the options be treated as links?  
29 - linksExternal: false, // Boolean - false by default - Should the options be treated as links and open in a new window/tab?  
30 - size: 0, // Integer - 0 by default - The value set equals the amount of items before scroll is needed  
31 - tabIndex: 0, // integer - 0 by default  
32 - onChange: $.noop // Adds a callback function for when the SoD gets changed  
33 - },  
34 - $_settings = {},  
35 - $_sodFilterTimeout, $_sodViewportTimeout;  
36 -  
37 - var _private = {  
38 -  
39 - initSoD: function (options) {  
40 - $_settings = $.extend({}, $defaults, options);  
41 -  
42 - return this.each(function (i) {  
43 -  
44 - if ( !$(this).parent().hasClass("sod_select") ) {  
45 - var $select = $(this),  
46 - $settingsId = $_settings.customID ? $_settings.customID : ( $select.data("custom-id") ? $select.data("custom-id") : $_settings.customID ),  
47 - $settingsClass = $_settings.customClass ? $_settings.customClass : ( $select.data("custom-class") ? $select.data("custom-class") : $_settings.customClass ),  
48 - $settingsPrefix = $_settings.prefix ? $_settings.prefix : ( $select.data("prefix") ? $select.data("prefix") : $_settings.prefix ),  
49 - $settingsPlaceholder = $_settings.placeholder ? $_settings.placeholder : ( $select.data("placeholder") ? $select.data("placeholder") : $_settings.placeholder ),  
50 - $settingsCycle = ( $_settings.cycle || $select.data("cycle") ) ? true : $_settings.cycle,  
51 - $settingsLinks = ( $_settings.links || $select.data("links") ) ? true : $_settings.links,  
52 - $settingsLinksExternal = ( $_settings.linksExternal || $select.data("links-external") ) ? true : $_settings.linksExternal,  
53 - $settingsSize = $_settings.size ? $_settings.size : ( $select.data("size") ? $select.data("size") : $_settings.size ),  
54 - $settingsTabIndex = $_settings.tabIndex ? $_settings.tabIndex : ( $select.data("tabindex") ? $select.data("tabindex") : ( $select.attr("tabindex") ? $select.attr("tabindex") : $_settings.tabIndex ) ),  
55 - $selectTitle = $select.prop("title") ? $select.prop("title") : null,  
56 - $selectDisabled = $select.is(":disabled") ? " disabled" : "",  
57 - $sodPrefix = "",  
58 - $sodHtml = "",  
59 - $sodHeight = 0,  
60 - $sod, $sodListWrapper, $sodList;  
61 -  
62 - // If there's a prefix defined  
63 - if ( $settingsPrefix ) {  
64 - $sodPrefix = "<span class=\"sod_prefix\">" + $settingsPrefix + "</span> ";  
65 - }  
66 -  
67 - // If there's a placeholder defined  
68 - if ( $settingsPlaceholder && !$settingsPrefix ) {  
69 - $sodHtml += "<div class=\"sod_label sod_placeholder\">" + $settingsPlaceholder + "</span>";  
70 - } else {  
71 - $sodHtml += "<div class=\"sod_label\">" + $sodPrefix + "</div>";  
72 - }  
73 -  
74 - // Inserts a new element that will act like our new <select>  
75 - $sod = $("<div/>", {  
76 - id: $settingsId,  
77 - "class": "sod_select " + $settingsClass + $selectDisabled,  
78 - title: $selectTitle,  
79 - tabindex: $settingsTabIndex,  
80 - html: $sodHtml,  
81 - "data-cycle": $settingsCycle,  
82 - "data-links": $settingsLinks,  
83 - "data-links-external": $settingsLinksExternal,  
84 - "data-placeholder": $settingsPlaceholder,  
85 - "data-prefix": $settingsPrefix,  
86 - "data-filter": ""  
87 - }).insertAfter( this );  
88 -  
89 - // If it's a touch device  
90 - if ( _private.isTouch() ) {  
91 - $sod.addClass("touch");  
92 - }  
93 -  
94 - // Add a wrapper for the option list  
95 - $sodListWrapper = $("<div/>", {  
96 - "class": "sod_list"  
97 - }).appendTo($sod);  
98 -  
99 - // Inserts a <ul> into our wrapper created above. It will host our <option>:s  
100 - $sodList = $("<ul/>").appendTo($sodListWrapper);  
101 -  
102 - // Inserts a <li> for each <option>  
103 - $("option, optgroup", $select).each(function (i) {  
104 - _private.populateSoD($(this), $sodList, $sod);  
105 - });  
106 -  
107 - // If the setting size is set, then add a max-height to the SoD  
108 - if ( $settingsSize ) {  
109 - // Show the SoD options  
110 - $sodListWrapper.show();  
111 -  
112 - // Calculate a max-height  
113 - $("li:lt(" + $settingsSize + ")", $sodList).each(function (i) {  
114 - $sodHeight += $(this).outerHeight();  
115 - });  
116 -  
117 - // Hide the SoD list wrapper and set a "max-height" to the list itself  
118 - $sodListWrapper.removeAttr("style");  
119 - $sodList.css({"max-height": $sodHeight });  
120 - }  
121 -  
122 - // Move the <select> into the SoD element  
123 - $select.appendTo( $sod );  
124 -  
125 - // Bind events to the SoD  
126 - $sod.on("focusin", _private.focusSod)  
127 - .on("click", _private.triggerSod)  
128 - .on("click", "li", _private.optionClick)  
129 - .on("mousemove", "li", _private.optionHover)  
130 - .on("keydown keypress", _private.keyboardUse);  
131 -  
132 - // Bind change event to the <select>  
133 - $select.on("change", _private.selectChange);  
134 -  
135 - // Blur the SoD when clicking outside it  
136 - $("html").on("click", function() {  
137 - _private.blurSod($sod);  
138 - });  
139 -  
140 - // When a label for the native select is clicked we want to focus the SoD  
141 - $(document).on("click", "label[for='" + $select.attr("id") + "']", function(e) {  
142 - e.preventDefault();  
143 - $sod.focus();  
144 - });  
145 - } else {  
146 - console.log("Select or Die: It looks like the SoD already exists");  
147 - }  
148 -  
149 - });  
150 - }, // initSoD  
151 -  
152 -  
153 - populateSoD: function ($option, $sodList, $sod) {  
154 - var $sodPlaceholder = $sod.data("placeholder"),  
155 - $sodPrefix = $sod.data("prefix"),  
156 - $optionParent = $option.parent(),  
157 - $optionText = $option.text(),  
158 - $optionValue = $option.val(),  
159 - $optionCustomId = $option.data("custom-id") ? $option.data("custom-id") : null,  
160 - $optionCustomClass = $option.data("custom-class") ? $option.data("custom-class") : "",  
161 - $optionIsDisabled = $option.is(":disabled") ? " disabled " : "",  
162 - $optionIsSelected = $option.is(":selected") ? " selected active " : "",  
163 - $optionLink = $option.data("link") ? " link " : "",  
164 - $optionLinkExternal = $option.data("link-external") ? " linkexternal" : "";  
165 -  
166 - // Create <li> for each <option>  
167 - if ( $option.is("option") ) { // If <option>  
168 - $("<li/>", {  
169 - "class": $optionCustomClass + $optionIsDisabled + $optionIsSelected + $optionLink + $optionLinkExternal,  
170 - id: $optionCustomId,  
171 - title: $optionText,  
172 - html: $optionText,  
173 - "data-value": $optionValue  
174 - }).appendTo( $sodList );  
175 -  
176 - // If selected and no placeholder is set, update label  
177 - if ( $optionIsSelected && !$sodPlaceholder || $optionIsSelected && $sodPrefix ) {  
178 - $sod.find(".sod_label").append($optionText);  
179 - }  
180 -  
181 - // Set the SoD data-label (used in the blur event)  
182 - if ( $optionIsSelected && $sodPlaceholder && !$sodPrefix ) {  
183 - $sod.data("label", $sodPlaceholder);  
184 - } else if ( $optionIsSelected ) {  
185 - $sod.data("label", $optionText);  
186 - }  
187 -  
188 - // If child of an <optgroup>  
189 - if ( $optionParent.is("optgroup") ) {  
190 - $sodList.find("li:last").addClass("groupchild");  
191 -  
192 - // If <optgroup> disabled  
193 - if ( $optionParent.is(":disabled") ) {  
194 - $sodList.find("li:last").addClass("disabled");  
195 - }  
196 - }  
197 - } else { // If <<optgroup>  
198 - $("<li/>", {  
199 - "class": "optgroup " + $optionIsDisabled,  
200 - title: $option.prop("label"),  
201 - html: $option.prop("label"),  
202 - "data-label": $option.prop("label")  
203 - }).appendTo( $sodList );  
204 - }  
205 - }, // populateSoD  
206 -  
207 -  
208 - focusSod: function () {  
209 - var $sod = $(this);  
210 -  
211 - // If not disabled we'll add focus and an .active class to enable keyboard  
212 - if ( !$sod.hasClass("disabled") ) {  
213 - $sod.addClass("focus");  
214 - } else {  
215 - _private.blurSod($sod);  
216 - }  
217 - }, // focusSod  
218 -  
219 -  
220 - triggerSod: function (e) {  
221 - e.stopPropagation();  
222 -  
223 - var $sod = $(this),  
224 - $sodList = $sod.find("ul"),  
225 - $sodPlaceholder = $sod.data("placeholder"),  
226 - $optionSelected = $sod.find(".selected");  
227 -  
228 - // Trigger the SoD if it's not disabled, already open or a touch device  
229 - if ( !$sod.hasClass("disabled") && !$sod.hasClass("open") && !$sod.hasClass("touch") ) {  
230 - // Add the .open class to display list  
231 - $sod.addClass("open");  
232 -  
233 - // Close all other SoD's except for the current one  
234 - $(".sod_select").not(this).removeClass("open focus");  
235 -  
236 - // If a placeholder is set, then show it  
237 - if ( $sodPlaceholder && !$sod.data("prefix") ) {  
238 - $sod.find(".sod_label").addClass("sod_placeholder").html($sodPlaceholder);  
239 - }  
240 -  
241 - // Scroll list to selected item  
242 - _private.listScroll($sodList, $optionSelected);  
243 -  
244 - // Check if the option list fits in the viewport  
245 - _private.checkViewport($sod, $sodList);  
246 - } else {  
247 - // Clears viewport check timeout  
248 - clearTimeout($_sodViewportTimeout);  
249 - $sod.removeClass("open above");  
250 - }  
251 - }, // triggerSod  
252 -  
253 -  
254 - keyboardUse: function (e) {  
255 - var $sod = $(this),  
256 - $sodList = $sod.find("ul"),  
257 - $sodOptions = $sod.find("li"),  
258 - $sodLabel = $sod.find(".sod_label"),  
259 - $sodCycle = $sod.data("cycle"),  
260 - $optionActive = $sodOptions.filter(".active"),  
261 - $sodFilterHit, $optionNext, $optionCycle, $scrollList, $scrollOption;  
262 -  
263 - // "Filter" options list using keybaord based input  
264 - if ( e.which !== 0 && e.charCode !== 0 ) {  
265 - // Clears data-filter timeout  
266 - clearTimeout($_sodFilterTimeout);  
267 -  
268 - // Append the data-filter with typed character  
269 - $sod.data("filter", $sod.data("filter") + String.fromCharCode(e.keyCode|e.charCode));  
270 -  
271 - // Check for matches of the typed string  
272 - $sodFilterHit = $sodOptions.filter(function() {  
273 - return $(this).text().toLowerCase().indexOf($sod.data("filter").toLowerCase()) === 0;  
274 - }).not(".disabled, .optgroup").first();  
275 -  
276 - // If the typed value is a hit, then set it to active  
277 - if ( $sodFilterHit.length ) {  
278 - $optionActive.removeClass("active");  
279 - $sodFilterHit.addClass("active");  
280 - _private.listScroll($sodList, $sodFilterHit);  
281 - $sodLabel.get(0).lastChild.nodeValue = $sodFilterHit.text();  
282 - }  
283 -  
284 - // Set a timeout to empty the data-filter  
285 - $_sodFilterTimeout = setTimeout( function() {  
286 - $sod.data("filter", "");  
287 - }, 500);  
288 - }  
289 -  
290 - // Highlight prev/next element if up/down key pressed  
291 - if ( e.which > 36 && e.which < 41 ) {  
292 -  
293 - // Set $optionNext and $optionCycle  
294 - if ( e.which === 37 || e.which === 38 ) { // Left/Up key  
295 - $optionNext = $optionActive.prevAll(":not('.disabled, .optgroup')").first();  
296 - $optionCycle = $sodOptions.not(".disabled, .optgroup").last();  
297 - } else if ( e.which === 39 || e.which === 40 ) { // Right/Down key  
298 - $optionNext = $optionActive.nextAll(":not('.disabled, .optgroup')").first();  
299 - $optionCycle = $sodOptions.not(".disabled, .optgroup").first();  
300 - }  
301 -  
302 - // If there's no option before/after and cycle is enabled  
303 - if ( !$optionNext.is("li") && $sodCycle ) {  
304 - $optionNext = $optionCycle;  
305 - }  
306 -  
307 - // Add .active to the next option, update the label and scroll the list  
308 - if ( $optionNext.is("li") || $sodCycle ) {  
309 - $optionActive.removeClass("active");  
310 - $optionNext.addClass("active");  
311 - $sodLabel.get(0).lastChild.nodeValue = $optionNext.text();  
312 - _private.listScroll($sodList, $optionNext);  
313 - }  
314 -  
315 - // Disables the up/down keys from scrolling the page  
316 - return false;  
317 - } else if ( e.which === 13 || (e.which === 32 && $sod.hasClass("open") && $sod.data("filter") === "") ) { // Enter key or space, simulate click() function  
318 - e.preventDefault();  
319 - $optionActive.click();  
320 - } else if ( e.which === 32 && !$sod.hasClass("open") && $sod.data("filter") === "" ) { // Space bar, Opens the SoD if already closed  
321 - e.preventDefault();  
322 - $sod.click();  
323 - } else if ( e.which === 27 ) { // Esc key, hides dropdown  
324 - _private.blurSod($sod);  
325 - }  
326 - }, // keyboardUse  
327 -  
328 -  
329 - optionHover: function () {  
330 - var $option = $(this);  
331 -  
332 - // Mousemove event on option to make the SoD behave just like a native select  
333 - if ( !$option.hasClass("disabled") && !$option.hasClass("optgroup") ) {  
334 - $option.siblings().removeClass("active").end().addClass("active");  
335 - }  
336 - }, // optionHover  
337 -  
338 -  
339 - optionClick: function (e) {  
340 - e.stopPropagation();  
341 -  
342 - var $clicked = $(this),  
343 - $sod = $clicked.closest(".sod_select"),  
344 - $optionDisabled = $clicked.hasClass("disabled"),  
345 - $optionOptgroup = $clicked.hasClass("optgroup"),  
346 - $optionIndex = $sod.find("li:not('.optgroup')").index(this);  
347 -  
348 - // If not disabled or optgroup  
349 - if ( !$optionDisabled && !$optionOptgroup ) {  
350 - $sod.find(".selected, .sod_placeholder").removeClass("selected sod_placeholder");  
351 - $clicked.addClass("selected");  
352 - $sod.find("select option")[$optionIndex].selected = true;  
353 - $sod.find("select").change();  
354 - }  
355 -  
356 - // Clear viewport check timeout  
357 - clearTimeout($_sodViewportTimeout);  
358 -  
359 - // Hide the list  
360 - $sod.removeClass("open above");  
361 - }, // optionClick  
362 -  
363 -  
364 - selectChange: function () {  
365 - var $select = $(this),  
366 - $optionSelected = $select.find(":selected"),  
367 - $optionText = $optionSelected.text(),  
368 - $sod = $select.closest(".sod_select");  
369 -  
370 - $sod.find(".sod_label").get(0).lastChild.nodeValue = $optionText;  
371 - $sod.data("label", $optionText);  
372 -  
373 - // Triggers the onChange callback  
374 - $_settings.onChange.call(this);  
375 -  
376 - // If $_settings.links, send the user to the URL  
377 - if ( ($sod.data("links") || $optionSelected.data("link")) && !$optionSelected.data("link-external") ) {  
378 - window.location.href = $optionSelected.val();  
379 - } else if ( $sod.data("links-external") || $optionSelected.data("link-external") ) {  
380 - window.open($optionSelected.val(),"_blank");  
381 - }  
382 - }, // selectChange  
383 -  
384 -  
385 - blurSod: function ($sod) {  
386 - if ( $("body").find($sod).length ) {  
387 - var $sodLabel = $sod.data("label"),  
388 - $optionActive = $sod.find(".active"),  
389 - $optionSelected = $sod.find(".selected");  
390 -  
391 - // Clear viewport check timeout  
392 - clearTimeout($_sodViewportTimeout);  
393 -  
394 - // Remove above/open class  
395 - $sod.removeClass("open focus above");  
396 -  
397 - // Restore the select if no change has been made  
398 - if ( !$optionActive.hasClass("selected") ) {  
399 - $sod.find(".sod_label").get(0).lastChild.nodeValue = $sodLabel;  
400 - $optionActive.removeClass("active");  
401 - $optionSelected.addClass("active");  
402 - }  
403 -  
404 - $sod.blur();  
405 - }  
406 - }, // blurSod  
407 -  
408 -  
409 - checkViewport: function ($sod, $sodList) {  
410 - var $sodPosition = $sod[0].getBoundingClientRect(),  
411 - $sodListHeight = $sodList.outerHeight();  
412 -  
413 - // If the list is below the viewport AND fits above, then show it above  
414 - if ( ($sodPosition.bottom + $sodListHeight + 10) > $(window).height() && ($sodPosition.top - $sodListHeight) > 10 ) {  
415 - $sod.addClass("above");  
416 - } else {  
417 - $sod.removeClass("above");  
418 - }  
419 -  
420 - // This was fun, lets do it again and again.  
421 - $_sodViewportTimeout = setTimeout( function() {  
422 - _private.checkViewport($sod, $sodList);  
423 - }, 200);  
424 - }, // checkViewport  
425 -  
426 -  
427 - listScroll: function ($sodList, $option) {  
428 - var $scrollList = $sodList[0].getBoundingClientRect(), // getBoundingClientRect FTW!  
429 - $scrollOption = $option[0].getBoundingClientRect();  
430 -  
431 - // Scroll list up and down  
432 - if ( $scrollList.top > $scrollOption.top ) {  
433 - $sodList.scrollTop($sodList.scrollTop() - $scrollList.top + $scrollOption.top);  
434 - } else if ( $scrollList.bottom < $scrollOption.bottom ) {  
435 - $sodList.scrollTop($sodList.scrollTop() - $scrollList.bottom + $scrollOption.bottom);  
436 - }  
437 - }, // listScroll  
438 -  
439 -  
440 - isTouch: function () {  
441 - return (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));  
442 - } // isTouch  
443 -  
444 - };  
445 -  
446 - var methods = {  
447 -  
448 - destroy: function () {  
449 - return this.each(function (i) {  
450 - var $select = $(this),  
451 - $sod = $select.parent();  
452 -  
453 - // Destroy the SoD  
454 - if ( $sod.hasClass("sod_select") ) {  
455 - // Unbind the change event on the real <select>  
456 - $select.off("change");  
457 -  
458 - // Restore DOM  
459 - $sod.find("div").remove();  
460 - $select.unwrap();  
461 - } else {  
462 - console.log("Select or Die: There's no SoD to destroy");  
463 - }  
464 - });  
465 - }, // destroy  
466 -  
467 -  
468 - update: function () {  
469 - return this.each(function (i) {  
470 - var $select = $(this),  
471 - $sod = $select.parent(),  
472 - $sodList = $sod.find("ul:first");  
473 -  
474 - // Check for the SoD  
475 - if ( $sod.hasClass("sod_select") ) {  
476 - // Empty current list of options in faux <select>  
477 - $sodList.empty();  
478 -  
479 - // Clear the label (but keep prefix)  
480 - $sod.find(".sod_label").get(0).lastChild.nodeValue = "";  
481 -  
482 - // Disable the SoD if the select is disabled  
483 - if ( $select.is(":disabled") ) {  
484 - $sod.addClass("disabled");  
485 - }  
486 -  
487 - // Inserts a <li> for each <option>  
488 - $("option, optgroup", $select).each(function (i) {  
489 - _private.populateSoD($(this), $sodList, $sod);  
490 - });  
491 - } else {  
492 - console.log("Select or Die: There's no SoD to update");  
493 - }  
494 - });  
495 -  
496 - }, // update  
497 -  
498 -  
499 - disable: function ($value) {  
500 - return this.each(function (i) {  
501 - var $select = $(this),  
502 - $sod = $select.parent();  
503 -  
504 - // Check for the SoD  
505 - if ( $sod.hasClass("sod_select") ) {  
506 - if ( typeof $value !== "undefined" ) { // Disable option/optgroup  
507 -  
508 - // Disables the option (and possible children if optgroup) in the SoD  
509 - $sod.find("ul:first li[data-value='" + $value + "']").addClass("disabled");  
510 - $sod.find("ul:first li[data-label='" + $value + "']").nextUntil(":not(.groupchild)").addClass("disabled");  
511 -  
512 - // Disables the option/optgroup in the real <select>  
513 - $("option[value='" + $value + "'], optgroup[label='" + $value + "']", this).prop("disabled", true);  
514 -  
515 - } else if ( $sod.hasClass("sod_select") ) { // Disable select/SoD  
516 - $sod.addClass("disabled");  
517 - $select.prop("disabled", true);  
518 - }  
519 - } else {  
520 - console.log("Select or Die: There's no SoD to disable");  
521 - }  
522 - });  
523 - }, // disable  
524 -  
525 -  
526 - enable: function ($value) {  
527 - return this.each(function (i) {  
528 - var $select = $(this),  
529 - $sod = $select.parent();  
530 -  
531 - // Check for the SoD  
532 - if ( $sod.hasClass("sod_select") ) {  
533 - if ( typeof $value !== "undefined" ) { // Enable option/optgroup  
534 -  
535 - // Enables the option (and possible children if optgroup) in the SoD  
536 - $sod.find("ul:first li[data-value='" + $value + "']").removeClass("disabled");  
537 - $sod.find("ul:first li[data-label='" + $value + "']").nextUntil(":not(.groupchild)").removeClass("disabled");  
538 -  
539 - // Enables the option in the real <select>  
540 - $("option[value='" + $value + "'], optgroup[label='" + $value + "']", this).prop("disabled", false);  
541 -  
542 - } else if ( $sod.hasClass("sod_select") ) { // Enable select/SoD  
543 - $sod.removeClass("disabled");  
544 - $select.prop("disabled", false);  
545 - }  
546 - } else {  
547 - console.log("Select or Die: There's no SoD to enable");  
548 - }  
549 - });  
550 - } // enable  
551 -  
552 - };  
553 -  
554 - if ( methods[method] ) {  
555 - return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));  
556 - } else if ( typeof method === "object" || !method ) {  
557 - return _private.initSoD.apply(this, arguments);  
558 - } else {  
559 - $.error("Select or Die: Oh no! No such method \"" + method + "\" for the SoD instance");  
560 - }  
561 - };  
562 -  
563 -})(jQuery);  
public/javascripts/select-or-die/_src/selectordie.min.js
@@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: selectordie.min.js  
4 - * Updated: 2014-04-28  
5 - * Version: 0.1.3  
6 - * Created by: Per V @ Vst.mn  
7 - * What?: Minified version the Select or Die JS  
8 - *  
9 - * Copyright (c) 2014 Per Vestman  
10 - * Dual licensed under the MIT and GPL licenses.  
11 - *  
12 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
13 - *  
14 - * =========================================================== */  
15 -  
16 -(function(e){e.fn.selectOrDie=function(t){"use strict";var n={customID:null,customClass:"",placeholder:null,prefix:null,cycle:false,links:false,linksExternal:false,size:0,tabIndex:0,onChange:e.noop},r={},i,s;var o={initSoD:function(t){r=e.extend({},n,t);return this.each(function(t){if(!e(this).parent().hasClass("sod_select")){var n=e(this),i=r.customID?r.customID:n.data("custom-id")?n.data("custom-id"):r.customID,s=r.customClass?r.customClass:n.data("custom-class")?n.data("custom-class"):r.customClass,u=r.prefix?r.prefix:n.data("prefix")?n.data("prefix"):r.prefix,a=r.placeholder?r.placeholder:n.data("placeholder")?n.data("placeholder"):r.placeholder,f=r.cycle||n.data("cycle")?true:r.cycle,l=r.links||n.data("links")?true:r.links,c=r.linksExternal||n.data("links-external")?true:r.linksExternal,h=r.size?r.size:n.data("size")?n.data("size"):r.size,p=r.tabIndex?r.tabIndex:n.data("tabindex")?n.data("tabindex"):n.attr("tabindex")?n.attr("tabindex"):r.tabIndex,d=n.prop("title")?n.prop("title"):null,v=n.is(":disabled")?" disabled":"",m="",g="",y=0,b,w,E;if(u){m='<span class="sod_prefix">'+u+"</span> "}if(a&&!u){g+='<div class="sod_label sod_placeholder">'+a+"</span>"}else{g+='<div class="sod_label">'+m+"</div>"}b=e("<div/>",{id:i,"class":"sod_select "+s+v,title:d,tabindex:p,html:g,"data-cycle":f,"data-links":l,"data-links-external":c,"data-placeholder":a,"data-prefix":u,"data-filter":""}).insertAfter(this);if(o.isTouch()){b.addClass("touch")}w=e("<div/>",{"class":"sod_list"}).appendTo(b);E=e("<ul/>").appendTo(w);e("option, optgroup",n).each(function(t){o.populateSoD(e(this),E,b)});if(h){w.show();e("li:lt("+h+")",E).each(function(t){y+=e(this).outerHeight()});w.removeAttr("style");E.css({"max-height":y})}n.appendTo(b);b.on("focusin",o.focusSod).on("click",o.triggerSod).on("click","li",o.optionClick).on("mousemove","li",o.optionHover).on("keydown keypress",o.keyboardUse);n.on("change",o.selectChange);e("html").on("click",function(){o.blurSod(b)});e(document).on("click","label[for='"+n.attr("id")+"']",function(e){e.preventDefault();b.focus()})}else{console.log("Select or Die: It looks like the SoD already exists")}})},populateSoD:function(t,n,r){var i=r.data("placeholder"),s=r.data("prefix"),o=t.parent(),u=t.text(),a=t.val(),f=t.data("custom-id")?t.data("custom-id"):null,l=t.data("custom-class")?t.data("custom-class"):"",c=t.is(":disabled")?" disabled ":"",h=t.is(":selected")?" selected active ":"",p=t.data("link")?" link ":"",d=t.data("link-external")?" linkexternal":"";if(t.is("option")){e("<li/>",{"class":l+c+h+p+d,id:f,title:u,html:u,"data-value":a}).appendTo(n);if(h&&!i||h&&s){r.find(".sod_label").append(u)}if(h&&i&&!s){r.data("label",i)}else if(h){r.data("label",u)}if(o.is("optgroup")){n.find("li:last").addClass("groupchild");if(o.is(":disabled")){n.find("li:last").addClass("disabled")}}}else{e("<li/>",{"class":"optgroup "+c,title:t.prop("label"),html:t.prop("label"),"data-label":t.prop("label")}).appendTo(n)}},focusSod:function(){var t=e(this);if(!t.hasClass("disabled")){t.addClass("focus")}else{o.blurSod(t)}},triggerSod:function(t){t.stopPropagation();var n=e(this),r=n.find("ul"),i=n.data("placeholder"),u=n.find(".selected");if(!n.hasClass("disabled")&&!n.hasClass("open")&&!n.hasClass("touch")){n.addClass("open");e(".sod_select").not(this).removeClass("open focus");if(i&&!n.data("prefix")){n.find(".sod_label").addClass("sod_placeholder").html(i)}o.listScroll(r,u);o.checkViewport(n,r)}else{clearTimeout(s);n.removeClass("open above")}},keyboardUse:function(t){var n=e(this),r=n.find("ul"),s=n.find("li"),u=n.find(".sod_label"),a=n.data("cycle"),f=s.filter(".active"),l,c,h,p,d;if(t.which!==0&&t.charCode!==0){clearTimeout(i);n.data("filter",n.data("filter")+String.fromCharCode(t.keyCode|t.charCode));l=s.filter(function(){return e(this).text().toLowerCase().indexOf(n.data("filter").toLowerCase())===0}).not(".disabled, .optgroup").first();if(l.length){f.removeClass("active");l.addClass("active");o.listScroll(r,l);u.get(0).lastChild.nodeValue=l.text()}i=setTimeout(function(){n.data("filter","")},500)}if(t.which>36&&t.which<41){if(t.which===37||t.which===38){c=f.prevAll(":not('.disabled, .optgroup')").first();h=s.not(".disabled, .optgroup").last()}else if(t.which===39||t.which===40){c=f.nextAll(":not('.disabled, .optgroup')").first();h=s.not(".disabled, .optgroup").first()}if(!c.is("li")&&a){c=h}if(c.is("li")||a){f.removeClass("active");c.addClass("active");u.get(0).lastChild.nodeValue=c.text();o.listScroll(r,c)}return false}else if(t.which===13||t.which===32&&n.hasClass("open")&&n.data("filter")===""){t.preventDefault();f.click()}else if(t.which===32&&!n.hasClass("open")&&n.data("filter")===""){t.preventDefault();n.click()}else if(t.which===27){o.blurSod(n)}},optionHover:function(){var t=e(this);if(!t.hasClass("disabled")&&!t.hasClass("optgroup")){t.siblings().removeClass("active").end().addClass("active")}},optionClick:function(t){t.stopPropagation();var n=e(this),r=n.closest(".sod_select"),i=n.hasClass("disabled"),o=n.hasClass("optgroup"),u=r.find("li:not('.optgroup')").index(this);if(!i&&!o){r.find(".selected, .sod_placeholder").removeClass("selected sod_placeholder");n.addClass("selected");r.find("select option")[u].selected=true;r.find("select").change()}clearTimeout(s);r.removeClass("open above")},selectChange:function(){var t=e(this),n=t.find(":selected"),i=n.text(),s=t.closest(".sod_select");s.find(".sod_label").get(0).lastChild.nodeValue=i;s.data("label",i);r.onChange.call(this);if((s.data("links")||n.data("link"))&&!n.data("link-external")){window.location.href=n.val()}else if(s.data("links-external")||n.data("link-external")){window.open(n.val(),"_blank")}},blurSod:function(t){if(e("body").find(t).length){var n=t.data("label"),r=t.find(".active"),i=t.find(".selected");clearTimeout(s);t.removeClass("open focus above");if(!r.hasClass("selected")){t.find(".sod_label").get(0).lastChild.nodeValue=n;r.removeClass("active");i.addClass("active")}t.blur()}},checkViewport:function(t,n){var r=t[0].getBoundingClientRect(),i=n.outerHeight();if(r.bottom+i+10>e(window).height()&&r.top-i>10){t.addClass("above")}else{t.removeClass("above")}s=setTimeout(function(){o.checkViewport(t,n)},200)},listScroll:function(e,t){var n=e[0].getBoundingClientRect(),r=t[0].getBoundingClientRect();if(n.top>r.top){e.scrollTop(e.scrollTop()-n.top+r.top)}else if(n.bottom<r.bottom){e.scrollTop(e.scrollTop()-n.bottom+r.bottom)}},isTouch:function(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}};var u={destroy:function(){return this.each(function(t){var n=e(this),r=n.parent();if(r.hasClass("sod_select")){n.off("change");r.find("div").remove();n.unwrap()}else{console.log("Select or Die: There's no SoD to destroy")}})},update:function(){return this.each(function(t){var n=e(this),r=n.parent(),i=r.find("ul:first");if(r.hasClass("sod_select")){i.empty();r.find(".sod_label").get(0).lastChild.nodeValue="";if(n.is(":disabled")){r.addClass("disabled")}e("option, optgroup",n).each(function(t){o.populateSoD(e(this),i,r)})}else{console.log("Select or Die: There's no SoD to update")}})},disable:function(t){return this.each(function(n){var r=e(this),i=r.parent();if(i.hasClass("sod_select")){if(typeof t!=="undefined"){i.find("ul:first li[data-value='"+t+"']").addClass("disabled");i.find("ul:first li[data-label='"+t+"']").nextUntil(":not(.groupchild)").addClass("disabled");e("option[value='"+t+"'], optgroup[label='"+t+"']",this).prop("disabled",true)}else if(i.hasClass("sod_select")){i.addClass("disabled");r.prop("disabled",true)}}else{console.log("Select or Die: There's no SoD to disable")}})},enable:function(t){return this.each(function(n){var r=e(this),i=r.parent();if(i.hasClass("sod_select")){if(typeof t!=="undefined"){i.find("ul:first li[data-value='"+t+"']").removeClass("disabled");i.find("ul:first li[data-label='"+t+"']").nextUntil(":not(.groupchild)").removeClass("disabled");e("option[value='"+t+"'], optgroup[label='"+t+"']",this).prop("disabled",false)}else if(i.hasClass("sod_select")){i.removeClass("disabled");r.prop("disabled",false)}}else{console.log("Select or Die: There's no SoD to enable")}})}};if(u[t]){return u[t].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof t==="object"||!t){return o.initSoD.apply(this,arguments)}else{e.error('Select or Die: Oh no! No such method "'+t+'" for the SoD instance')}}})(jQuery)  
17 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_themes/selectordie_theme_01.css
@@ -1,255 +0,0 @@ @@ -1,255 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: selectordie_theme_01.css  
4 - * Updated: 2014-04-26  
5 - * Created by: Per V @ Vst.mn  
6 - * What?: Custom "theme" for Select or Die  
7 - * To use this theme, include this file  
8 - * instead of the .selectordie.css file  
9 - *  
10 - *  
11 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
12 - * =========================================================== */  
13 -  
14 -/* Remove, change to fit your needs */  
15 -@import url(http://fonts.googleapis.com/css?family=Lato:300,700);  
16 -  
17 -.sod_select,  
18 -.sod_select *  
19 - {  
20 - -webkit-box-sizing: border-box;  
21 - -moz-box-sizing: border-box;  
22 - box-sizing: border-box;  
23 - -webkit-user-select: none;  
24 - -moz-user-select: none;  
25 - -ms-user-select: none;  
26 - }  
27 -  
28 -/* The SoD - Please keep this first three lines intact, otherwise all hell will break looooooose */  
29 -.sod_select  
30 - {  
31 - display: inline-block;  
32 - position: relative;  
33 - line-height: 1;  
34 -  
35 - width: 200px;  
36 - padding: 13px 10px;  
37 -  
38 - background-color: #ffffff;  
39 - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iaGF0MCIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giIHgxPSI1MCUiIHkxPSIxMDAlIiB4Mj0iNTAlIiB5Mj0iLTEuNDIxMDg1NDcxNTIwMmUtMTQlIj4KPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y3ZjdmNyIgc3RvcC1vcGFjaXR5PSIxIi8+CjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgIDwvbGluZWFyR3JhZGllbnQ+Cgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgZmlsbD0idXJsKCNoYXQwKSIgLz4KPC9zdmc+);  
40 - background-image: -moz-linear-gradient(bottom, #f7f7f7 0%, #fff 100%);  
41 - background-image: -o-linear-gradient(bottom, #f7f7f7 0%, #fff 100%);  
42 - background-image: -webkit-linear-gradient(bottom, #f7f7f7 0%, #fff 100%);  
43 - background-image: linear-gradient(bottom, #f7f7f7 0%, #fff 100%);  
44 - -webkit-background-clip: padding-box;  
45 - -moz-background-clip: padding;  
46 - background-clip: padding-box;  
47 - border: 1px solid #dbdbdb;  
48 - border-radius: 3px;  
49 - color: #797979;  
50 - font-size: 12px;  
51 - font-weight: 700;  
52 - text-align: left;  
53 - text-transform: none;  
54 - outline: 0;  
55 - outline-offset: -2px; /* Opera */  
56 - cursor: default;  
57 - }  
58 -  
59 - /* Up/Down arrows */  
60 - .sod_select:before,  
61 - .sod_select:after  
62 - {  
63 - content: "";  
64 - position: absolute;  
65 - right: 30px;  
66 - top: 0;  
67 - bottom: 0;  
68 - border-left: 1px solid #dbdbdb;  
69 - }  
70 -  
71 - /* Down arrow */  
72 - .sod_select:after  
73 - {  
74 - content: "\25BC";  
75 - right: 12px;  
76 - top: 15px;  
77 - border-left: none;  
78 - color: #bbbbbb;  
79 - font-size: 8px;  
80 - }  
81 -  
82 - /* Change the border color on hover, focus and when open */  
83 - .sod_select:hover,  
84 - .sod_select.focus,  
85 - .sod_select.disabled,  
86 - .sod_select.disabled:hover  
87 - {  
88 - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iaGF0MCIgZ3JhZGllbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giIHgxPSI1MCUiIHkxPSIxMDAlIiB4Mj0iNTAlIiB5Mj0iLTEuNDIxMDg1NDcxNTIwMmUtMTQlIj4KPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2YxZjFmMSIgc3RvcC1vcGFjaXR5PSIwLjc1Ii8+CjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmNmYyIgc3RvcC1vcGFjaXR5PSIwLjc1Ii8+CiAgIDwvbGluZWFyR3JhZGllbnQ+Cgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgZmlsbD0idXJsKCNoYXQwKSIgLz4KPC9zdmc+);  
89 - background-image: -moz-linear-gradient(bottom, rgba(241,241,241,.75) 0%, rgba(255,252,252,.75) 100%);  
90 - background-image: -o-linear-gradient(bottom, rgba(241,241,241,.75) 0%, rgba(255,252,252,.75) 100%);  
91 - background-image: -webkit-linear-gradient(bottom, rgba(241,241,241,.75) 0%, rgba(255,252,252,.75) 100%);  
92 - background-image: linear-gradient(bottom, rgba(241,241,241,.75) 0%, rgba(255,252,252,.75) 100%);  
93 - border-color: #d4d4d4;  
94 - }  
95 -  
96 - .sod_select.focus { box-shadow: 0 0 2px rgba(0,0,0,.1); }  
97 -  
98 - .sod_select.open  
99 - {  
100 - border-radius: 3px 3px 0 0;  
101 - color: #919191;  
102 - }  
103 -  
104 - .sod_select.open.above { border-radius: 0 0 3px 3px; }  
105 -  
106 - /* When the entire SoD is disabled, go crazy! */  
107 - .sod_select.disabled,  
108 - .sod_select.disabled:hover  
109 - {  
110 - opacity: .8;  
111 - color: #b2b2b2;  
112 - cursor: not-allowed;  
113 - }  
114 -  
115 - /* The "label", or whatever we should call it. Keep the first three lines for truncating. */  
116 - .sod_select .sod_label  
117 - {  
118 - overflow: hidden;  
119 - white-space: nowrap;  
120 - text-overflow: ellipsis;  
121 -  
122 - padding-right: 25px;  
123 - }  
124 -  
125 - .sod_select .sod_prefix { /* Use this if you're using a prefix and want to style it */ }  
126 - .sod_select .sod_placeholder { /* Use this if you're using a placeholder and want to style it */ }  
127 -  
128 -  
129 -  
130 - /* Options list wrapper */  
131 - .sod_select .sod_list  
132 - {  
133 - position: absolute;  
134 - top: 100%;  
135 - left: 0;  
136 - display: none;  
137 - height: auto;  
138 - width: 200px;  
139 - margin: 0 0 0 -1px;  
140 - border: 1px solid #dbdbdb;  
141 - border-radius: 0 0 3px 3px;  
142 - box-shadow: 1px 2px 5px rgba(0,0,0,.1);  
143 - background: #ffffff;  
144 - color: #676767;  
145 - font-weight: 300;  
146 - z-index: 1;  
147 - }  
148 -  
149 - /* Shows the option list (don't edit) */  
150 - .sod_select.open .sod_list { display: block; }  
151 -  
152 - /* Don't display the options when */  
153 - .sod_select.disabled.open .sod_list { display: none; }  
154 -  
155 - /* When the option list is displayed above the SoD */  
156 - .sod_select.above .sod_list  
157 - {  
158 - top: auto;  
159 - bottom: 100%;  
160 - border-radius: 3px 3px 0 0;  
161 - box-shadow: 1px -2px 5px rgba(0,0,0,.1);  
162 - }  
163 -  
164 -  
165 - /* Options list container */  
166 - .sod_select .sod_list ul  
167 - {  
168 - overflow-y: auto;  
169 - padding: 0;  
170 - margin: 0;  
171 - }  
172 -  
173 - /* All the options. Keep the first three lines for truncating... */  
174 - .sod_select .sod_list li  
175 - {  
176 - overflow: hidden;  
177 - white-space: nowrap;  
178 - text-overflow: ellipsis;  
179 -  
180 - position: relative;  
181 - padding: 10px 10px 10px 25px;  
182 - list-style-type: none;  
183 - }  
184 -  
185 - /* Optgroups */  
186 - .sod_select .sod_list .optgroup,  
187 - .sod_select .sod_list .optgroup.disabled  
188 - {  
189 - background: inherit;  
190 - color: #939393;  
191 - font-size: 11px;  
192 - font-style: italic;  
193 - }  
194 -  
195 - /* Children of an optgroup */  
196 - .sod_select .sod_list .groupchild { padding-left: 35px; }  
197 -  
198 - /* Disabled option */  
199 - .sod_select .sod_list .disabled  
200 - {  
201 - background: inherit;  
202 - color: #cccccc;  
203 - }  
204 -  
205 - /* Hover state for options, also used when a user uses his/hers up/down keys */  
206 - .sod_select .sod_list .active  
207 - {  
208 - background: #366fb5;  
209 - color: #ffffff;  
210 - }  
211 -  
212 - /*Make room for the check mark */  
213 - .sod_select .sod_list .selected { font-weight: 700; }  
214 -  
215 - /* Displays a check mark for the selected option */  
216 - .sod_select .sod_list .selected:before  
217 - {  
218 - content: "";  
219 - position: absolute;  
220 - left: 10px;  
221 - top: 50%;  
222 - -webkit-transform: translateY(-50%);  
223 - -ms-transform: translateY(-50%);  
224 - transform: translateY(-50%);  
225 - display: inline-block;  
226 - color: #808080;  
227 - height: 9px;  
228 - width: 10px;  
229 - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMTAgOSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTAgOSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBmaWxsPSIjRDlEOUQ4IiBkPSJNNCw2LjdDMy42LDYuMywzLjUsNi4xLDMuMSw1LjdDMi42LDUuMiwyLDQuNiwxLjUsNC4xYy0wLjgtMC44LTIsMC40LTEuMiwxLjJjMC45LDAuOSwxLjksMS45LDIuOCwyLjgNCgkJYzAuNywwLjcsMS4zLDEsMiwwQzYuNyw2LDguMywzLjcsOS44LDEuNUMxMC41LDAuNSw5LTAuMyw4LjMsMC42bDAsMEM2LjcsMi45LDUuNyw0LjQsNCw2LjciLz4NCjwvZz4NCjwvc3ZnPg0K);  
230 - }  
231 -  
232 - /* Add a .no_highlight class to you SoD to hide the check mark */  
233 - .sod_select.no_highlight .sod_list .selected:before { display: none; }  
234 -  
235 - .sod_select .sod_list .link { /* If data-link is set on a specific option */ }  
236 - .sod_select .sod_list .linkexternal { /* If data-link-external is set on a specific option */ }  
237 -  
238 -  
239 - /* Hide native select */  
240 - .sod_select select { display: none !important; }  
241 -  
242 - /* The native select in touch mode. Keep this first line. Sorry, keep everything. */  
243 - .sod_select.touch select  
244 - {  
245 - -webkit-appearance: menulist-button;  
246 -  
247 - position: absolute;  
248 - top: 0;  
249 - left: 0;  
250 - display: block !important;  
251 - height: 100%;  
252 - width: 100%;  
253 - opacity: 0;  
254 - z-index: 1;  
255 - }  
256 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_themes/selectordie_theme_02.css
@@ -1,295 +0,0 @@ @@ -1,295 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: selectordie_theme_02.css  
4 - * Updated: 2014-04-27  
5 - * Created by: Per V @ Vst.mn  
6 - * What?: Custom "theme" for Select or Die  
7 - * To use this theme, include this file  
8 - * instead of the .selectordie.css file  
9 - *  
10 - *  
11 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
12 - * =========================================================== */  
13 -  
14 -/* Remove, change to fit your needs */  
15 -@import url(http://fonts.googleapis.com/css?family=Lato:300,700);  
16 -  
17 -.sod_select,  
18 -.sod_select *  
19 - {  
20 - -webkit-box-sizing: border-box;  
21 - -moz-box-sizing: border-box;  
22 - box-sizing: border-box;  
23 - -webkit-user-select: none;  
24 - -moz-user-select: none;  
25 - -ms-user-select: none;  
26 - }  
27 -  
28 -/* The SoD - Please keep this first three lines intact, otherwise all hell will break looooooose */  
29 -.sod_select  
30 - {  
31 - display: inline-block;  
32 - position: relative;  
33 - line-height: 1;  
34 -  
35 - width: 200px;  
36 - padding: 13px 10px;  
37 - background: #fcfcfc;  
38 - border: 1px solid #d4d4d4;  
39 - box-shadow: inset 0 -1px 2px rgba(0,0,0,.05);  
40 - border-radius: 3px;  
41 - color: #808080;  
42 - font-size: 12px;  
43 - font-weight: 700;  
44 - text-align: left;  
45 - text-transform: none;  
46 - outline: 0;  
47 - outline-offset: -2px; /* Opera */  
48 - cursor: default;  
49 - }  
50 -  
51 - /* Up/Down arrows */  
52 - .sod_select:before,  
53 - .sod_select:after  
54 - {  
55 - content: "";  
56 - position: absolute;  
57 - right: 30px;  
58 - top: 10px;  
59 - bottom: 10px;  
60 - border-left: 1px solid #e5e5e5;  
61 - }  
62 -  
63 - /* Down arrow */  
64 - .sod_select:after  
65 - {  
66 - content: "\25BC";  
67 - right: 12px;  
68 - top: 16px;  
69 - border-left: none;  
70 - font-size: 7px;  
71 - }  
72 - .sod_select.above:after { content: "\25B2"; }  
73 -  
74 - /* Change the border color on hover, focus and when open */  
75 - .sod_select:hover,  
76 - .sod_select.open,  
77 - .sod_select.focus  
78 - {  
79 - background: #ffffff;  
80 - border-color: #d4d4d4;  
81 - }  
82 -  
83 - .sod_select.open { color: #919191; }  
84 - .sod_select.focus { box-shadow: inset 0 -1px 2px rgba(0,0,0,.05), 0 0 5px rgba(0,0,0,.1); }  
85 -  
86 - /* When the entire SoD is disabled, go crazy! */  
87 - .sod_select.disabled  
88 - {  
89 - border-color: #d4d4d4;  
90 - color: #b2b2b2;  
91 - cursor: not-allowed;  
92 - }  
93 -  
94 - .sod_select.disabled:hover { background: #fcfcfc; }  
95 -  
96 - /* The "label", or whatever we should call it. Keep the first three lines for truncating. */  
97 - .sod_select .sod_label  
98 - {  
99 - overflow: hidden;  
100 - white-space: nowrap;  
101 - text-overflow: ellipsis;  
102 -  
103 - padding-right: 15px;  
104 - }  
105 -  
106 - .sod_select .sod_prefix { /* Use this if you're using a prefix and want to style it */ }  
107 - .sod_select .sod_placeholder { /* Use this if you're using a placeholder and want to style it */ }  
108 -  
109 -  
110 -  
111 - /* Options list wrapper */  
112 - .sod_select .sod_list  
113 - {  
114 - position: absolute;  
115 - top: 100%;  
116 - left: 0;  
117 - display: none;  
118 - height: auto;  
119 - width: 200px;  
120 - margin: 10px 0 0 -1px;  
121 - border: 1px solid #d4d4d4;  
122 - border-radius: 3px;  
123 - box-shadow: 0 2px 4px rgba(0,0,0,.1);  
124 - background: #ffffff;  
125 - color: #808080;  
126 - font-weight: 300;  
127 - z-index: 1;  
128 - }  
129 -  
130 - /* Shows the option list (don't edit) */  
131 - .sod_select.open .sod_list { display: block; }  
132 -  
133 - /* Don't display the options when */  
134 - .sod_select.disabled.open .sod_list { display: none; }  
135 -  
136 - /* When the option list is displayed above the SoD */  
137 - .sod_select.above .sod_list  
138 - {  
139 - top: auto;  
140 - bottom: 100%;  
141 - margin: 0 0 10px -1px;  
142 - border: 1px solid #d4d4d4;  
143 - box-shadow: 0 -2px 4px rgba(0,0,0,.1);  
144 - }  
145 -  
146 - /* Arrow(s) displayed when the SoD is active, only in this "theme" */  
147 - .sod_select .sod_list:after,  
148 - .sod_select .sod_list:before  
149 - {  
150 - content: "";  
151 - position: absolute;  
152 - bottom: 100%;  
153 - right: 10px;  
154 - border: solid transparent;  
155 - height: 0;  
156 - width: 0;  
157 - pointer-events: none;  
158 - }  
159 -  
160 - .sod_select.above .sod_list:after,  
161 - .sod_select.above .sod_list:before  
162 - {  
163 - top: 100%;  
164 - bottom: auto;  
165 - }  
166 -  
167 - .sod_select .sod_list:after  
168 - {  
169 - border-color: rgba(255, 255, 255, 0);  
170 - border-bottom-color: #ffffff;  
171 - border-width: 6px;  
172 - }  
173 -  
174 - .sod_select.above .sod_list:after  
175 - {  
176 - border-color: rgba(255, 255, 255, 0);  
177 - border-top-color: #ffffff;  
178 - }  
179 -  
180 - .sod_select .sod_list:before  
181 - {  
182 - margin-right: -2px;  
183 - border-color: rgba(212, 212, 212, 0);  
184 - border-bottom-color: #d4d4d4;  
185 - border-width: 8px;  
186 - }  
187 -  
188 - .sod_select.above .sod_list:before  
189 - {  
190 - border-color: rgba(255, 255, 255, 0);  
191 - border-top-color: #d4d4d4;  
192 - }  
193 -  
194 -  
195 - /* Options list container */  
196 - .sod_select .sod_list ul  
197 - {  
198 - overflow-y: auto;  
199 - padding: 0 4px;  
200 - margin: 4px 0;  
201 - border-radius: 3px;  
202 - }  
203 -  
204 - /* All the options. Keep the first three lines for truncating... */  
205 - .sod_select .sod_list li  
206 - {  
207 - overflow: hidden;  
208 - white-space: nowrap;  
209 - text-overflow: ellipsis;  
210 -  
211 - position: relative;  
212 - padding: 10px;  
213 - list-style-type: none;  
214 - border-bottom: 1px solid #f7f7f7;  
215 - }  
216 -  
217 - /* Remove the bottom border from the last item */  
218 - .sod_select .sod_list li:last-child { border-bottom: none; }  
219 -  
220 - /* Optgroups */  
221 - .sod_select .sod_list .optgroup,  
222 - .sod_select .sod_list .optgroup.disabled  
223 - {  
224 - background: inherit;  
225 - color: #939393;  
226 - font-size: 10px;  
227 - font-style: italic;  
228 - }  
229 -  
230 - /* Children of an optgroup */  
231 - .sod_select .sod_list .groupchild { padding-left: 20px; }  
232 -  
233 - /* Disabled option */  
234 - .sod_select .sod_list .disabled  
235 - {  
236 - background: inherit;  
237 - color: #cccccc;  
238 - }  
239 -  
240 - /* Hover state for options, also used when a user uses his/hers up/down keys */  
241 - .sod_select .sod_list .active  
242 - {  
243 - background: #f7f7f7;  
244 - border-radius: 3px;  
245 - color: #676767;  
246 - }  
247 -  
248 - /*Make room for the check mark */  
249 - .sod_select .sod_list .selected  
250 - {  
251 - padding-right: 25px;  
252 - font-weight: 700;  
253 - }  
254 -  
255 - /* Displays a check mark for the selected option */  
256 - .sod_select .sod_list .selected:before  
257 - {  
258 - content: "";  
259 - position: absolute;  
260 - right: 10px;  
261 - top: 50%;  
262 - -webkit-transform: translateY(-50%);  
263 - -ms-transform: translateY(-50%);  
264 - transform: translateY(-50%);  
265 - display: inline-block;  
266 - color: #808080;  
267 - height: 9px;  
268 - width: 10px;  
269 - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMTAgOSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTAgOSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBmaWxsPSIjRDlEOUQ4IiBkPSJNNCw2LjdDMy42LDYuMywzLjUsNi4xLDMuMSw1LjdDMi42LDUuMiwyLDQuNiwxLjUsNC4xYy0wLjgtMC44LTIsMC40LTEuMiwxLjJjMC45LDAuOSwxLjksMS45LDIuOCwyLjgNCgkJYzAuNywwLjcsMS4zLDEsMiwwQzYuNyw2LDguMywzLjcsOS44LDEuNUMxMC41LDAuNSw5LTAuMyw4LjMsMC42bDAsMEM2LjcsMi45LDUuNyw0LjQsNCw2LjciLz4NCjwvZz4NCjwvc3ZnPg0K);  
270 - }  
271 -  
272 - /* Add a .no_highlight class to you SoD to hide the check mark */  
273 - .sod_select.no_highlight .sod_list .selected:before { display: none; }  
274 -  
275 - .sod_select .sod_list .link { /* If data-link is set on a specific option */ }  
276 - .sod_select .sod_list .linkexternal { /* If data-link-external is set on a specific option */ }  
277 -  
278 -  
279 - /* Hide native select */  
280 - .sod_select select { display: none !important; }  
281 -  
282 - /* The native select in touch mode. Keep this first line. Sorry, keep everything. */  
283 - .sod_select.touch select  
284 - {  
285 - -webkit-appearance: menulist-button;  
286 -  
287 - position: absolute;  
288 - top: 0;  
289 - left: 0;  
290 - display: block !important;  
291 - height: 100%;  
292 - width: 100%;  
293 - opacity: 0;  
294 - z-index: 1;  
295 - }  
296 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/_themes/selectordie_theme_03.css
@@ -1,273 +0,0 @@ @@ -1,273 +0,0 @@
1 -/* ===========================================================  
2 - *  
3 - * Name: selectordie_theme_03.css  
4 - * Updated: 2014-04-27  
5 - * Created by: Per V @ Vst.mn  
6 - * What?: Custom "theme" for Select or Die  
7 - * To use this theme, include this file  
8 - * instead of the .selectordie.css file  
9 - *  
10 - *  
11 - * Beards, Rock & Loud Guns | Cogs 'n Kegs  
12 - * =========================================================== */  
13 -  
14 -/* Remove, change to fit your needs */  
15 -@import url(http://fonts.googleapis.com/css?family=Lato:400,700);  
16 -  
17 -.sod_select,  
18 -.sod_select *  
19 - {  
20 - -webkit-box-sizing: border-box;  
21 - -moz-box-sizing: border-box;  
22 - box-sizing: border-box;  
23 - -webkit-user-select: none;  
24 - -moz-user-select: none;  
25 - -ms-user-select: none;  
26 - }  
27 -  
28 -/* The SoD - Please keep this first three lines intact, otherwise all hell will break looooooose */  
29 -.sod_select  
30 - {  
31 - display: inline-block;  
32 - position: relative;  
33 - line-height: 1;  
34 -  
35 - width: 200px;  
36 - padding: 15px;  
37 - background-color: #ffffff;  
38 - border: 1px solid #d6d6d6;  
39 - border-radius: 3px;  
40 - color: #828282;  
41 - font-size: 11px;  
42 - font-weight: 400;  
43 - text-align: left;  
44 - text-transform: uppercase;  
45 - outline: 0;  
46 - outline-offset: -2px; /* Opera */  
47 - cursor: default;  
48 - }  
49 -  
50 - /* Up/Down arrows */  
51 - .sod_select:before,  
52 - .sod_select:after  
53 - {  
54 - content: "\25B2";  
55 - position: absolute;  
56 - right: 15px;  
57 - top: 12px;  
58 - color: #bbbbbb;  
59 - font-size: 7px;  
60 - }  
61 -  
62 - /* Down arrow */  
63 - .sod_select:after  
64 - {  
65 - content: "\25BC";  
66 - top: auto;  
67 - bottom: 12px;  
68 - }  
69 -  
70 - /* Change the border color on hover, focus and when open */  
71 - .sod_select:hover,  
72 - .sod_select.open,  
73 - .sod_select.focus  
74 - {  
75 - border-color: #dbdbdb;  
76 - }  
77 -  
78 - .sod_select.focus { box-shadow: 0 0 2px rgba(0,0,0,.1); }  
79 -  
80 - .sod_select.open  
81 - {  
82 - border-radius: 3px 3px 0 0;  
83 - color: #919191;  
84 - box-shadow: 1px 2px 5px rgba(0,0,0,.1);  
85 - }  
86 -  
87 - .sod_select.open.above  
88 - {  
89 - border-radius: 0 0 3px 3px;  
90 - box-shadow: 1px -2px 5px rgba(0,0,0,.1);  
91 - }  
92 -  
93 - /* When the entire SoD is disabled, go crazy! */  
94 - .sod_select.disabled,  
95 - .sod_select.disabled:hover  
96 - {  
97 - opacity: .8;  
98 - color: #b2b2b2;  
99 - cursor: not-allowed;  
100 - }  
101 -  
102 - /* The "label", or whatever we should call it. Keep the first three lines for truncating. */  
103 - .sod_select .sod_label  
104 - {  
105 - overflow: hidden;  
106 - white-space: nowrap;  
107 - text-overflow: ellipsis;  
108 -  
109 - padding-right: 25px;  
110 - }  
111 -  
112 - .sod_select .sod_prefix { /* Use this if you're using a prefix and want to style it */ }  
113 - .sod_select .sod_placeholder { /* Use this if you're using a placeholder and want to style it */ }  
114 -  
115 -  
116 -  
117 - /* Options list wrapper */  
118 - .sod_select .sod_list  
119 - {  
120 - position: absolute;  
121 - top: 100%;  
122 - left: 0;  
123 - display: none;  
124 - height: auto;  
125 - width: 200px;  
126 - margin: 0 0 0 -1px;  
127 - background: #ffffff;  
128 - border: 1px solid #dbdbdb;  
129 - border-top: none;  
130 - border-radius: 0 0 3px 3px;  
131 - box-shadow: 1px 2px 5px rgba(0,0,0,.1);  
132 - z-index: 1;  
133 - }  
134 -  
135 - /* The "divider" shown above the list */  
136 - .sod_select .sod_list:before  
137 - {  
138 - content: "";  
139 - position: absolute;  
140 - left: 10px;  
141 - right: 10px;  
142 - height: 1px;  
143 - top: -1px;  
144 - background: #dbdbdb;  
145 - }  
146 -  
147 - /* Shows the option list (don't edit) */  
148 - .sod_select.open .sod_list { display: block; }  
149 -  
150 - /* Don't display the options when */  
151 - .sod_select.disabled.open .sod_list { display: none; }  
152 -  
153 - /* When the option list is displayed above the SoD */  
154 - .sod_select.above .sod_list  
155 - {  
156 - top: auto;  
157 - bottom: 100%;  
158 - border-radius: 3px 3px 0 0;  
159 - border-top: 1px solid #dbdbdb;  
160 - border-bottom: none;  
161 - box-shadow: 1px -2px 5px rgba(0,0,0,.1);  
162 - }  
163 -  
164 - .sod_select.above .sod_list:before  
165 - {  
166 - content: "";  
167 - position: absolute;  
168 - left: 10px;  
169 - right: 10px;  
170 - height: 1px;  
171 - bottom: -1px;  
172 - top: auto;  
173 - background: #dbdbdb;  
174 - }  
175 -  
176 -  
177 - /* Options list container */  
178 - .sod_select .sod_list ul  
179 - {  
180 - overflow-y: auto;  
181 - padding: 0;  
182 - margin: 0;  
183 - border-radius: 3px;  
184 - }  
185 -  
186 - /* All the options. Keep the first three lines for truncating... */  
187 - .sod_select .sod_list li  
188 - {  
189 - overflow: hidden;  
190 - white-space: nowrap;  
191 - text-overflow: ellipsis;  
192 -  
193 - position: relative;  
194 - padding: 12px 15px;  
195 - list-style-type: none;  
196 - color: #676767;  
197 - }  
198 -  
199 - /* Optgroups */  
200 - .sod_select .sod_list .optgroup,  
201 - .sod_select .sod_list .optgroup.disabled  
202 - {  
203 - background: inherit;  
204 - color: #939393;  
205 - font-size: 10px;  
206 - font-style: italic;  
207 - }  
208 -  
209 - /* Children of an optgroup */  
210 - .sod_select .sod_list .groupchild { padding-left: 20px; }  
211 -  
212 - /* Disabled option */  
213 - .sod_select .sod_list .disabled  
214 - {  
215 - background: inherit;  
216 - color: #cccccc;  
217 - }  
218 -  
219 - /* Hover state for options, also used when a user uses his/hers up/down keys */  
220 - .sod_select .sod_list .active  
221 - {  
222 - background: #fafafa;  
223 - color: #404040;  
224 - }  
225 -  
226 - /*Make room for the check mark */  
227 - .sod_select .sod_list .selected  
228 - {  
229 - padding-right: 30px;  
230 - font-weight: 700;  
231 - }  
232 -  
233 - /* Displays a check mark for the selected option */  
234 - .sod_select .sod_list .selected:before  
235 - {  
236 - content: "";  
237 - position: absolute;  
238 - right: 15px;  
239 - top: 50%;  
240 - -webkit-transform: translateY(-50%);  
241 - -ms-transform: translateY(-50%);  
242 - transform: translateY(-50%);  
243 - display: inline-block;  
244 - color: #808080;  
245 - height: 9px;  
246 - width: 10px;  
247 - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMTAgOSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTAgOSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBmaWxsPSIjRDlEOUQ4IiBkPSJNNCw2LjdDMy42LDYuMywzLjUsNi4xLDMuMSw1LjdDMi42LDUuMiwyLDQuNiwxLjUsNC4xYy0wLjgtMC44LTIsMC40LTEuMiwxLjJjMC45LDAuOSwxLjksMS45LDIuOCwyLjgNCgkJYzAuNywwLjcsMS4zLDEsMiwwQzYuNyw2LDguMywzLjcsOS44LDEuNUMxMC41LDAuNSw5LTAuMyw4LjMsMC42bDAsMEM2LjcsMi45LDUuNyw0LjQsNCw2LjciLz4NCjwvZz4NCjwvc3ZnPg0K);  
248 - }  
249 -  
250 - /* Add a .no_highlight class to you SoD to hide the check mark */  
251 - .sod_select.no_highlight .sod_list .selected:before { display: none; }  
252 -  
253 - .sod_select .sod_list .link { /* If data-link is set on a specific option */ }  
254 - .sod_select .sod_list .linkexternal { /* If data-link-external is set on a specific option */ }  
255 -  
256 -  
257 - /* Hide native select */  
258 - .sod_select select { display: none !important; }  
259 -  
260 - /* The native select in touch mode. Keep this first line. Sorry, keep everything. */  
261 - .sod_select.touch select  
262 - {  
263 - -webkit-appearance: menulist-button;  
264 -  
265 - position: absolute;  
266 - top: 0;  
267 - left: 0;  
268 - display: block !important;  
269 - height: 100%;  
270 - width: 100%;  
271 - opacity: 0;  
272 - z-index: 1;  
273 - }  
274 \ No newline at end of file 0 \ No newline at end of file
public/javascripts/select-or-die/select-or-die.jquery.json
@@ -1,42 +0,0 @@ @@ -1,42 +0,0 @@
1 -{  
2 - "name": "select-or-die",  
3 - "version": "0.1.3",  
4 - "title": "Select or Die",  
5 - "author": {  
6 - "name": "Per Vestman",  
7 - "email": "per@vst.mn",  
8 - "url": "http://vst.mn"  
9 - },  
10 - "licenses": [  
11 - {  
12 - "type": "MIT",  
13 - "url": "http://opensource.org/licenses/MIT"  
14 - },  
15 - {  
16 - "type": "GPL",  
17 - "url": "http://www.gnu.org/copyleft/gpl.html"  
18 - }  
19 - ],  
20 - "dependencies": {  
21 - "jquery": ">=1.8"  
22 - },  
23 - "description": "Yet another jQuery plugin to style/replace select elements.",  
24 - "keywords": [  
25 - "select",  
26 - "input",  
27 - "form",  
28 - "dropdown",  
29 - "native",  
30 - "replacement",  
31 - "css",  
32 - "ui",  
33 - "javascript",  
34 - "jquery",  
35 - "vestman"  
36 - ],  
37 - "docs": "http://vst.mn/selectordie",  
38 - "demo": "http://vst.mn/selectordie",  
39 - "download": "https://github.com/vestman/Select-or-Die",  
40 - "bugs": "https://github.com/vestman/Select-or-Die/issues",  
41 - "homepage": "http://vst.mn/selectordie"  
42 -}  
43 \ No newline at end of file 0 \ No newline at end of file
public/stylesheets/application.scss
1 /* 1 /*
2 * thidparty libraries 2 * thidparty libraries
3 *= require colorbox 3 *= require colorbox
4 - *= require selectordie  
5 - *= require selectordie-theme  
6 *= require inputosaurus 4 *= require inputosaurus
7 *= require token-input 5 *= require token-input
8 *= require token-input-facebook 6 *= require token-input-facebook
public/stylesheets/search.css
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 display: inline-block; 16 display: inline-block;
17 height: 27px; 17 height: 27px;
18 max-height: 27px; 18 max-height: 27px;
19 - width: 87px; 19 + width: 86px;
20 margin-bottom: 1px; 20 margin-bottom: 1px;
21 } 21 }
22 .controller-search .current-cat-path { 22 .controller-search .current-cat-path {
public/stylesheets/selectordie-theme.css
@@ -1,75 +0,0 @@ @@ -1,75 +0,0 @@
1 -/* Default custom select styles */  
2 -  
3 -#search-subheader div.sod_select {  
4 - display: inline-block;  
5 - vertical-align: middle;  
6 - position: relative;  
7 - text-align: left;  
8 - background: #fff;  
9 - z-index: 100;  
10 - -webkit-touch-callout: none;  
11 - -webkit-user-select: none;  
12 - -khtml-user-select: none;  
13 - -moz-user-select: none;  
14 - -ms-user-select: none;  
15 - user-select: none;  
16 - background: transparent;  
17 - max-width: 400px;  
18 -}  
19 -  
20 -#search-subheader div.sod_select:focus {  
21 - outline: none; /* For better accessibility add a style for this in your skin */  
22 -}  
23 -  
24 -#search-subheader .sod_select select {  
25 - display: none;  
26 -}  
27 -  
28 -#search-subheader .sod_label::after {  
29 - font-family: Arial, 'Liberation Sans', sans-serif;  
30 - font-weight: bold;  
31 - content: '+';  
32 - left: 0px;  
33 - -webkit-transform: translate3d(0,-50%,0) rotate3d(0,0,1,0deg);;  
34 - transform: translate3d(0,-50%,0) rotate3d(0,0,1,0deg);;  
35 - -webkit-transition: -webkit-transform 0.5s;  
36 - transition: transform 0.5s;  
37 - position: absolute;  
38 - top: 50%;  
39 - font-size: 2.1em;  
40 -}  
41 -  
42 -#search-subheader .sod_select.open .sod_label::after {  
43 - -webkit-transform: translate3d(0,-50%,0) rotate3d(0,0,1,225deg);  
44 - transform: translate3d(0,-50%,0) rotate3d(0,0,1,225deg);  
45 -}  
46 -  
47 -/* Changes on select or die*/  
48 -#search-subheader .sod_select{  
49 - border: none;  
50 - padding-top: 10px;  
51 - padding-left: 20px;  
52 - padding-bottom: 10px;  
53 - width: auto;  
54 - font-weight: normal;  
55 - text-transform: none;  
56 - font-size: 12px;  
57 -}  
58 -  
59 -#search-subheader .sod_select.open{  
60 -}  
61 -  
62 -#search-subheader .sod_select .sod_list{  
63 - border: 1px solid #ebebeb;  
64 - margin-left: -1px;  
65 - width: auto;  
66 -}  
67 -  
68 -#search-subheader .sod_select:before,  
69 -#search-subheader .sod_select:after {  
70 - content: "";  
71 -}  
72 -  
73 -#search-subheader .sod_select.focus {  
74 - box-shadow: none;  
75 -}  
public/stylesheets/selectordie.css
@@ -1 +0,0 @@ @@ -1 +0,0 @@
1 -../javascripts/select-or-die/_src/selectordie.css  
2 \ No newline at end of file 0 \ No newline at end of file
script/authors 0 → 100755
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +#!/bin/sh
  2 +
  3 +./script/authors-all-commits | sort -u
script/authors-all-commits 0 → 100755
@@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
  1 +#!/bin/sh
  2 +
  3 +git log --pretty=format:'Author: %aN <%aE>%n%b' --no-merges \
  4 + | grep -i '^\s*\(author:\|signed-off-by:\)' \
  5 + | sed -f script/authors-normalize.sed \
  6 + | sed -f script/authors.sed
script/authors-commits 0 → 100755
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +#!/bin/sh
  2 +
  3 +./script/authors-all-commits | sort | uniq -c | sort -n
  4 +
script/authors-normalize.sed 0 → 100644
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
  1 +s/\s\+/ /g
  2 +s/^\s\+//g
  3 +s/^\S*:\s*//
  4 +s/\(\S\)</\1 </
  5 +s/ + /\n/g
  6 +s/\s*$//
  7 +s/\s*,\s*/\n/g
script/authors.sed 0 → 100644
@@ -0,0 +1,217 @@ @@ -0,0 +1,217 @@
  1 +s/Alessandro Palmeira$/Alessandro Palmeira <alessandro.palmeira@gmail.com>/
  2 +s/Alessandro Palmeira <caio.csalgado@gmail.com>/Alessandro Palmeira <alessandro.palmeira@gmail.com>/
  3 +s/Alessandro Palmeira <diegoamc90@gmail.com>/Alessandro Palmeira <alessandro.palmeira@gmail.com>/
  4 +s/Alessandro Palmeira <jaodsilv@linux.ime.usp.br>/Alessandro Palmeira <alessandro.palmeira@gmail.com>/
  5 +s/Alessandro Palmeira <paulo@softwarelivre.org>/Alessandro Palmeira <alessandro.palmeira@gmail.com>/
  6 +s/Alessandro Palmeira <rr.manzo@gmail.com>/Alessandro Palmeira <alessandro.palmeira@gmail.com>/
  7 +
  8 +s/analosnak <analosnak@gmail.com>/Ana Losnak <analosnak@gmail.com>/
  9 +s/^Ana Losnak$/Ana Losnak <analosnak@gmail.com>/
  10 +
  11 +s/Andre Bernardes <andrebsguedes@gmail.com>/André Guedes <andrebsguedes@gmail.com>/
  12 +s/André Bernardes <andrebsguedes@gmail.com>/André Guedes <andrebsguedes@gmail.com>/
  13 +s/André Guedes <andrebsguedes@fedora.local>/André Guedes <andrebsguedes@gmail.com>/
  14 +
  15 +
  16 +s/Alex de Souza <campelo.al1@gmail.com>/Alex Campelo <campelo.al1@gmail.com>/
  17 +s/alcampelo <alcampelo@alcampelo.(none)>/Alex Campelo <campelo.al1@gmail.com>/
  18 +s/Alvaro Fernando <alvarofernandoms@gmail.com>/Álvaro Fernando <alvarofernandoms@gmail.com>/
  19 +
  20 +s/athurmde@yahoo.com.br/arthurmde@yahoo.com.br/
  21 +s/^Antonio Terceiro$/Antonio Terceiro <terceiro@colivre.coop.br>/
  22 +
  23 +s/Arhur Del Esposte/Arthur Del Esposte/
  24 +s/Arthur Del Esposte <arthurmde@yahoo.com.br>/Arthur Del Esposte <arthurmde@gmail.com>/
  25 +
  26 +s/Aurélio A. Heckert/Aurelio A. Heckert/
  27 +
  28 +s/Bráulio Bhavamitra <brauliobo@gmail.com>/Braulio Bhavamitra <braulio@eita.org.br>/
  29 +s/Braulio Bhavamitra <brauliobo@gmail.com>/Braulio Bhavamitra <braulio@eita.org.br>/
  30 +
  31 +s/Carlos Andre <carlos.andre.souza@msn.com>/Carlos Andre de Souza <carlos.andre.souza@msn.com>/
  32 +
  33 +s/^Caio Almeida$/Caio SBA <caio@colivre.coop.br>/
  34 +
  35 +s/^Caio$/Caio Salgado <caio.csalgado@gmail.com>/
  36 +s/Caio <caio.csalgado@gmail.com>/Caio Salgado <caio.csalgado@gmail.com>/
  37 +s/Caio C. Salgado <alessandro.palmeira@gmail.com>/Caio Salgado <caio.csalgado@gmail.com>/
  38 +s/^Caio Salgado$/Caio Salgado <caio.csalgado@gmail.com>/
  39 +s/Caio Salgado <alessandro.palmeira@gmail.com>/Caio Salgado <caio.csalgado@gmail.com>/
  40 +s/Caio Salgado <diegoamc90@gmail.com>/Caio Salgado <caio.csalgado@gmail.com>/
  41 +s/Caio Salgado <jaodsilv@linux.ime.usp.br>/Caio Salgado <caio.csalgado@gmail.com>/
  42 +s/Caio Salgado <renanteruoc@gmail.com>/Caio Salgado <caio.csalgado@gmail.com>/
  43 +
  44 +s/Carlos Morais$/Carlos Morais <carlos88morais@gmail.com>/
  45 +s/Carlos Morais <alessandro.palmeira@gmail.com>/Carlos Morais <carlos88morais@gmail.com>/
  46 +s/Carlos Morais <jaodsilv@linux.ime.usp.br>/Carlos Morais <carlos88morais@gmail.com>/
  47 +s/Carlos Morais <paulo@softwarelivre.org>/Carlos Morais <carlos88morais@gmail.com>/
  48 +s/Carlos Morais <terceiro@colivre.coop.br>/Carlos Morais <carlos88morais@gmail.com>/
  49 +
  50 +s/Daniel Alves$/Daniel Alves <danpaulalves@gmail.com>/
  51 +s/Daniel Alves <alessandro.palmeira@gmail.com>/Daniel Alves <danpaulalves@gmail.com>/
  52 +
  53 +s/Daniel Bucher$/Daniel Bucher <daniel.bucher88@gmail.com>/
  54 +
  55 +s/daniel <dtygel@eita.org.br>/Daniel Tygel <dtygel@eita.org.br>/
  56 +s/dtygel <dtygel@gmail.com>/Daniel Tygel <dtygel@eita.org.br>/
  57 +
  58 +/^Daniela Feitosa$/d
  59 +s/DylanGuedes/Dylan Guedes/
  60 +
  61 +s/Diego$/Diego Araujo <diegoamc90@gmail.com>/
  62 +s/diegoamc <diegoamc90@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  63 +s/Diego Araujo$/Diego Araujo <diegoamc90@gmail.com>/
  64 +s/Diego Araújo$/Diego Araujo <diegoamc90@gmail.com>/
  65 +s/Diego Araujo <alessandro.palmeira@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  66 +s/Diego Araújo <alessandro.palmeira@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  67 +s/Diego Araujo <caio.csalgado@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  68 +s/Diego Araújo <caio.csalgado@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  69 +s/Diego Araújo <danpaulalves@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  70 +s/Diego Araújo <diegoamc90@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  71 +s/Diego Araújo <jaodsilv@linux.ime.usp.br>/Diego Araujo <diegoamc90@gmail.com>/
  72 +s/Diego Araújo <paulo@softwarelivre.org>/Diego Araujo <diegoamc90@gmail.com>/
  73 +s/Diego Araujo <renanteruoc@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  74 +s/Diego Araújo <renanteruoc@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  75 +s/Diego Araujo <rr.manzo@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  76 +s/Diego Araújo <rr.manzo@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  77 +s/Diego Martinez <diegoamc90@gmail.com>/Diego Araujo <diegoamc90@gmail.com>/
  78 +
  79 +# no known email
  80 +s/Eduardo Morais <alessandro.palmeira@gmail.com>/Eduardo Morais/
  81 +s/Eduardo Morais <carlos88morais@gmail.com>/Eduardo Morais/
  82 +
  83 +s/Eduardo Passos <eduardo@risa.localdomain.localhost>/Eduardo Passos <eduardosteps@gmail.com>/
  84 +
  85 +s/Evandro Jr <evandrojr@gmail.com>/Evandro Magalhaes Leite Junior <evandro.leite@serpro.gov.br>/
  86 +s/Evandro Junior <evandrojr@gmail.com>/Evandro Magalhaes Leite Junior <evandro.leite@serpro.gov.br>/
  87 +
  88 +s/Fábio Teixeira <fabio1079@gmail.com>/Fabio Teixeira <fabio1079@gmail.com>/
  89 +
  90 +s/Francisco Marcelo A. Lima Júnior <francisco.lima-junior@serpro.gov.br>/Francisco Marcelo de Araújo Lima Júnior <francisco.lima-junior@serpro.gov.br>/
  91 +s/Francisco Marcelo de Araujo Lima Junior <79350259591@serpro-1457614.(none)>/Francisco Marcelo de Araújo Lima Júnior <francisco.lima-junior@serpro.gov.br>/
  92 +s/Francisco Marcelo de Araújo Lima Júnior <maljunior@gmail.com>/Francisco Marcelo de Araújo Lima Júnior <francisco.lima-junior@serpro.gov.br>/
  93 +
  94 +
  95 +s/Gustavo Cruz <darksshades@hotmail.com>/Gustavo Jaruga <darksshades@gmail.com>/
  96 +s/Gustavo Jaruga <darksshades@hotmail.com>/Gustavo Jaruga <darksshades@gmail.com>/
  97 +s/Gust <darksshades@hotmail.com>/Gustavo Jaruga <darksshades@gmail.com>/
  98 +
  99 +s/Guilherme Rojas <alessandro.palmeira@gmail.com>/Guilherme Rojas <guilhermehrojas@gmail.com>/
  100 +s/Guilherme Rojas <danpaulalves@gmail.com>/Guilherme Rojas <guilhermehrojas@gmail.com>/
  101 +s/Guilherme Rojas <diegoamc90@gmail.com>/Guilherme Rojas <guilhermehrojas@gmail.com>/
  102 +
  103 +s/Hebert Douglas <hebertdougl@gmail>/Hebert Douglas <hebertdougl@gmail.com>/
  104 +
  105 +s/Jefferson <diegoamc90@gmail.com>/Jefferson Fernandes <jeffs.fernandes@gmail.com>/
  106 +s/Jefferson Fernandes$/Jefferson Fernandes <jeffs.fernandes@gmail.com>/
  107 +s/Jefferson Fernandes <alessandro.palmeira@gmail.com>/Jefferson Fernandes <jeffs.fernandes@gmail.com>/
  108 +s/Jefferson Fernandes <caio.csalgado@gmail.com>/Jefferson Fernandes <jeffs.fernandes@gmail.com>/
  109 +s/Jefferson Fernandes <diegoamc90@gmail.com>/Jefferson Fernandes <jeffs.fernandes@gmail.com>/
  110 +s/Jefferson Fernandes <jaodsilv@linux.ime.usp.br>/Jefferson Fernandes <jeffs.fernandes@gmail.com>/
  111 +s/Jefferson Fernandes <rr.manzo@gmail.com>/Jefferson Fernandes <jeffs.fernandes@gmail.com>/
  112 +
  113 +# no known email
  114 +s/João Machini <diegoamc90@gmail.com>/João Machini/
  115 +s/João Machini <digoamc90@gmail.com>/João Machini/
  116 +s/João Machini <jaodsilv@linux.ime.usp.br>/João Machini/
  117 +
  118 +s/João da Silva$/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  119 +s/João da Silva <jaodsilv@linux.ime.usp.br>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  120 +s/Joao M. M. da Silva$/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  121 +s/João M. M. da Silva$/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  122 +s/João M. M. da Silva <alessandro.palmeira@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  123 +s/João M. M. da Silva <caio.csalgado@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  124 +s/João M. M. da Silva <diegoamc90@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  125 +s/Joao M. M. da Silva <jeffs.fernandes@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  126 +s/João M. M. da Silva <paulo@softwarelivre.org>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  127 +s/João M. M. da Silva <rr.manzo@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  128 +s/João M. Miranda <jaodsilv@linux.ime.usp.br>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  129 +s/Joao M. M. Silva$/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  130 +s/João M. M. Silva$/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  131 +s/João M. M. Silva <alessandro.palmeira@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  132 +s/Joao M. M. Silva <jeffs.fernandes@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  133 +s/João M. M. Silva <rr.manzo@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  134 +s/João Marco Maciel da Silva/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  135 +s/João <caio.csalgado@gmail.com>/João M. M. da Silva <jaodsilv@linux.ime.usp.br>/
  136 +
  137 +s/José Pedro de Santana Neto <1jpsneto@gmail.com>/Jose Pedro <1jpsneto@gmail.com>/
  138 +
  139 +s/Junior Silva <junior@bajor.localhost.localdomain>/Junior Silva <juniorsilva1001@gmail.com>/
  140 +s/Junior Silva <junior@sedeantigo.colivre.coop.br>/Junior Silva <juniorsilva1001@gmail.com>/
  141 +s/Junior Silva <juniorsilva7@juniorsilva-Aspire-5750Z.(none)>/Junior Silva <juniorsilva1001@gmail.com>/
  142 +s/Junior Silva <juniorsilva@colivre.coop.br>/Junior Silva <juniorsilva1001@gmail.com>/
  143 +s/juniorsilva <juniorsilva@QonoS.localhost.localdomain>/Junior Silva <juniorsilva1001@gmail.com>/
  144 +
  145 +s/Larissa Reis <reiss.larissa@gmail.com>/Larissa Reis <larissa@colivre.coop.br>/
  146 +
  147 +s/Leandro Nunes$/Leandro Nunes dos Santos <leandro.santos@serpro.gov.br>/
  148 +s/Leandro Nunes dos Santos <81665687568@serpro-1541727.Home>/Leandro Nunes dos Santos <leandro.santos@serpro.gov.br>/
  149 +s/Leandro Nunes dos Santos <81665687568@serpro-1541727.(none)>/Leandro Nunes dos Santos <leandro.santos@serpro.gov.br>/
  150 +s/Leandro Nunes dos Santos <leandronunes@gmail.com>/Leandro Nunes dos Santos <leandro.santos@serpro.gov.br>/
  151 +
  152 +s/Lucas Melo <lucas@colivre.coop.br>/Lucas Melo <lucaspradomelo@gmail.com>/
  153 +
  154 +s/Luciano <lucianopcbr@gmail.com>/Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>/
  155 +s/Luciano Prestes <lucianopcbr@gmail.com>/Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>/
  156 +s/Luciano Prestes Cavacanti <lucianopcbr@gmail.com>/Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>/
  157 +
  158 +s/Marcos da Silva Ramos <ms.ramos@outlook.com>/Marcos Ramos <ms.ramos@outlook.com>/
  159 +s/Marcos Ramos <ms.ramos@outlook.com$/Marcos Ramos <ms.ramos@outlook.com>/
  160 +s/Marcos <marcos.rpj2@gmail.com>/Marcos Ronaldo <marcos.rpj2@gmail.com>/
  161 +
  162 +s/Parley Martins <parley@outlook.com>/Parley Martins <parleypachecomartins@gmail.com>/
  163 +
  164 +s/Paulo Meirelles$/Paulo Meirelles <paulo@softwarelivre.org>/
  165 +s/Paulo Meirelles <alessandro.palmeira@gmail.com>/Paulo Meirelles <paulo@softwarelivre.org>/
  166 +s/Paulo Meirelles <carlos88morais@gmail.com>/Paulo Meirelles <paulo@softwarelivre.org>/
  167 +s/Paulo Meirelles <diegoamc90@gmail.com>/Paulo Meirelles <paulo@softwarelivre.org>/
  168 +s/Paulo Meirelles <jaodsilv@linux.ime.usp.br>/Paulo Meirelles <paulo@softwarelivre.org>/
  169 +s/Paulo Meirelles <renanteruoc@gmail.com>/Paulo Meirelles <paulo@softwarelivre.org>/
  170 +s/Paulo Meirelles <rr.manzo@gmail.com>/Paulo Meirelles <paulo@softwarelivre.org>/
  171 +s/Paulo Meirelles <terceiro@colivre.coop.br>/Paulo Meirelles <paulo@softwarelivre.org>/
  172 +
  173 +# no known email
  174 +s/Pedro$/Pedro Leal/
  175 +s/Pedro <caio.csalgado@gmail.com>/Pedro Leal/
  176 +s/Pedro Leal <caio.csalgado@gmail.com>/Pedro Leal/
  177 +s/Pedro Leal <carlos88morais@gmail.com>/Pedro Leal/
  178 +s/Pedro Leal <diegoamc90@gmail.com>/Pedro Leal/
  179 +s/Pedro Leal <jaodsilv@linux.ime.usp.br>/Pedro Leal/
  180 +
  181 +s/Rafael Manzo$/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  182 +s/Rafael Manzo <alessandro.palmeira@gmail.com>/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  183 +s/Rafael Manzo <caio.csalgado@gmail.com>/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  184 +s/Rafael Manzo <diegoamc90@gmail.com>/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  185 +s/Rafael Manzo <jaodsilv@linux.ime.usp.br>/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  186 +s/Rafael Manzo <jeffs.fernandes@gmail.com>/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  187 +s/Rafael Manzo <paulo@softwarelivre.org>/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  188 +s/Rafael Manzo <renanteruoc@gmail.com>/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  189 +s/Rafael Manzo <rr.manzo@gmail.com>/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  190 +s/Rafael Reggiani Manzo$/Rafael Reggiani Manzo <rr.manzo@gmail.com>/
  191 +
  192 +s/Renan <renanteruoc@gmail.com>/Renan Teruo <renanteruoc@gmail.com>/
  193 +s/Renan Teruo$/Renan Teruo <renanteruoc@gmail.com>/
  194 +s/Renan Teruo <alessandro.palmeira@gmail.com>/Renan Teruo <renanteruoc@gmail.com>/
  195 +s/Renan Teruoc$/Renan Teruo <renanteruoc@gmail.com>/
  196 +s/Renan Teruo <caio.csalgado@gmail.com>/Renan Teruo <renanteruoc@gmail.com>/
  197 +s/Renan Teruo <caio.salgado@gmail.com>/Renan Teruo <renanteruoc@gmail.com>/
  198 +s/Renan Teruo <diegoamc90@gmail.com>/Renan Teruo <renanteruoc@gmail.com>/
  199 +s/Renan Teruo <jaodsilv@linux.ime.usp.br>/Renan Teruo <renanteruoc@gmail.com>/
  200 +
  201 +s/Rodrigo Souto$/Rodrigo Souto <rodrigo@colivre.coop.br>/
  202 +
  203 +/root <root@debian.sdr.serpro>/d
  204 +
  205 +s/Tales Martins <tales.martins@gmail.com>/Tallys Martins <tallysmartins@yahoo.com.br>/
  206 +s/Tallys Martins <tallysmartins@gmail.com>/Tallys Martins <tallysmartins@yahoo.com.br>/
  207 +s/tallys <tallys@tallys>/Tallys Martins <tallysmartins@yahoo.com.br>/
  208 +s/tallys <tallys@tallys.(none)>/Tallys Martins <tallysmartins@yahoo.com.br>/
  209 +s/Thiago Ribeiro <thiagitosouza@gmail.com>/Thiago Ribeiro <thiagitosouza@hotmail.com>/
  210 +
  211 +s/Valéssio Brito <contato@valessiobrito.com.br>/Valessio Brito <contato@valessiobrito.com.br>/
  212 +s/Valessio Brito <contato@valessiobrito.info>/Valessio Brito <contato@valessiobrito.com.br>/
  213 +s/Valessio Brito <valessio@gmail.com>/Valessio Brito <contato@valessiobrito.com.br>/
  214 +/Visita <visita@debian.(none)>/d
  215 +s/vfcosta <vfcosta@gmail.com>/Victor Costa <vfcosta@gmail.com>/
  216 +s/Victor Carvalho <victorhugodf.ac@gmail.com>/Victor Hugo Alves de Carvalho <victorhugodf.ac@gmail.com>/
  217 +
test/unit/scrap_test.rb
@@ -5,6 +5,7 @@ class ScrapTest &lt; ActiveSupport::TestCase @@ -5,6 +5,7 @@ class ScrapTest &lt; ActiveSupport::TestCase
5 def setup 5 def setup
6 Person.delete_all 6 Person.delete_all
7 Scrap.delete_all 7 Scrap.delete_all
  8 + ActionTracker::Record.destroy_all
8 end 9 end
9 10
10 should "have the content" do 11 should "have the content" do
@@ -265,7 +266,7 @@ class ScrapTest &lt; ActiveSupport::TestCase @@ -265,7 +266,7 @@ class ScrapTest &lt; ActiveSupport::TestCase
265 should 'the action_tracker_target be the community when the scraps has the community as receiver' do 266 should 'the action_tracker_target be the community when the scraps has the community as receiver' do
266 scrap = Scrap.new 267 scrap = Scrap.new
267 assert_equal scrap, scrap.action_tracker_target 268 assert_equal scrap, scrap.action_tracker_target
268 - 269 +
269 community = fast_create(Community) 270 community = fast_create(Community)
270 scrap.receiver = community 271 scrap.receiver = community
271 assert_equal community, scrap.action_tracker_target 272 assert_equal community, scrap.action_tracker_target
util/debian-install/README.md
@@ -20,3 +20,16 @@ $ vagrant halt @@ -20,3 +20,16 @@ $ vagrant halt
20 $ vagrant destroy 20 $ vagrant destroy
21 $ rm -f *.deb 21 $ rm -f *.deb
22 ``` 22 ```
  23 +
  24 +To test upgrades:
  25 +
  26 +```
  27 +$ rm -f pkg/
  28 +$ cd utils/debian-install/
  29 +$ vagrant destroy
  30 +$ rm -f *.deb
  31 +$ REPOSITORY=wheezy vagrant up # install current stable version
  32 +$ cd ../../
  33 +$ make noosfero:deb # build current packages
  34 +$ REPOSITORY=wheezy-next vagrant provision # upgrade
  35 +```
util/debian-install/Vagrantfile
@@ -28,6 +28,6 @@ end @@ -28,6 +28,6 @@ end
28 28
29 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 29 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
30 config.vm.box = "debian-wheezy" 30 config.vm.box = "debian-wheezy"
31 - config.vm.provision :shell, path: 'install' 31 + config.vm.provision :shell, path: 'install', args: [ENV['REPOSITORY']].compact
32 config.vm.provision :shell, path: 'test' 32 config.vm.provision :shell, path: 'test'
33 end 33 end
util/debian-install/install
1 #!/bin/sh 1 #!/bin/sh
2 2
  3 +DISTRO=wheezy
  4 +REPOSITORY='wheezy-test'
  5 +
  6 +if [ -n "$1" ]; then
  7 + REPOSITORY="$1"
  8 +fi
  9 +
3 set -e 10 set -e
4 sudo apt-get install -qy netcat-traditional shunit2 11 sudo apt-get install -qy netcat-traditional shunit2
5 12
@@ -57,11 +64,11 @@ FPQAoNmiMgP6zGF9rgOEWMEiFEryayrz @@ -57,11 +64,11 @@ FPQAoNmiMgP6zGF9rgOEWMEiFEryayrz
57 EOF 64 EOF
58 65
59 cat > /etc/apt/sources.list.d/noosfero.list <<EOF 66 cat > /etc/apt/sources.list.d/noosfero.list <<EOF
60 -deb http://download.noosfero.org/debian/wheezy-test ./  
61 -deb-src http://download.noosfero.org/debian/wheezy-test ./ 67 +deb http://download.noosfero.org/debian/$REPOSITORY ./
  68 +deb-src http://download.noosfero.org/debian/$REPOSITORY ./
62 EOF 69 EOF
63 70
64 -sed -e 's/wheezy/&-backports/' \ 71 +sed -e "s/$DISTRO/&-backports/" \
65 /etc/apt/sources.list > /etc/apt/sources.list.d/backports.list 72 /etc/apt/sources.list > /etc/apt/sources.list.d/backports.list
66 73
67 export DEBIAN_FRONTEND=noninteractive 74 export DEBIAN_FRONTEND=noninteractive
util/debian-install/test
1 #!/bin/sh 1 #!/bin/sh
2 2
3 -test_noosfero_running() { 3 +test_web_backend_running() {
4 assertTrue 'Noosfero running' 'pgrep -u noosfero -f thin' 4 assertTrue 'Noosfero running' 'pgrep -u noosfero -f thin'
5 } 5 }
6 6
  7 +test_delayed_job_running() {
  8 + assertTrue 'Delayed Job running' 'pgrep -u noosfero -f delayed_job'
  9 +}
  10 +
  11 +test_feed_updater_running() {
  12 + assertTrue 'Feed updater running' 'pgrep -u noosfero -f feed-updater'
  13 +}
  14 +
7 test_noosfero_responds() { 15 test_noosfero_responds() {
8 assertTrue 'Noosfero responds' 'curl --fail http://localhost/' 16 assertTrue 'Noosfero responds' 'curl --fail http://localhost/'
9 } 17 }
10 18
  19 +test_noosfero_content() {
  20 + assertTrue 'Noosfero content' 'curl --fail http://localhost/ | grep "meta.*property=.noosfero:root"'
  21 +}
  22 +
11 . shunit2 23 . shunit2