muck-friends 0.1.16 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/VERSION +1 -1
  2. data/app/controllers/muck/friends_controller.rb +2 -2
  3. data/muck-friends.gemspec +36 -6
  4. data/test/rails_root/Rakefile +8 -0
  5. data/test/rails_root/config/database.yml +14 -15
  6. data/test/rails_root/config/environment.rb +3 -1
  7. data/test/rails_root/config/initializers/geokit_config.rb +63 -0
  8. data/test/rails_root/db/migrate/{20090602041838_create_users.rb → 20090327231918_create_users.rb} +11 -10
  9. data/test/rails_root/db/migrate/20090402234137_create_languages.rb +1 -1
  10. data/test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb +9 -0
  11. data/test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb +13 -0
  12. data/test/rails_root/db/migrate/20091124203137_add_location_to_profiles.rb +15 -0
  13. data/test/rails_root/db/migrate/20091124205819_add_fields_to_profiles.rb +21 -0
  14. data/test/rails_root/public/images/fancybox/fancy_shadow_e.png +0 -0
  15. data/test/rails_root/public/images/fancybox/fancy_shadow_n.png +0 -0
  16. data/test/rails_root/public/images/fancybox/fancy_shadow_ne.png +0 -0
  17. data/test/rails_root/public/images/fancybox/fancy_shadow_nw.png +0 -0
  18. data/test/rails_root/public/images/fancybox/fancy_shadow_s.png +0 -0
  19. data/test/rails_root/public/images/fancybox/fancy_shadow_se.png +0 -0
  20. data/test/rails_root/public/images/fancybox/fancy_shadow_sw.png +0 -0
  21. data/test/rails_root/public/images/fancybox/fancy_shadow_w.png +0 -0
  22. data/test/rails_root/public/javascripts/jquery/jquery.fancybox.js +13 -6
  23. data/test/rails_root/public/javascripts/jquery/jquery.tips.js +7 -6
  24. data/test/rails_root/public/javascripts/muck.js +50 -3
  25. data/test/rails_root/public/javascripts/muck_activities.js +4 -5
  26. data/test/rails_root/public/stylesheets/jquery/jquery.fancybox.css +19 -25
  27. data/test/rails_root/public/stylesheets/styles.css +2 -0
  28. data/test/rails_root/test/functional/friends_controller_test.rb +1 -1
  29. data/test/rails_root/vendor/plugins/geokit-rails/init.rb +2 -0
  30. data/test/rails_root/vendor/plugins/geokit-rails/install.rb +14 -0
  31. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails.rb +26 -0
  32. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb +456 -0
  33. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/abstract.rb +31 -0
  34. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/mysql.rb +22 -0
  35. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/postgresql.rb +22 -0
  36. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/sqlserver.rb +43 -0
  37. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/defaults.rb +22 -0
  38. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/geocoder_control.rb +16 -0
  39. data/test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/ip_geocode_lookup.rb +46 -0
  40. data/test/rails_root/vendor/plugins/geokit-rails/test/acts_as_mappable_test.rb +474 -0
  41. data/test/rails_root/vendor/plugins/geokit-rails/test/boot.rb +25 -0
  42. data/test/rails_root/vendor/plugins/geokit-rails/test/ip_geocode_lookup_test.rb +77 -0
  43. data/test/rails_root/vendor/plugins/geokit-rails/test/models/company.rb +3 -0
  44. data/test/rails_root/vendor/plugins/geokit-rails/test/models/custom_location.rb +12 -0
  45. data/test/rails_root/vendor/plugins/geokit-rails/test/models/location.rb +4 -0
  46. data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_address.rb +4 -0
  47. data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_family.rb +3 -0
  48. data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_house.rb +3 -0
  49. data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_organization.rb +4 -0
  50. data/test/rails_root/vendor/plugins/geokit-rails/test/models/mock_person.rb +4 -0
  51. data/test/rails_root/vendor/plugins/geokit-rails/test/models/store.rb +3 -0
  52. data/test/rails_root/vendor/plugins/geokit-rails/test/schema.rb +60 -0
  53. data/test/rails_root/vendor/plugins/geokit-rails/test/test_helper.rb +23 -0
  54. metadata +33 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.16
1
+ 0.1.17
@@ -45,9 +45,9 @@ class Muck::FriendsController < ApplicationController
45
45
  end
46
46
 
47
47
  if success
48
- if params[:block] == true
48
+ if params[:block]
49
49
  message = t('muck.friends.blocked', :user => @target.display_name)
50
- elsif params[:block] == false
50
+ elsif params[:unblock]
51
51
  message = t('muck.friends.unblocked', :user => @target.display_name)
52
52
  end
53
53
  else
data/muck-friends.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-friends}
8
- s.version = "0.1.16"
8
+ s.version = "0.1.17"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2009-11-13}
12
+ s.date = %q{2009-12-09}
13
13
  s.description = %q{Friend engine for the muck system.}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
@@ -134,7 +134,6 @@ Gem::Specification.new do |s|
134
134
  "test/rails_root/db/migrate/20090426041056_create_countries.rb",
135
135
  "test/rails_root/db/migrate/20090426041103_create_states.rb",
136
136
  "test/rails_root/db/migrate/20090512013727_create_profiles.rb",
137
- "test/rails_root/db/migrate/20090602041838_create_users.rb",
138
137
  "test/rails_root/db/migrate/20090608073052_create_friends.rb",
139
138
  "test/rails_root/db/migrate/20090730044139_add_comment_cache.rb",
140
139
  "test/rails_root/features/step_definitions/webrat_steps.rb",
@@ -350,20 +349,25 @@ Gem::Specification.new do |s|
350
349
  "test/rails_root/config/environments/development.rb",
351
350
  "test/rails_root/config/environments/production.rb",
352
351
  "test/rails_root/config/environments/test.rb",
352
+ "test/rails_root/config/initializers/geokit_config.rb",
353
353
  "test/rails_root/config/initializers/inflections.rb",
354
354
  "test/rails_root/config/initializers/mime_types.rb",
355
355
  "test/rails_root/config/initializers/requires.rb",
356
356
  "test/rails_root/config/initializers/session_store.rb",
357
357
  "test/rails_root/config/routes.rb",
358
358
  "test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
359
+ "test/rails_root/db/migrate/20090327231918_create_users.rb",
359
360
  "test/rails_root/db/migrate/20090402033319_add_muck_activities.rb",
360
361
  "test/rails_root/db/migrate/20090402234137_create_languages.rb",
361
362
  "test/rails_root/db/migrate/20090426041056_create_countries.rb",
362
363
  "test/rails_root/db/migrate/20090426041103_create_states.rb",
363
364
  "test/rails_root/db/migrate/20090512013727_create_profiles.rb",
364
- "test/rails_root/db/migrate/20090602041838_create_users.rb",
365
365
  "test/rails_root/db/migrate/20090608073052_create_friends.rb",
366
366
  "test/rails_root/db/migrate/20090730044139_add_comment_cache.rb",
367
+ "test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb",
368
+ "test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb",
369
+ "test/rails_root/db/migrate/20091124203137_add_location_to_profiles.rb",
370
+ "test/rails_root/db/migrate/20091124205819_add_fields_to_profiles.rb",
367
371
  "test/rails_root/features/step_definitions/webrat_steps.rb",
368
372
  "test/rails_root/features/support/env.rb",
369
373
  "test/rails_root/features/support/paths.rb",
@@ -375,6 +379,31 @@ Gem::Specification.new do |s|
375
379
  "test/rails_root/test/unit/friend_mailer_test.rb",
376
380
  "test/rails_root/test/unit/friend_test.rb",
377
381
  "test/rails_root/test/unit/user_test.rb",
382
+ "test/rails_root/vendor/plugins/geokit-rails/init.rb",
383
+ "test/rails_root/vendor/plugins/geokit-rails/install.rb",
384
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/acts_as_mappable.rb",
385
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/abstract.rb",
386
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/mysql.rb",
387
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/postgresql.rb",
388
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/adapters/sqlserver.rb",
389
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/defaults.rb",
390
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/geocoder_control.rb",
391
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails/ip_geocode_lookup.rb",
392
+ "test/rails_root/vendor/plugins/geokit-rails/lib/geokit-rails.rb",
393
+ "test/rails_root/vendor/plugins/geokit-rails/test/acts_as_mappable_test.rb",
394
+ "test/rails_root/vendor/plugins/geokit-rails/test/boot.rb",
395
+ "test/rails_root/vendor/plugins/geokit-rails/test/ip_geocode_lookup_test.rb",
396
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/company.rb",
397
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/custom_location.rb",
398
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/location.rb",
399
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/mock_address.rb",
400
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/mock_family.rb",
401
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/mock_house.rb",
402
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/mock_organization.rb",
403
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/mock_person.rb",
404
+ "test/rails_root/vendor/plugins/geokit-rails/test/models/store.rb",
405
+ "test/rails_root/vendor/plugins/geokit-rails/test/schema.rb",
406
+ "test/rails_root/vendor/plugins/geokit-rails/test/test_helper.rb",
378
407
  "test/rails_root/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb",
379
408
  "test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb"
380
409
  ]
@@ -398,3 +427,4 @@ Gem::Specification.new do |s|
398
427
  s.add_dependency(%q<muck-profiles>, [">= 0"])
399
428
  end
400
429
  end
430
+
@@ -29,3 +29,11 @@ require 'muck_users/tasks'
29
29
  require 'muck_activities/tasks'
30
30
  require 'muck_friends/tasks'
31
31
  require 'muck_profiles/tasks'
32
+
33
+ namespace :muck do
34
+
35
+ def muck_gems
36
+ ['muck-engine', 'muck-users', 'muck-profiles', 'muck-activities', 'muck-friends']
37
+ end
38
+
39
+ end
@@ -1,17 +1,16 @@
1
1
  development:
2
- adapter: sqlite3
3
- database: db/development.sqlite3
4
- timeout: 5000
5
-
6
- test: &TEST
7
- adapter: sqlite3
8
- database: db/test.sqlite3
9
- timeout: 5000
10
-
11
- production:
12
- adapter: sqlite3
13
- database: db/production.sqlite3
14
- timeout: 5000
15
-
2
+ adapter: mysql
3
+ database: muck_friends_development
4
+ username: root
5
+ password:
6
+ host: localhost
7
+ encoding: utf8
8
+ test:
9
+ adapter: mysql
10
+ database: muck_friends_test
11
+ username: root
12
+ password:
13
+ host: localhost
14
+ encoding: utf8
16
15
  cucumber:
17
- <<: *TEST
16
+ <<: *TEST
@@ -17,8 +17,10 @@ Rails::Initializer.run do |config|
17
17
  config.time_zone = 'UTC'
18
18
  config.gem "will_paginate"
19
19
  config.gem "authlogic"
20
+ config.gem "geokit"
21
+ config.gem "sanitize"
20
22
  config.gem "bcrypt-ruby", :lib => "bcrypt"
21
- config.gem 'thoughtbot-paperclip', :lib => 'paperclip', :source => "http://gems.github.com"
23
+ config.gem 'paperclip'
22
24
  config.gem 'muck-engine', :lib => 'muck_engine'
23
25
  config.gem 'muck-users', :lib => 'muck_users'
24
26
  config.gem 'muck-profiles', :lib => 'muck_profiles'
@@ -0,0 +1,63 @@
1
+ require 'geokit'
2
+
3
+ if defined? Geokit
4
+
5
+ # These defaults are used in Geokit::Mappable.distance_to and in acts_as_mappable
6
+ Geokit::default_units = :miles
7
+ Geokit::default_formula = :sphere
8
+
9
+ # This is the timeout value in seconds to be used for calls to the geocoder web
10
+ # services. For no timeout at all, comment out the setting. The timeout unit
11
+ # is in seconds.
12
+ Geokit::Geocoders::request_timeout = 3
13
+
14
+ # These settings are used if web service calls must be routed through a proxy.
15
+ # These setting can be nil if not needed, otherwise, addr and port must be
16
+ # filled in at a minimum. If the proxy requires authentication, the username
17
+ # and password can be provided as well.
18
+ Geokit::Geocoders::proxy_addr = nil
19
+ Geokit::Geocoders::proxy_port = nil
20
+ Geokit::Geocoders::proxy_user = nil
21
+ Geokit::Geocoders::proxy_pass = nil
22
+
23
+ # This is your yahoo application key for the Yahoo Geocoder.
24
+ # See http://developer.yahoo.com/faq/index.html#appid
25
+ # and http://developer.yahoo.com/maps/rest/V1/geocode.html
26
+ Geokit::Geocoders::yahoo = 'REPLACE_WITH_YOUR_YAHOO_KEY'
27
+
28
+ # This is your Google Maps geocoder key.
29
+ # See http://www.google.com/apis/maps/signup.html
30
+ # and http://www.google.com/apis/maps/documentation/#Geocoding_Examples
31
+ Geokit::Geocoders::google = 'REPLACE_WITH_YOUR_GOOGLE_KEY'
32
+
33
+ # This is your username and password for geocoder.us.
34
+ # To use the free service, the value can be set to nil or false. For
35
+ # usage tied to an account, the value should be set to username:password.
36
+ # See http://geocoder.us
37
+ # and http://geocoder.us/user/signup
38
+ Geokit::Geocoders::geocoder_us = false
39
+
40
+ # This is your authorization key for geocoder.ca.
41
+ # To use the free service, the value can be set to nil or false. For
42
+ # usage tied to an account, set the value to the key obtained from
43
+ # Geocoder.ca.
44
+ # See http://geocoder.ca
45
+ # and http://geocoder.ca/?register=1
46
+ Geokit::Geocoders::geocoder_ca = false
47
+
48
+ # Uncomment to use a username with the Geonames geocoder
49
+ #Geokit::Geocoders::geonames="REPLACE_WITH_YOUR_GEONAMES_USERNAME"
50
+
51
+ # This is the order in which the geocoders are called in a failover scenario
52
+ # If you only want to use a single geocoder, put a single symbol in the array.
53
+ # Valid symbols are :google, :yahoo, :us, and :ca.
54
+ # Be aware that there are Terms of Use restrictions on how you can use the
55
+ # various geocoders. Make sure you read up on relevant Terms of Use for each
56
+ # geocoder you are going to use.
57
+ Geokit::Geocoders::provider_order = [:google,:us]
58
+
59
+ # The IP provider order. Valid symbols are :ip,:geo_plugin.
60
+ # As before, make sure you read up on relevant Terms of Use for each
61
+ # Geokit::Geocoders::ip_provider_order = [:geo_plugin,:ip]
62
+
63
+ end
@@ -1,5 +1,4 @@
1
1
  class CreateUsers < ActiveRecord::Migration
2
-
3
2
  def self.up
4
3
  create_table :users, :force => true do |t|
5
4
  t.string :login
@@ -8,29 +7,31 @@ class CreateUsers < ActiveRecord::Migration
8
7
  t.string :last_name
9
8
  t.string :crypted_password
10
9
  t.string :password_salt
11
- t.string :persistence_token
12
- t.string :single_access_token
13
- t.string :perishable_token
10
+ t.string :persistence_token, :null => false
11
+ t.string :single_access_token, :null => false
12
+ t.string :perishable_token, :null => false
14
13
  t.integer :login_count, :null => false, :default => 0
15
14
  t.integer :failed_login_count, :null => false, :default => 0
16
15
  t.datetime :last_request_at
17
- t.datetime :last_login_at
18
16
  t.datetime :current_login_at
17
+ t.datetime :last_login_at
19
18
  t.string :current_login_ip
20
19
  t.string :last_login_ip
21
- t.boolean :terms_of_service, :default => false, :null => false
22
- t.string :time_zone, :default => "UTC"
20
+ t.boolean :terms_of_service, :default => false, :null => false
21
+ t.string :time_zone, :default => "UTC"
23
22
  t.datetime :disabled_at
23
+ t.datetime :created_at
24
24
  t.datetime :activated_at
25
- t.timestamps
25
+ t.datetime :updated_at
26
+ t.string :identity_url
27
+ t.string :url_key
26
28
  end
27
29
 
28
30
  add_index :users, :login
29
31
  add_index :users, :email
30
32
  add_index :users, :persistence_token
31
- add_index :users, :perishable_token
32
- add_index :users, :single_access_token
33
33
  add_index :users, :last_request_at
34
+
34
35
  end
35
36
 
36
37
  def self.down
@@ -5,7 +5,7 @@ class CreateLanguages < ActiveRecord::Migration
5
5
  t.string :english_name
6
6
  t.string :locale
7
7
  t.boolean :supported, :default => true
8
- t.integer :is_default, :default => false
8
+ t.boolean :is_default, :default => false
9
9
  end
10
10
  add_index :languages, :name
11
11
  add_index :languages, :locale
@@ -0,0 +1,9 @@
1
+ class AddActivityIndexes < ActiveRecord::Migration
2
+ def self.up
3
+ add_index :activities, ["source_id", "source_type"]
4
+ end
5
+
6
+ def self.down
7
+ remove_index :activities, ["source_id", "source_type"]
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ class AddAttachableToActivities < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :activities, :attachable_id, :integer
4
+ add_column :activities, :attachable_type, :string
5
+ add_index :activities, ["attachable_id", "attachable_type"]
6
+ end
7
+
8
+ def self.down
9
+ remove_column :activities, :attachable_id
10
+ remove_column :activities, :attachable_type
11
+ remove_index :activities, ["attachable_id", "attachable_type"]
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ class AddLocationToProfiles < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :profiles, :location, :string
4
+ add_column :profiles, :lat, :decimal, :precision => 15, :scale => 10
5
+ add_column :profiles, :lng, :decimal, :precision => 15, :scale => 10
6
+ add_index :profiles, [:lat, :lng]
7
+ end
8
+
9
+ def self.down
10
+ remove_index :profiles, [:lat, :lng]
11
+ remove_column :profiles, :location
12
+ remove_column :profiles, :lat
13
+ remove_column :profiles, :lng
14
+ end
15
+ end
@@ -0,0 +1,21 @@
1
+ class AddFieldsToProfiles < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :profiles, :about, :text
4
+ add_column :profiles, :first_name, :string
5
+ add_column :profiles, :last_name, :string
6
+ add_column :profiles, :city, :string
7
+ add_column :profiles, :state_id, :integer
8
+ add_column :profiles, :country_id, :integer
9
+ add_column :profiles, :language_id, :integer
10
+ end
11
+
12
+ def self.down
13
+ remove_column :profiles, :about
14
+ remove_column :profiles, :first_name
15
+ remove_column :profiles, :last_name
16
+ remove_column :profiles, :city
17
+ remove_column :profiles, :state_id
18
+ remove_column :profiles, :country_id
19
+ remove_column :profiles, :language_id
20
+ end
21
+ end
@@ -1,9 +1,16 @@
1
1
  /*
2
- * FancyBox - simple and fancy jQuery plugin
3
- * Examples and documentation at: http://fancy.klade.lv/
4
- * Version: 1.2.1 (13/03/2009)
2
+ * FancyBox - jQuery Plugin
3
+ * simple and fancy lightbox alternative
4
+ *
5
5
  * Copyright (c) 2009 Janis Skarnelis
6
- * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License
6
+ * Examples and documentation at: http://fancybox.net
7
+ *
8
+ * Version: 1.2.6 (16/11/2009)
7
9
  * Requires: jQuery v1.3+
8
- */
9
- eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}(';(7($){$.b.2Q=7(){u B.2t(7(){9 1J=$(B).n(\'2Z\');5(1J.1c(/^3w\\(["\']?(.*\\.2p)["\']?\\)$/i)){1J=3t.$1;$(B).n({\'2Z\':\'45\',\'2o\':"3W:3R.4m.4d(3h=F, 3T="+($(B).n(\'41\')==\'2J-3Z\'?\'4c\':\'3N\')+", Q=\'"+1J+"\')"}).2t(7(){9 1b=$(B).n(\'1b\');5(1b!=\'2e\'&&1b!=\'2n\')$(B).n(\'1b\',\'2n\')})}})};9 A,4,16=D,s=1t 1o,1w,1v=1,1y=/\\.(3A|3Y|2p|3c|3d)(.*)?$/i;9 P=($.2q.3K&&2f($.2q.3z.2k(0,1))<8);$.b.c=7(Y){Y=$.3x({},$.b.c.2R,Y);9 2s=B;7 2h(){A=B;4=Y;2r();u D};7 2r(){5(16)u;5($.1O(4.2c)){4.2c()}4.j=[];4.h=0;5(Y.j.N>0){4.j=Y.j}t{9 O={};5(!A.1H||A.1H==\'\'){9 O={d:A.d,X:A.X};5($(A).1G("1m:1D").N){O.1a=$(A).1G("1m:1D")}4.j.2j(O)}t{9 Z=$(2s).2o("a[1H="+A.1H+"]");9 O={};3C(9 i=0;i<Z.N;i++){O={d:Z[i].d,X:Z[i].X};5($(Z[i]).1G("1m:1D").N){O.1a=$(Z[i]).1G("1m:1D")}4.j.2j(O)}3F(4.j[4.h].d!=A.d){4.h++}}}5(4.23){5(P){$(\'1U, 1Q, 1P\').n(\'1S\',\'3s\')}$("#1i").n(\'25\',4.2U).J()}1d()};7 1d(){$("#1f, #1e, #V, #G").S();9 d=4.j[4.h].d;5(d.1c(/#/)){9 U=11.3r.d.3f(\'#\')[0];U=d.3g(U,\'\');U=U.2k(U.2l(\'#\'));1k(\'<6 l="3e">\'+$(U).o()+\'</6>\',4.1I,4.1x)}t 5(d.1c(1y)){s=1t 1o;s.Q=d;5(s.3a){1K()}t{$.b.c.34();$(s).x().14(\'3b\',7(){$(".I").S();1K()})}}t 5(d.1c("17")||A.3j.2l("17")>=0){1k(\'<17 l="35" 3q="$.b.c.38()" 3o="3n\'+C.T(C.3l()*3m)+\'" 2K="0" 3E="0" Q="\'+d+\'"></17>\',4.1I,4.1x)}t{$.4p(d,7(2m){1k(\'<6 l="3L">\'+2m+\'</6>\',4.1I,4.1x)})}};7 1K(){5(4.30){9 w=$.b.c.1n();9 r=C.1M(C.1M(w[0]-36,s.g)/s.g,C.1M(w[1]-4b,s.f)/s.f);9 g=C.T(r*s.g);9 f=C.T(r*s.f)}t{9 g=s.g;9 f=s.f}1k(\'<1m 48="" l="49" Q="\'+s.Q+\'" />\',g,f)};7 2F(){5((4.j.N-1)>4.h){9 d=4.j[4.h+1].d;5(d.1c(1y)){1A=1t 1o();1A.Q=d}}5(4.h>0){9 d=4.j[4.h-1].d;5(d.1c(1y)){1A=1t 1o();1A.Q=d}}};7 1k(1j,g,f){16=F;9 L=4.2Y;5(P){$("#q")[0].1E.2u("f");$("#q")[0].1E.2u("g")}5(L>0){g+=L*2;f+=L*2;$("#q").n({\'v\':L+\'z\',\'2E\':L+\'z\',\'2i\':L+\'z\',\'y\':L+\'z\',\'g\':\'2B\',\'f\':\'2B\'});5(P){$("#q")[0].1E.2C(\'f\',\'(B.2D.4j - 20)\');$("#q")[0].1E.2C(\'g\',\'(B.2D.3S - 20)\')}}t{$("#q").n({\'v\':0,\'2E\':0,\'2i\':0,\'y\':0,\'g\':\'2z%\',\'f\':\'2z%\'})}5($("#k").1u(":19")&&g==$("#k").g()&&f==$("#k").f()){$("#q").1Z("2N",7(){$("#q").1C().1F($(1j)).21("1s",7(){1g()})});u}9 w=$.b.c.1n();9 2v=(g+36)>w[0]?w[2]:(w[2]+C.T((w[0]-g-36)/2));9 2w=(f+1z)>w[1]?w[3]:(w[3]+C.T((w[1]-f-1z)/2));9 K={\'y\':2v,\'v\':2w,\'g\':g+\'z\',\'f\':f+\'z\'};5($("#k").1u(":19")){$("#q").1Z("1s",7(){$("#q").1C();$("#k").24(K,4.2X,4.2T,7(){$("#q").1F($(1j)).21("1s",7(){1g()})})})}t{5(4.1W>0&&4.j[4.h].1a!==1L){$("#q").1C().1F($(1j));9 M=4.j[4.h].1a;9 15=$.b.c.1R(M);$("#k").n({\'y\':(15.y-18)+\'z\',\'v\':(15.v-18)+\'z\',\'g\':$(M).g(),\'f\':$(M).f()});5(4.1X){K.25=\'J\'}$("#k").24(K,4.1W,4.2W,7(){1g()})}t{$("#q").S().1C().1F($(1j)).J();$("#k").n(K).21("1s",7(){1g()})}}};7 2y(){5(4.h!=0){$("#1e, #2O").x().14("R",7(e){e.2x();4.h--;1d();u D});$("#1e").J()}5(4.h!=(4.j.N-1)){$("#1f, #2M").x().14("R",7(e){e.2x();4.h++;1d();u D});$("#1f").J()}};7 1g(){2y();2F();$(W).1B(7(e){5(e.29==27){$.b.c.1l();$(W).x("1B")}t 5(e.29==37&&4.h!=0){4.h--;1d();$(W).x("1B")}t 5(e.29==39&&4.h!=(4.j.N-1)){4.h++;1d();$(W).x("1B")}});5(4.1r){$(11).14("1N 1T",$.b.c.2g)}t{$("6#k").n("1b","2e")}5(4.2b){$("#22").R($.b.c.1l)}$("#1i, #V").14("R",$.b.c.1l);$("#V").J();5(4.j[4.h].X!==1L&&4.j[4.h].X.N>0){$(\'#G 6\').o(4.j[4.h].X);$(\'#G\').J()}5(4.23&&P){$(\'1U, 1Q, 1P\',$(\'#q\')).n(\'1S\',\'19\')}5($.1O(4.2a)){4.2a()}16=D};u B.x(\'R\').R(2h)};$.b.c.2g=7(){9 m=$.b.c.1n();$("#k").n(\'y\',(($("#k").g()+36)>m[0]?m[2]:m[2]+C.T((m[0]-$("#k").g()-36)/2)));$("#k").n(\'v\',(($("#k").f()+1z)>m[1]?m[3]:m[3]+C.T((m[1]-$("#k").f()-1z)/2)))};$.b.c.1h=7(H,2A){u 2f($.3I(H.3u?H[0]:H,2A,F))||0};$.b.c.1R=7(H){9 m=H.4g();m.v+=$.b.c.1h(H,\'3k\');m.v+=$.b.c.1h(H,\'3J\');m.y+=$.b.c.1h(H,\'3H\');m.y+=$.b.c.1h(H,\'3D\');u m};$.b.c.38=7(){$(".I").S();$("#35").J()};$.b.c.1n=7(){u[$(11).g(),$(11).f(),$(W).3i(),$(W).3p()]};$.b.c.2G=7(){5(!$("#I").1u(\':19\')){33(1w);u}$("#I > 6").n(\'v\',(1v*-40)+\'z\');1v=(1v+1)%12};$.b.c.34=7(){33(1w);9 m=$.b.c.1n();$("#I").n({\'y\':((m[0]-40)/2+m[2]),\'v\':((m[1]-40)/2+m[3])}).J();$("#I").14(\'R\',$.b.c.1l);1w=3Q($.b.c.2G,3X)};$.b.c.1l=7(){16=F;$(s).x();$("#1i, #V").x();5(4.2b){$("#22").x()}$("#V, .I, #1e, #1f, #G").S();5(4.1r){$(11).x("1N 1T")}1q=7(){$("#1i, #k").S();5(4.1r){$(11).x("1N 1T")}5(P){$(\'1U, 1Q, 1P\').n(\'1S\',\'19\')}5($.1O(4.1V)){4.1V()}16=D};5($("#k").1u(":19")!==D){5(4.26>0&&4.j[4.h].1a!==1L){9 M=4.j[4.h].1a;9 15=$.b.c.1R(M);9 K={\'y\':(15.y-18)+\'z\',\'v\':(15.v-18)+\'z\',\'g\':$(M).g(),\'f\':$(M).f()};5(4.1X){K.25=\'S\'}$("#k").31(D,F).24(K,4.26,4.2S,1q)}t{$("#k").31(D,F).1Z("2N",1q)}}t{1q()}u D};$.b.c.2V=7(){9 o=\'\';o+=\'<6 l="1i"></6>\';o+=\'<6 l="22">\';o+=\'<6 p="I" l="I"><6></6></6>\';o+=\'<6 l="k">\';o+=\'<6 l="2I">\';o+=\'<6 l="V"></6>\';o+=\'<6 l="E"><6 p="E 44"></6><6 p="E 43"></6><6 p="E 42"></6><6 p="E 3V"></6><6 p="E 3U"></6><6 p="E 3O"></6><6 p="E 3M"></6><6 p="E 3P"></6></6>\';o+=\'<a d="2P:;" l="1e"><1p p="1Y" l="2O"></1p></a><a d="2P:;" l="1f"><1p p="1Y" l="2M"></1p></a>\';o+=\'<6 l="q"></6>\';o+=\'<6 l="G"></6>\';o+=\'</6>\';o+=\'</6>\';o+=\'</6>\';$(o).2H("46");$(\'<32 4i="0" 4h="0" 4k="0"><2L><13 p="G" l="4l"></13><13 p="G" l="4o"><6></6></13><13 p="G" l="4n"></13></2L></32>\').2H(\'#G\');5(P){$("#2I").47(\'<17 p="4a" 4e="2J" 2K="0"></17>\');$("#V, .E, .G, .1Y").2Q()}};$.b.c.2R={2Y:10,30:F,1X:D,1W:0,26:0,2X:3G,2W:\'28\',2S:\'28\',2T:\'28\',1I:3B,1x:3v,23:F,2U:0.3,2b:F,1r:F,j:[],2c:2d,2a:2d,1V:2d};$(W).3y(7(){$.b.c.2V()})})(4f);',62,274,'||||opts|if|div|function||var||fn|fancybox|href||height|width|itemCurrent||itemArray|fancy_outer|id|pos|css|html|class|fancy_content||imagePreloader|else|return|top||unbind|left|px|elem|this|Math|false|fancy_bg|true|fancy_title|el|fancy_loading|show|itemOpts|pad|orig_item|length|item|isIE|src|click|hide|round|target|fancy_close|document|title|settings|subGroup||window||td|bind|orig_pos|busy|iframe||visible|orig|position|match|_change_item|fancy_left|fancy_right|_finish|getNumeric|fancy_overlay|value|_set_content|close|img|getViewport|Image|span|__cleanup|centerOnScroll|normal|new|is|loadingFrame|loadingTimer|frameHeight|imageRegExp|50|objNext|keydown|empty|first|style|append|children|rel|frameWidth|image|_proceed_image|undefined|min|resize|isFunction|select|object|getPosition|visibility|scroll|embed|callbackOnClose|zoomSpeedIn|zoomOpacity|fancy_ico|fadeOut||fadeIn|fancy_wrap|overlayShow|animate|opacity|zoomSpeedOut||swing|keyCode|callbackOnShow|hideOnContentClick|callbackOnStart|null|absolute|parseInt|scrollBox|_initialize|bottom|push|substr|indexOf|data|relative|filter|png|browser|_start|matchedGroup|each|removeExpression|itemLeft|itemTop|stopPropagation|_set_navigation|100|prop|auto|setExpression|parentNode|right|_preload_neighbor_images|animateLoading|appendTo|fancy_inner|no|frameborder|tr|fancy_right_ico|fast|fancy_left_ico|javascript|fixPNG|defaults|easingOut|easingChange|overlayOpacity|build|easingIn|zoomSpeedChange|padding|backgroundImage|imageScale|stop|table|clearInterval|showLoading|fancy_frame|||showIframe||complete|load|bmp|jpeg|fancy_div|split|replace|enabled|scrollLeft|className|paddingTop|random|1000|fancy_iframe|name|scrollTop|onload|location|hidden|RegExp|jquery|355|url|extend|ready|version|jpg|425|for|borderLeftWidth|hspace|while|300|paddingLeft|curCSS|borderTopWidth|msie|fancy_ajax|fancy_bg_w|scale|fancy_bg_sw|fancy_bg_nw|setInterval|DXImageTransform|clientWidth|sizingMethod|fancy_bg_s|fancy_bg_se|progid|66|gif|repeat||backgroundRepeat|fancy_bg_e|fancy_bg_ne|fancy_bg_n|none|body|prepend|alt|fancy_img|fancy_bigIframe|60|crop|AlphaImageLoader|scrolling|jQuery|offset|cellpadding|cellspacing|clientHeight|border|fancy_title_left|Microsoft|fancy_title_right|fancy_title_main|get'.split('|'),0,{}))
10
+ *
11
+ * Dual licensed under the MIT and GPL licenses:
12
+ * http://www.opensource.org/licenses/mit-license.php
13
+ * http://www.gnu.org/licenses/gpl.html
14
+ */
15
+
16
+ ;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(p($){$.q.1Q=p(){J O.2n(p(){n b=$(O).u(\'2o\');8(b.1d(/^3i\\(["\']?(.*\\.2p)["\']?\\)$/i)){b=3j.$1;$(O).u({\'2o\':\'3k\',\'1e\':"3l:3m.3n.3o(3p=D, 3q="+($(O).u(\'3r\')==\'2q-3s\'?\'3t\':\'3u\')+", 13=\'"+b+"\')"}).2n(p(){n a=$(O).u(\'1u\');8(a!=\'2r\'&&a!=\'2s\')$(O).u(\'1u\',\'2s\')})}})};n l,4,1f=F,X=1v 1w,1x,1y=1,1z=/\\.(3v|3w|2p|3x|3y)(.*)?$/i;n m=1A,18=$.14.1g&&$.14.2t.1R(0,1)==6&&!19.3z,1S=18||($.14.1g&&$.14.2t.1R(0,1)==7);$.q.r=p(o){n j=$.2u({},$.q.r.2v,o);n k=O;p 2w(){l=O;4=$.2u({},j);2x();J F};p 2x(){8(1f)J;8($.1T(4.1U)){4.1U()}4.v=[];4.t=0;8(j.v.Y>0){4.v=j.v}C{n a={};8(!l.1B||l.1B==\'\'){n a={K:l.K,G:l.G};8($(l).1C("1l:1D").Y){a.S=$(l).1C("1l:1D")}C{a.S=$(l)}8(a.G==\'\'||1V a.G==\'1m\'){a.G=a.S.2y(\'1W\')}4.v.2z(a)}C{n b=$(k).1e("a[1B="+l.1B+"]");n a={};3A(n i=0;i<b.Y;i++){a={K:b[i].K,G:b[i].G};8($(b[i]).1C("1l:1D").Y){a.S=$(b[i]).1C("1l:1D")}C{a.S=$(b[i])}8(a.G==\'\'||1V a.G==\'1m\'){a.G=a.S.2y(\'1W\')}4.v.2z(a)}}}3B(4.v[4.t].K!=l.K){4.t++}8(4.1E){8(18){$(\'1X, 1Y, 1Z\').u(\'21\',\'3C\');$("#T").u(\'A\',$(U).A())}$("#T").u({\'3D-3E\':4.2A,\'22\':4.2B}).Z()}$(19).11("23.L 24.L",$.q.r.2C);1h()};p 1h(){$("#1n, #1o, #1i, #H").1a();n b=4.v[4.t].K;8(b.1d("1j")||l.3F.2D("1j")>=0){$.q.r.1F();1p(\'<1j s="2E" 3G="2F.q.r.2G()" 3H="3I\'+P.1b(P.3J()*3K)+\'" 2H="0" 3L="0" 13="\'+b+\'"></1j>\',4.1G,4.1H)}C 8(b.1d(/#/)){n c=19.3M.K.3N(\'#\')[0];c=b.3O(c,\'\');c=c.1R(c.2D(\'#\'));1p(\'<9 s="3P">\'+$(c).2I()+\'</9>\',4.1G,4.1H)}C 8(b.1d(1z)){X=1v 1w;X.13=b;8(X.3Q){25()}C{$.q.r.1F();$(X).Q().11(\'3R\',p(){$("#M").1a();25()})}}C{$.q.r.1F();$.3S(b,p(a){$("#M").1a();1p(\'<9 s="3T">\'+a+\'</9>\',4.1G,4.1H)})}};p 25(){n a=X.E;n b=X.A;n c=(4.N*2)+40;n d=(4.N*2)+26;n w=$.q.r.1q();8(4.2J&&(a>(w[0]-c)||b>(w[1]-d))){n e=P.28(P.28(w[0]-c,a)/a,P.28(w[1]-d,b)/b);a=P.1b(e*a);b=P.1b(e*b)}1p(\'<1l 1W="" s="3U" 13="\'+X.13+\'" />\',a,b)};p 2K(){8((4.v.Y-1)>4.t){n a=4.v[4.t+1].K||F;8(a&&a.1d(1z)){1I=1v 1w();1I.13=a}}8(4.t>0){n a=4.v[4.t-1].K||F;8(a&&a.1d(1z)){1I=1v 1w();1I.13=a}}};p 1p(a,b,c){1f=D;n d=4.N;8(1S||m){$("#y")[0].15.2L("A");$("#y")[0].15.2L("E")}8(d>0){b+=d*2;c+=d*2;$("#y").u({\'z\':d+\'R\',\'2M\':d+\'R\',\'2N\':d+\'R\',\'B\':d+\'R\',\'E\':\'2O\',\'A\':\'2O\'});8(1S||m){$("#y")[0].15.2P(\'A\',\'(O.2Q.3V - \'+d*2+\')\');$("#y")[0].15.2P(\'E\',\'(O.2Q.3W - \'+d*2+\')\')}}C{$("#y").u({\'z\':0,\'2M\':0,\'2N\':0,\'B\':0,\'E\':\'2R%\',\'A\':\'2R%\'})}8($("#x").16(":V")&&b==$("#x").E()&&c==$("#x").A()){$("#y").1J(\'29\',p(){$("#y").1r().1K($(a)).2a("1L",p(){1s()})});J}n w=$.q.r.1q();n e=(c+26)>w[1]?w[3]:(w[3]+P.1b((w[1]-c-26)*0.5));n f=(b+40)>w[0]?w[2]:(w[2]+P.1b((w[0]-b-40)*0.5));n g={\'B\':f,\'z\':e,\'E\':b+\'R\',\'A\':c+\'R\'};8($("#x").16(":V")){$("#y").1J("1L",p(){$("#y").1r();$("#x").2b(g,4.2S,4.2T,p(){$("#y").1K($(a)).2a("1L",p(){1s()})})})}C{8(4.2c>0&&4.v[4.t].S!==1m){$("#y").1r().1K($(a));n h=4.v[4.t].S;n i=$.q.r.2d(h);$("#x").u({\'B\':(i.B-20-4.N)+\'R\',\'z\':(i.z-20-4.N)+\'R\',\'E\':$(h).E()+(4.N*2),\'A\':$(h).A()+(4.N*2)});8(4.2e){g.22=\'Z\'}$("#x").2b(g,4.2c,4.2U,p(){1s()})}C{$("#y").1a().1r().1K($(a)).Z();$("#x").u(g).2a("1L",p(){1s()})}}};p 2V(){8(4.t!==0){$("#1o, #2W").Q().11("17",p(e){e.2X();4.t--;1h();J F});$("#1o").Z()}8(4.t!=(4.v.Y-1)){$("#1n, #2Y").Q().11("17",p(e){e.2X();4.t++;1h();J F});$("#1n").Z()}};p 1s(){8($.14.1g){$("#y")[0].15.1M(\'1e\');$("#x")[0].15.1M(\'1e\')}2V();2K();$(U).11("1N.L",p(e){8(e.2f==27&&4.2Z){$.q.r.1c()}C 8(e.2f==37&&4.t!==0){$(U).Q("1N.L");4.t--;1h()}C 8(e.2f==39&&4.t!=(4.v.Y-1)){$(U).Q("1N.L");4.t++;1h()}});8(4.30){$("#y").17($.q.r.1c)}8(4.1E&&4.31){$("#T").11("17",$.q.r.1c)}8(4.33){$("#1i").11("17",$.q.r.1c).Z()}8(1V 4.v[4.t].G!==\'1m\'&&4.v[4.t].G.Y>0){n a=$("#x").1u();$(\'#H 9\').3X(4.v[4.t].G).2I();$(\'#H\').u({\'z\':a.z+$("#x").34()-32,\'B\':a.B+(($("#x").35()*0.5)-($(\'#H\').E()*0.5))}).Z()}8(4.1E&&18){$(\'1X, 1Y, 1Z\',$(\'#y\')).u(\'21\',\'V\')}8($.1T(4.2g)){4.2g(4.v[4.t])}8($.14.1g){$("#x")[0].15.1M(\'1e\');$("#y")[0].15.1M(\'1e\')}1f=F};J O.Q(\'17.L\').11(\'17.L\',2w)};$.q.r.2C=p(){n w=$.q.r.1q();8(4.2h&&$("#x").16(\':V\')){n a=$("#x").35();n b=$("#x").34();n c={\'z\':(b>w[1]?w[3]:w[3]+P.1b((w[1]-b)*0.5)),\'B\':(a>w[0]?w[2]:w[2]+P.1b((w[0]-a)*0.5))};$("#x").u(c);$(\'#H\').u({\'z\':c.z+b-32,\'B\':c.B+((a*0.5)-($(\'#H\').E()*0.5))})}8(18&&$("#T").16(\':V\')){$("#T").u({\'A\':$(U).A()})}8($("#M").16(\':V\')){$("#M").u({\'B\':((w[0]-40)*0.5+w[2]),\'z\':((w[1]-40)*0.5+w[3])})}};$.q.r.1t=p(a,b){J 3Y($.3Z(a.41?a[0]:a,b,D))||0};$.q.r.2d=p(a){n b=a.42();b.z+=$.q.r.1t(a,\'43\');b.z+=$.q.r.1t(a,\'44\');b.B+=$.q.r.1t(a,\'45\');b.B+=$.q.r.1t(a,\'46\');J b};$.q.r.2G=p(){$("#M").1a();$("#2E").Z()};$.q.r.1q=p(){J[$(19).E(),$(19).A(),$(U).47(),$(U).48()]};$.q.r.36=p(){8(!$("#M").16(\':V\')){38(1x);J}$("#M > 9").u(\'z\',(1y*-40)+\'R\');1y=(1y+1)%12};$.q.r.1F=p(){38(1x);n w=$.q.r.1q();$("#M").u({\'B\':((w[0]-40)*0.5+w[2]),\'z\':((w[1]-40)*0.5+w[3])}).Z();$("#M").11(\'17\',$.q.r.1c);1x=49($.q.r.36,4a)};$.q.r.1c=p(){1f=D;$(X).Q();$(U).Q("1N.L");$(19).Q("23.L 24.L");$("#T, #y, #1i").Q();$("#1i, #M, #1o, #1n, #H").1a();1O=p(){8($("#T").16(\':V\')){$("#T").1J("29")}$("#y").1r();8(4.2h){$(19).Q("23.L 24.L")}8(18){$(\'1X, 1Y, 1Z\').u(\'21\',\'V\')}8($.1T(4.2i)){4.2i()}1f=F};8($("#x").16(":V")!==F){8(4.2j>0&&4.v[4.t].S!==1m){n a=4.v[4.t].S;n b=$.q.r.2d(a);n c={\'B\':(b.B-20-4.N)+\'R\',\'z\':(b.z-20-4.N)+\'R\',\'E\':$(a).E()+(4.N*2),\'A\':$(a).A()+(4.N*2)};8(4.2e){c.22=\'1a\'}$("#x").3a(F,D).2b(c,4.2j,4.3b,1O)}C{$("#x").3a(F,D).1J(\'29\',1O)}}C{1O()}J F};$.q.r.3c=p(){n a=\'\';a+=\'<9 s="T"></9>\';a+=\'<9 s="M"><9></9></9>\';a+=\'<9 s="x">\';a+=\'<9 s="3d">\';a+=\'<9 s="1i"></9>\';a+=\'<9 s="W"><9 I="W" s="4b"></9><9 I="W" s="4c"></9><9 I="W" s="4d"></9><9 I="W" s="4e"></9><9 I="W" s="4f"></9><9 I="W" s="4g"></9><9 I="W" s="4h"></9><9 I="W" s="4i"></9></9>\';a+=\'<a K="2k:;" s="1o"><1P I="2l" s="2W"></1P></a><a K="2k:;" s="1n"><1P I="2l" s="2Y"></1P></a>\';a+=\'<9 s="y"></9>\';a+=\'</9>\';a+=\'</9>\';a+=\'<9 s="H"></9>\';$(a).3e("4j");$(\'<3f 4k="0" 4l="0" 4m="0"><3g><1k I="H" s="4n"></1k><1k I="H" s="4o"><9></9></1k><1k I="H" s="4p"></1k></3g></3f>\').3e(\'#H\');8($.14.1g){$(".W").1Q()}8(18){$("9#T").u("1u","2r");$("#M 9, #1i, .H, .2l").1Q();$("#3d").4q(\'<1j s="3h" 13="2k:F;" 4r="2q" 2H="0"></1j>\');n b=$(\'#3h\')[0].4s.U;b.4t();b.1c()}};$.q.r.2v={N:10,2J:D,2e:D,2c:0,2j:0,2S:4u,2U:\'2m\',3b:\'2m\',2T:\'2m\',1G:4v,1H:4w,1E:D,2B:0.3,2A:\'#4x\',2Z:D,33:D,31:D,30:D,2h:D,v:[],1U:1A,2g:1A,2i:1A};$(U).4y(p(){m=$.14.1g&&!$.4z;8($("#x").Y<1){$.q.r.3c()}})})(2F);',62,284,'||||opts||||if|div||||||||||||||var||function|fn|fancybox|id|itemCurrent|css|itemArray||fancy_outer|fancy_content|top|height|left|else|true|width|false|title|fancy_title|class|return|href|fb|fancy_loading|padding|this|Math|unbind|px|orig|fancy_overlay|document|visible|fancy_bg|imagePreloader|length|show||bind||src|browser|style|is|click|IE6|window|hide|round|close|match|filter|busy|msie|_change_item|fancy_close|iframe|td|img|undefined|fancy_right|fancy_left|_set_content|getViewport|empty|_finish|getNumeric|position|new|Image|loadingTimer|loadingFrame|imageRegExp|null|rel|children|first|overlayShow|showLoading|frameWidth|frameHeight|objNext|fadeOut|append|normal|removeAttribute|keydown|__cleanup|span|fixPNG|substr|oldIE|isFunction|callbackOnStart|typeof|alt|embed|object|select||visibility|opacity|resize|scroll|_proceed_image|60||min|fast|fadeIn|animate|zoomSpeedIn|getPosition|zoomOpacity|keyCode|callbackOnShow|centerOnScroll|callbackOnClose|zoomSpeedOut|javascript|fancy_ico|swing|each|backgroundImage|png|no|absolute|relative|version|extend|defaults|_initialize|_start|attr|push|overlayColor|overlayOpacity|scrollBox|indexOf|fancy_frame|jQuery|showIframe|frameborder|html|imageScale|_preload_neighbor_images|removeExpression|right|bottom|auto|setExpression|parentNode|100|zoomSpeedChange|easingChange|easingIn|_set_navigation|fancy_left_ico|stopPropagation|fancy_right_ico|enableEscapeButton|hideOnContentClick|hideOnOverlayClick||showCloseButton|outerHeight|outerWidth|animateLoading||clearInterval||stop|easingOut|build|fancy_inner|appendTo|table|tr|fancy_bigIframe|url|RegExp|none|progid|DXImageTransform|Microsoft|AlphaImageLoader|enabled|sizingMethod|backgroundRepeat|repeat|crop|scale|jpg|gif|bmp|jpeg|XMLHttpRequest|for|while|hidden|background|color|className|onload|name|fancy_iframe|random|1000|hspace|location|split|replace|fancy_div|complete|load|get|fancy_ajax|fancy_img|clientHeight|clientWidth|text|parseInt|curCSS||jquery|offset|paddingTop|borderTopWidth|paddingLeft|borderLeftWidth|scrollLeft|scrollTop|setInterval|66|fancy_bg_n|fancy_bg_ne|fancy_bg_e|fancy_bg_se|fancy_bg_s|fancy_bg_sw|fancy_bg_w|fancy_bg_nw|body|cellspacing|cellpadding|border|fancy_title_left|fancy_title_main|fancy_title_right|prepend|scrolling|contentWindow|open|300|560|340|666|ready|boxModel'.split('|'),0,{}));
@@ -1,16 +1,17 @@
1
1
  jQuery(document).ready(function() {
2
2
  jQuery(".tip-field").focus(function() {
3
3
  jQuery(".active").removeClass("active");
4
- var tip_key = jQuery('#' + this.id).siblings('#tip-key');
4
+ var tip_key = jQuery('#' + this.id).siblings('.tip-key');
5
5
  var control_id = this.id;
6
6
  var help_id = this.id;
7
+ var field = jQuery('#' + this.id);
7
8
  if (tip_key.length > 0){
8
9
  control_id = tip_key.html();
9
- help_id = jQuery('#' + this.id).siblings('#tip-id').html();
10
- }
11
- var tip_text = jQuery('#' + help_id + "-help").html();
12
- var tip_title = jQuery('#' + help_id + "-help-title").html();
13
- var tip_position = jQuery('#' + help_id + "-help-position").html();
10
+ help_id = field.siblings('.tip-id').html();
11
+ }
12
+ var tip_text = field.siblings('.tip-text').html();
13
+ var tip_title = field.siblings('.tip-title').html();
14
+ var tip_position = field.siblings('.tip-position').html();
14
15
  if (!tip_position) { tip_position = 'right'; }
15
16
  show_tip(control_id, tip_title, tip_text, tip_position);
16
17
  jQuery("#" + help_id + "-container").addClass("active");
@@ -51,6 +51,47 @@ function show_hide_obj (ary_objs_to_show, ary_objs_to_hide)
51
51
  }
52
52
  }
53
53
 
54
+ function setup_country(force_load){
55
+
56
+ var country_id = jQuery("#countries").val();
57
+ var state_id = jQuery("#states").val();
58
+
59
+ if (country_id == undefined){
60
+ return;
61
+ }
62
+
63
+ if (country_id == '-1'){
64
+ jQuery("#states").val('-1');
65
+ jQuery("#counties").val('-1');
66
+ }
67
+
68
+ if (country_id == '-1' || country_id == ''){
69
+ jQuery("#states-container").hide();
70
+ jQuery("#counties-container").hide();
71
+ return;
72
+ }
73
+
74
+ if(force_load || state_id == '' || state_id == null || state_id == -1) {
75
+ jQuery.getJSON("/helper/load_states_for_country/" + country_id + ".js", function(data){
76
+ var options = '';
77
+ jQuery("#counties-container").hide();
78
+ jQuery('#states-container label').html(data.label);
79
+ states = data.states;
80
+ if(states.length > 0){
81
+ for (var i = 0; i < states.length; i++) {
82
+ var state_id = states[i].state.id;
83
+ if(state_id == undefined) { state_id = ''; }
84
+ options += '<option value="' + state_id + '">' + states[i].state.name + '</option>';
85
+ }
86
+ jQuery("#states-container").show();
87
+ jQuery("select#states").html(options);
88
+ } else {
89
+ jQuery("#states-container").hide();
90
+ }
91
+ });
92
+ }
93
+ }
94
+
54
95
  jQuery.jGrowl.defaults.position = 'center';
55
96
 
56
97
  jQuery.jGrowl.info = function(msg){
@@ -69,12 +110,18 @@ jQuery(document).ready(function() {
69
110
  jQuery("#global-login").focus(function() {
70
111
  jQuery("#global-login").val("");
71
112
  });
72
-
73
113
  jQuery("#global-password").focus(function() {
74
114
  jQuery("#global-password").val("");
75
115
  });
76
-
77
116
  jQuery("#quick-login-submit").click(function() {
78
117
  jQuery("#quick-login").submit();
79
- });
118
+ });
119
+
120
+ jQuery("#countries-container select").change(function() {
121
+ setup_country(true);
122
+ });
123
+ if(jQuery("#states").val() == '' || jQuery("#states").val() == null) {
124
+ jQuery("#states-container").hide();
125
+ }
126
+ setup_country(false);
80
127
  });