/m)[1].
+ gsub(/<.*?>/m,"").
+ gsub(" ","").
+ gsub("’", "'").
+ gsub(/\n\n\n*/,"\n\n")
+ end
+ }
+
end
end
diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb
deleted file mode 100644
index 1aabda5e9..000000000
--- a/app/controllers/events_controller.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-class EventsController < CommunitiesController
- before_filter :owner
- load_and_authorize_resource
-
- def index
- @items = current_community.events
- end
-
- def your
- @items = current_user.events
- render :index
- end
-
- def suggested
- @items = current_user.suggested_events
- render :index
- end
-
- def new
- end
-
- def create
- @event = Event.new(params[:event].merge(:owner => @owner))
- if @event.save
- redirect_to events_path
- else
- render :new
- end
- end
-
- def update
- end
- def show
- if current_user.events.include?(@event) && !flash.now[:message]
- flash.now[:message] = "You are attending #{@event.name}"
- end
- end
-
- def owner
- if params[:event] && params[:event][:owner]
- owner_class, owner_id = params[:event].delete(:owner).try(:split, "_")
- @owner = owner_class.capitalize.constantize.find(owner_id.to_i)
- end
- end
-end
-
diff --git a/app/controllers/facebook_canvas_controller.rb b/app/controllers/facebook_canvas_controller.rb
new file mode 100644
index 000000000..02fe50b70
--- /dev/null
+++ b/app/controllers/facebook_canvas_controller.rb
@@ -0,0 +1,12 @@
+require 'open-uri'
+
+class FacebookCanvasController < ApplicationController
+
+ def index
+ @request_id = params[:request_ids]
+ url = "https://graph.facebook.com/oauth/access_token?&client_id=#{$FacebookConfig['app_id']}&client_secret=#{$FacebookConfig['app_secret']}&grant_type=client_credentials"
+ @application_token = open(url).read.gsub("access_token=","")
+ render :layout => nil
+ end
+
+end
diff --git a/app/controllers/feed_registrations_controller.rb b/app/controllers/feed_registrations_controller.rb
new file mode 100644
index 000000000..d157c26a3
--- /dev/null
+++ b/app/controllers/feed_registrations_controller.rb
@@ -0,0 +1,56 @@
+class FeedRegistrationsController < ApplicationController
+
+ helper_method :registration
+
+ layout 'feed_registration'
+
+ before_filter :authenticate_user!
+
+ def new ; end
+
+ def create
+ registration.attributes = params[:feed]
+ if registration.save
+ if registration.has_avatar?
+ redirect_to avatar_feed_registration_url(registration)
+ else
+ redirect_to profile_feed_registration_url(registration)
+ end
+ else
+ render :new
+ end
+ end
+
+ def avatar ; end
+
+ def crop_avatar
+ registration.update_attributes(params[:feed])
+ redirect_to profile_feed_registration_url(registration)
+ end
+
+ def profile ; end
+
+ def add_profile
+ if registration.update_attributes params[:feed]
+ redirect_to subscribers_feed_registration_url(registration)
+ else
+ render :profile
+ end
+ end
+
+ def subscribers ; end
+
+ def invite_subscribers
+ registration.invite_subscribers(params[:feed_subscribers])
+ redirect_to "/pages/#{registration.feed.slug.blank? ? registration.feed.id : registration.feed.slug}"
+ end
+
+ protected
+
+ def registration
+ @registration ||=
+ FeedRegistration.find_or_create(:id => params[:id],
+ :community => current_community,
+ :user => current_user)
+ end
+end
diff --git a/app/controllers/feeds/announcements_controller.rb b/app/controllers/feeds/announcements_controller.rb
deleted file mode 100644
index 757d3374e..000000000
--- a/app/controllers/feeds/announcements_controller.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-class Feeds::AnnouncementsController < ApplicationController
-
- layout :choose_layout
-
- def new
- @feed = Feed.find(params[:feed_id])
- @announcement = Announcement.new
- end
-
- def create
- @feed = Feed.find(params[:feed_id])
- @announcement = @feed.announcements.build(params[:announcement])
- if @announcement.save
- render :create
- else
- render :new
- end
- end
-
- private
- def choose_layout
- xhr? ? 'application' : '/feeds/profile.haml'
- end
-end
diff --git a/app/controllers/feeds/events_controller.rb b/app/controllers/feeds/events_controller.rb
deleted file mode 100644
index 556de6c58..000000000
--- a/app/controllers/feeds/events_controller.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-class Feeds::EventsController < ApplicationController
-
- layout :choose_layout
-
- def new
- @feed = Feed.find(params[:feed_id])
- @event = Event.new
- end
-
- def create
- @feed = Feed.find(params[:feed_id])
- @event = @feed.events.build(params[:event])
- if @event.save
- render :create
- else
- render :new
- end
- end
-
- private
- def choose_layout
- xhr? ? 'application' : '/feeds/profile.haml'
- end
-
-end
diff --git a/app/controllers/feeds/invites_controller.rb b/app/controllers/feeds/invites_controller.rb
deleted file mode 100644
index bd850c794..000000000
--- a/app/controllers/feeds/invites_controller.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-class Feeds::InvitesController < ApplicationController
-
- def new
- @feed = Feed.find(params[:feed_id])
- end
-
- def create
- @feed = Feed.find(params[:feed_id])
- params[:emails].split(",").each do |email|
- unless User.exists?(:email => email)
- InviteMailer.deliver_feed_invite(@feed.id,email)
- end
- end
- redirect_to feed_profile_path(@feed)
- end
-
-end
diff --git a/app/controllers/feeds_controller.rb b/app/controllers/feeds_controller.rb
index b2e83357b..a84b83b16 100644
--- a/app/controllers/feeds_controller.rb
+++ b/app/controllers/feeds_controller.rb
@@ -1,71 +1,71 @@
class FeedsController < CommunitiesController
- before_filter :load, :except => [:index,:show]
- authorize_resource
-
- def index
- @items = current_community.feeds.all(:order => "name ASC")
- end
+ before_filter :load
- def municipal
- @items = current_community.feeds
- render :index
- end
-
- def show
- case params[:id]
- when /\d+/
- @feed = Feed.find(params[:id])
- if current_user.feeds.include?(@feed) && !flash.now[:message]
- flash.now[:message] = "You are subscribed to #{@feed.name}"
- end
- else
- params[:action] = "profile"
- @feed = Feed.find_by_slug_and_community_id(params[:id],current_community.id)
- render :profile, :layout => false
- end
- end
-
- def import
- render :layout => xhr? ? 'application' : "/feeds/profile"
+ def delete
+ render :layout => 'application'
end
- def profile
- render :layout => false
+ def destroy
+ @feed.destroy
+ redirect_to root_url
end
- def new
+ def edit_owner
render :layout => 'application'
end
- def create
- @feed = current_community.feeds.new(params[:feed])
- @feed.user = current_user
- if @feed.save
- redirect_to new_feed_invites_url(@feed)
+ def update_owner
+ if user = User.find_by_email(params[:email])
+ @feed.user = user
+ @feed.owners << user
+ @feed.save
+ redirect_to root_url
else
- render :new, :layout => 'application'
+ @error = true
+ render :edit_owner, :layout => 'application'
end
end
def edit
- render :layout => 'application'
+ render :layout => 'feed_registration'
+ end
+
+ def avatar
+ render :layout => 'feed_registration'
+ end
+
+ def crop_avatar
+ @feed.update_attributes(params[:feed])
+ redirect_to feed_profile_path(@feed)
end
def update
if @feed.update_attributes(params[:feed])
- redirect_to profile_feed_url(@feed)
+ if params[:feed].has_key?(:avatar)
+ redirect_to :action => :avatar
+ else
+ redirect_to feed_profile_path(@feed)
+ end
else
- render :edit, :layout => 'application'
+ render :edit, :layout => 'feed_registration'
end
end
protected
def load
@feed =
- if params[:id]
- Feed.find(params[:id], :scope => current_community)
+ case params[:id]
+ when /^\d+$/
+ Feed.find(params[:id])
+ when /[^\d]/
+ params[:action] = "profile"
+ Feed.find_by_slug_and_community_id(params[:id], current_community.id)
else
Feed.new
end
end
+
+ def feed_profile_path(feed)
+ "/pages/#{feed.slug.blank? ? feed.id : feed.slug}"
+ end
end
diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb
deleted file mode 100644
index 27f53e44c..000000000
--- a/app/controllers/invites_controller.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-class InvitesController < CommunitiesController
-
- def new
- end
-
- def create
- params[:emails].split(",").each do |email|
- unless User.exists?(:email => email)
- InviteMailer.deliver_user_invite(current_user.id,email,params[:message])
- end
- end
- redirect_to new_post_path
- end
-
-
-end
diff --git a/app/controllers/management_controller.rb b/app/controllers/management_controller.rb
deleted file mode 100644
index 0b4827f1b..000000000
--- a/app/controllers/management_controller.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class ManagementController < ApplicationController
-
- def show
- authorize!(:read, :management)
- end
-
-
- protected
-
- def current_ability
- @current_ability ||= ManagementAbility.new(current_user)
- end
-end
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
deleted file mode 100644
index fc50f885d..000000000
--- a/app/controllers/messages_controller.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-class MessagesController < CommunitiesController
- helper_method :parent
-
-
- def new
- authorize! :create, Reply
- @user = parent
- @message = Message.new
- end
-
- def create
- @message = parent.messages.build(params[:message].merge(:user => current_user))
- if @message.save
- parent.notifications.create(:notifiable => @message)
- flash.now[:message] = "Message sent to #{parent.name}"
- else
- render :new
- end
- end
-
- protected
- def parent
- @parent ||= params[:messagable].constantize.find(params[(params[:messagable].downcase + "_id").intern])
- end
-end
diff --git a/app/controllers/mets_controller.rb b/app/controllers/mets_controller.rb
deleted file mode 100644
index 99572d1ac..000000000
--- a/app/controllers/mets_controller.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class MetsController < ApplicationController
-
- layout false
-
- def create
- @user = User.find(params[:user_id])
- unless current_user.people.exists? @user
- current_user.people << @user
- end
- flash[:message] = "You have met #{@user.name}"
- redirect_to user_path(@user)
- end
-
-end
diff --git a/app/controllers/neighborhood/people_controller.rb b/app/controllers/neighborhood/people_controller.rb
deleted file mode 100644
index 986758d20..000000000
--- a/app/controllers/neighborhood/people_controller.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-class Neighborhood::PeopleController < CommunitiesController
-
- def index
- authorize! :read, User
- @items = current_neighborhood.users.all(:order => "last_name ASC")
- @render_args = Proc.new { |u| ['users/user', {:user => u}] }
- end
-end
diff --git a/app/controllers/organizer_controller.rb b/app/controllers/organizer_controller.rb
new file mode 100644
index 000000000..6b48edbe8
--- /dev/null
+++ b/app/controllers/organizer_controller.rb
@@ -0,0 +1,15 @@
+class OrganizerController < ApplicationController
+ def app
+ @center_zip_code = current_community.zip_code.to_s
+ @community_id = current_community.id
+ end
+
+ def add
+ puts "(1..#{params[:entry_count]})"
+ (1..(params[:entry_count].to_i)).each do |e|
+ cp_client.add_data_point(current_community, {:number => params["number_#{e}"], :address => params["address_#{e}"], :status => params[:status]})
+ end
+ redirect_to :action => :app
+ end
+
+end
diff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rb
index 11fa45433..aef620232 100644
--- a/app/controllers/password_resets_controller.rb
+++ b/app/controllers/password_resets_controller.rb
@@ -1,40 +1,3 @@
-class PasswordResetsController < CommunitiesController
- layout 'application'
-
- def new
- @email = ""
- end
-
- def create
- if @user = User.find_by_email(params[:email])
- @user.reset_perishable_token!
- PasswordsMailer.deliver_reset(@user)
- render :show
- else
- flash.now[:error] = "That email address is not in our system"
- render :new
- end
- end
-
- def edit
- if @user = User.find_using_perishable_token(params[:id])
- render
- else
- redirect_to new_password_reset_url
- end
- end
-
- def update
- if @user = User.find_using_perishable_token(params[:id])
- @user.password = params[:user][:password]
- if @user.save
- redirect_to root_url
- else
- render :edit
- end
- else
- redirect_to new_password_reset_url
- end
- end
-
+class PasswordResetsController < Devise::PasswordsController
+ layout 'sign_in'
end
diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb
deleted file mode 100644
index a6f0d1fe9..000000000
--- a/app/controllers/posts_controller.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-class PostsController < CommunitiesController
- helper_method :post
-
- load_and_authorize_resource
-
- def index
- @items = current_neighborhood.posts.sort_by(&:created_at).reverse
- end
-
- def new
- end
-
- def create
- @post.user = current_user
- @post.neighborhood_id = current_neighborhood.id
- if @post.save
- current_neighborhood.notifications.create(:notifiable => @post)
- flash[:message] = "Post Created!"
- redirect_to posts_path
- else
- render :new
- end
- end
-
- def destroy
- if can? :destroy, @post
- # if (@post.user_may_delete(current_user))
- if @post.destroy
- flash[:message] = "Post Deleted!"
- redirect_to posts_path
- else
- render :new
- end
- end
- end
-
- def show
- end
-
- protected
- def post
- @post
- end
-
-end
diff --git a/app/controllers/profile_fields_controller.rb b/app/controllers/profile_fields_controller.rb
deleted file mode 100644
index c4b034be5..000000000
--- a/app/controllers/profile_fields_controller.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-class ProfileFieldsController < CommunitiesController
-
- layout false
-
- def index
- @feed = Feed.find(params[:feed_id])
- end
-
- def order
- params[:fields].each_with_index do |id, index|
- ProfileField.update_all(["position=?", index+1], ["id=?", id])
- end
- render :nothing => true
- end
-
-
- def new
- @feed = Feed.find(params[:feed_id])
- @profile_field = ProfileField.new
- end
-
- def create
- @feed = Feed.find(params[:feed_id])
- @profile_field = @feed.profile_fields.build(params[:profile_field])
- if @profile_field.save
- render :show
- else
- render :new
- end
- end
-
- def edit
- @profile_field = ProfileField.find(params[:id])
- end
-
- def update
- @profile_field = ProfileField.find(params[:id])
- if @profile_field.update_attributes(params[:profile_field])
- @feed = @profile_field.feed
- render :show
- else
- render :edit
- end
- end
-
-end
diff --git a/app/controllers/referrals_controller.rb b/app/controllers/referrals_controller.rb
deleted file mode 100644
index 43612525a..000000000
--- a/app/controllers/referrals_controller.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class ReferralsController < ApplicationController
-
- def create
- @event = Event.find(params[:event_id])
- @referral = @event.referrals.build(params[:referral].merge(:referrer => current_user))
- if @referral.save
- render 'show'
- else
- render 'new'
- end
- end
-
-end
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
new file mode 100644
index 000000000..f2ddc8521
--- /dev/null
+++ b/app/controllers/registrations_controller.rb
@@ -0,0 +1,91 @@
+class RegistrationsController < ApplicationController
+ helper_method :registration
+ layout 'registration'
+
+ before_filter :authenticate_user!, :except => [:new, :create, :facebook_new, :mobile_new]
+
+ def new
+ session["devise.community"] = current_community.id
+ end
+
+ def mobile_new
+ render :layout => 'mobile_registration'
+ end
+
+ def facebook_new
+ # this action is actually rendered in
+ # UsersOmniAuthCallbacksController#facebook
+ end
+
+ def create
+ registration.attributes = params[:user]
+ if registration.save
+ sign_in(registration.user, :bypass => true)
+ kickoff.deliver_welcome_email(registration.user)
+ redirect_to profile_registration_url
+ else
+ render :new
+ end
+ end
+
+ def profile ; end
+
+ def mobile_profile
+ render :layout => 'mobile_registration'
+ end
+
+ def add_profile
+ if registration.update_attributes params[:user]
+ sign_in(registration.user, :bypass => true)
+ if registration.has_avatar?
+ redirect_to avatar_registration_url
+ else
+ redirect_to feeds_registration_url
+ end
+ else
+ render :profile
+ end
+ end
+
+ def avatar ; end
+
+ def crop_avatar
+ registration.update_attributes params[:user]
+ redirect_to feeds_registration_url
+ end
+
+ def feeds
+ if current_community.feeds.present?
+ render
+ else
+ redirect_to groups_registration_url
+ end
+ end
+
+ def add_feeds
+ registration.add_feeds(params[:feed_ids])
+ redirect_to groups_registration_url
+ end
+
+ def groups
+ if current_community.feeds.present?
+ render
+ else
+ redirect_to root_url
+ end
+ end
+
+ def add_groups
+ registration.add_groups(params[:group_ids])
+ redirect_to(root_url + "#/tour")
+ end
+
+ protected
+
+ def registration
+ @registration ||=
+ Registration.new(current_user || User.new(:community => current_community))
+ end
+
+
+end
diff --git a/app/controllers/replies_controller.rb b/app/controllers/replies_controller.rb
deleted file mode 100644
index c9bdc9760..000000000
--- a/app/controllers/replies_controller.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-class RepliesController < CommunitiesController
-
- def create
- authorize! :create, Reply
- @reply = current_user.replies.build(params[:reply])
- if @reply.save
- @reply.repliable.notifications.create(:notifiable => @reply) if @reply.repliable.is_a?(Post)
- render :show
- else
- render :new
- end
- end
-
-end
diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb
new file mode 100644
index 000000000..be7bffc7d
--- /dev/null
+++ b/app/controllers/requests_controller.rb
@@ -0,0 +1,9 @@
+class RequestsController < ApplicationController
+
+ def create
+ @request = Request.new(params[:request])
+ flash[:notice] = 'Thank you for requesting CommonPlace!'
+ @request.save
+ redirect_to('/')
+ end
+end
diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb
index 20d50120e..22f3cfef1 100644
--- a/app/controllers/site_controller.rb
+++ b/app/controllers/site_controller.rb
@@ -1,7 +1,14 @@
-class SiteController < CommunitiesController
-
+class SiteController < ApplicationController
+
+ layout 'application'
+
+ def index
+ @request = Request.new
+ render :layout => 'starter_site'
+ end
+
def privacy ; end
def terms ; end
-
+
end
diff --git a/app/controllers/subscriptions_controller.rb b/app/controllers/subscriptions_controller.rb
deleted file mode 100644
index 3553f83f5..000000000
--- a/app/controllers/subscriptions_controller.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-class SubscriptionsController < CommunitiesController
-
- def index
- @items = current_community.feeds.all(:order => "name ASC")
- end
-
- def recommended
- @items = Feed.all
- render :index
- end
-
- def create
- @feed = Feed.find params[:feed_id]
- current_user.feeds << @feed
- flash[:message] = "You've subscribed to #{ @feed.name }."
- redirect_to feed_path(@feed)
- end
-
- def destroy
- @feed = Feed.find params[:feed_id]
- current_user.feeds.delete @feed
- current_user.save
- flash[:message] = "You've unsubscribed from #{ @feed.name }."
- redirect_to feed_path(@feed)
- end
-end
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
deleted file mode 100644
index 8da1ab230..000000000
--- a/app/controllers/tags_controller.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-class TagsController < CommunitiesController
-
- def index
- @goods = ActsAsTaggableOn::Tagging.all(:conditions => {:context => "goods"}).map(&:tag).map(&:canonical_tag).uniq
- @skills = ActsAsTaggableOn::Tagging.all(:conditions => {:context => "skills"}).map(&:tag).map(&:canonical_tag).uniq
- respond_to do |format|
- format.json
- end
- end
-
- def new
- respond_to do |format|
- format.json
- end
- end
-
-end
diff --git a/app/controllers/user_sessions_controller.rb b/app/controllers/user_sessions_controller.rb
index 28789555f..a1ad396b1 100644
--- a/app/controllers/user_sessions_controller.rb
+++ b/app/controllers/user_sessions_controller.rb
@@ -1,62 +1,3 @@
-class UserSessionsController < ApplicationController
-
- def new
- authorize! :new, UserSession
- @user = User.new
- end
-
- def create_from_facebook
- authorize! :create, UserSession
- if facebook_session
- puts facebook_session
- @user = User.find_by_facebook_uid(facebook_session.user.id)
- puts @user.inspect
- @user_session = UserSession.new(@user)
- if @user_session.save
- reload_current_user!
- redirect_back_or_default root_url
- else
- @user = User.new
- @user_session_errors = true
- params[:controller] = "accounts"
- params[:action] = "new"
- render 'accounts/new'
- end
- else
- @user = User.new
- @user_session_errors = true
- params[:controller] = "accounts"
- params[:action] = "new"
- render 'accounts/new'
- puts "No session"
- end
- end
-
- def create
- authorize! :create, UserSession
- @user_session = UserSession.new(params[:user_session])
- @user_session.remember_me = true
- if @user_session.save
- reload_current_user!
- redirect_back_or_default root_url
- else
- @user = User.new
- @user_session_errors = true
- params[:controller] = "accounts"
- params[:action] = "new"
- render 'accounts/new'
- end
- end
-
- def show
- redirect_to root_url
- end
-
- def destroy
- authorize! :destroy, UserSession
- current_user_session.destroy
- redirect_to root_url
- end
-
-
+class UserSessionsController < Devise::SessionsController
+ layout "sign_in"
end
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
deleted file mode 100644
index 48fa81a04..000000000
--- a/app/controllers/users_controller.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-class UsersController < CommunitiesController
- load_and_authorize_resource
-
- def index
- @neighbors = current_neighborhood.users.sort_by(&:last_name)
- @users = current_community.users.sort_by(&:last_name) - @neighbors
- end
-
- def show
- end
-
-
-end
diff --git a/app/controllers/users_omniauth_callbacks_controller.rb b/app/controllers/users_omniauth_callbacks_controller.rb
new file mode 100644
index 000000000..96a204b25
--- /dev/null
+++ b/app/controllers/users_omniauth_callbacks_controller.rb
@@ -0,0 +1,27 @@
+class UsersOmniauthCallbacksController < Devise::OmniauthCallbacksController
+ helper_method :registration
+ def facebook
+
+ if @user = User.find_for_facebook_oauth(env["omniauth.auth"])
+ sign_in_and_redirect @user, :event => :authentication
+ else
+ @_community = Community.find(session["devise.community"])
+ @registration =
+ Registration.new(User.new_from_facebook({:community_id => session["devise.community"]}, env["omniauth.auth"]))
+ render "registrations/facebook_new", :layout => "registration"
+ end
+ end
+
+ def passthru
+ render(:file => "#{Rails.root}/public/404.html",
+ :status => 404,
+ :layout => false)
+ end
+
+ protected
+
+ def registration
+ @registration ||=
+ Registration.new(current_user || User.new(:community => current_community))
+ end
+end
diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb
new file mode 100644
index 000000000..7a4cd343c
--- /dev/null
+++ b/app/helpers/accounts_helper.rb
@@ -0,0 +1,27 @@
+module AccountsHelper
+ def college_dorms_for_school(community)
+ # HACK
+ if community.is_college
+ options_for_select(['Select your residence hall', '-----', community.neighborhoods.map(&:name)].flatten, 'Select your residence hall')
+ else
+ []
+ end
+ end
+
+ def community_registration_url(community)
+ return "#{root_url}#{community.slug}"
+ end
+
+ def translate_collection(namespace, collection, kv_store=false)
+ translations = {}
+ collection.each do |c|
+ translation = I18n.t("#{namespace}.#{c.downcase.gsub(' ', '_')}")
+ if kv_store
+ translations[translation] = c
+ else
+ translations << translation
+ end
+ end
+ translations
+ end
+end
diff --git a/app/helpers/announcement_importer_helper.rb b/app/helpers/announcement_importer_helper.rb
deleted file mode 100644
index 05ac222e0..000000000
--- a/app/helpers/announcement_importer_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module AnnouncementImporterHelper
-end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 028dae4f3..62614a706 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,58 +1,120 @@
- module ApplicationHelper
-
- def creation_feeds_for(user)
- ActiveSupport::OrderedHash.new.tap do |collection|
- user.managable_feeds.to_a.unshift(user).each do |f|
- collection[f.name] = dom_id(f)
- end
- end
- end
-
- def html_to_json(&block)
- @template_format = :html
- result = block.call
- @template_format = :json
- return result.to_json
- end
-
- alias_method :h2j, :html_to_json
-
- def include_javascript_folder(folder)
- files = Dir.glob("#{ RAILS_ROOT }/public/javascripts/#{ folder }/*.js")
- files.map!{ |f| folder + "/" + File.basename(f) }
- javascript_include_tag files
- end
-
- def tab_to(name, options = {}, html_options = {}, &block)
- options, html_options = name, options if block
-
- html_options[:class] ||= ""
- if current_page?(options) || current_page?(url_for(options) + ".json")
- html_options[:class] += " selected_nav"
- end
- if block
- link_to(options, html_options, &block)
- else
- link_to(name, options, html_options)
- end
- end
-
- def link_to_add(text, options, html_options = {})
- html_options[:id] ||= ""
- html_options[:id] += "add"
- link_to(text, options, html_options)
- end
-
- def winnow_button(text, target, html_options = {})
- html_options['data-remote'] = true
- tab_to target, html_options do
- content_tag(:span, text)
- end
- end
-
- def content_for?(name)
- raise "Delete content_for? in application_helper.rb" if RAILS_GEM_VERSION.to_i > 2
- ivar = "@content_for_#{name}"
- instance_variable_get(ivar).present?
- end
-end
+module ApplicationHelper
+
+ def tab_to(name, options = {}, html_options = {}, &block)
+ options, html_options = name, options if block
+
+ html_options[:class] ||= ""
+ if current_page?(options) || current_page?(url_for(options) + ".json")
+ html_options[:class] += " selected_nav"
+ end
+ if block
+ link_to(options, html_options, &block)
+ else
+ link_to(name, options, html_options)
+ end
+ end
+
+ def include_dummy_console
+ raw <
+script
+ end
+
+ def include_mixpanel
+ key = Rails.env.production? ? $MixpanelAPIToken : 'staging/testing key'
+ raw <
+script
+ end
+
+ def include_ga
+ key = Rails.env.production? ? 'UA-12807510-2' : 'staging/testing key'
+ raw <
+script
+ end
+
+ def include_exceptional
+ key = Rails.env.production? ? '0556a141945715c3deb50a0288ec3bea5417f6bf' : 'staging/testing key'
+ raw <
+
+script
+ end
+
+ def include_commonplace(title = '')
+ raw <
+script
+ end
+
+ def populate_commonplace
+ community = account = ''
+
+ if current_user
+ account << "CommonPlace.account = new Account(#{serialize(Account.new(current_user))});"
+ end
+
+ if current_community
+ community << "CommonPlace.community = new Community(#{serialize(current_community)});"
+ end
+
+ raw <
+script
+ end
+
+end
\ No newline at end of file
diff --git a/app/helpers/email_parse_helper.rb b/app/helpers/email_parse_helper.rb
deleted file mode 100644
index 926a7928d..000000000
--- a/app/helpers/email_parse_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module EmailParseHelper
-end
diff --git a/app/helpers/feeds_helper.rb b/app/helpers/feeds_helper.rb
deleted file mode 100644
index 93c7f753c..000000000
--- a/app/helpers/feeds_helper.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-module FeedsHelper
-
- def feed_profile_path(feed)
- if feed.slug
- feed_path(feed.slug)
- else
- profile_feed_path(feed)
- end
- end
-
- def feed_profile_url(feed)
- if feed.slug
- feed_url(feed.slug)
- else
- profile_feed_url(feed)
- end
- end
-
-end
diff --git a/app/helpers/images_helper.rb b/app/helpers/images_helper.rb
deleted file mode 100644
index 7b3a8bc8e..000000000
--- a/app/helpers/images_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module ImagesHelper
-end
diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb
deleted file mode 100644
index 87ff5bddd..000000000
--- a/app/helpers/items_helper.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-module ItemsHelper
-
- def item_tag(item, html_options = {}, &block)
- html_options[:class] = [html_options[:class], dom_class(item)].join(" ")
- html_options[:id] = dom_id(item)
- content_tag(:li, html_options, &block)
- end
-
-end
diff --git a/app/helpers/management_helper.rb b/app/helpers/management_helper.rb
deleted file mode 100644
index 2f7c6114b..000000000
--- a/app/helpers/management_helper.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module ManagementHelper
-
- def management_options_for(user)
- options = { 'Account' => management_path }
-
- user.managable_feeds.each do |feed|
- options[feed.name] = url_for([:management, feed])
- end
-
- user.managable_feeds.map(&:events).flatten.each do |event|
- options[event.name] = url_for([:management, event])
- end
- options_for_select(options)
- end
-
-end
diff --git a/app/helpers/map_helper.rb b/app/helpers/map_helper.rb
deleted file mode 100644
index 96348d458..000000000
--- a/app/helpers/map_helper.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-module MapHelper
-
- def render_map(&block)
- content_tag(:div, "", 'data-map' => Mapifier.new(&block).to_json)
- end
-end
diff --git a/app/helpers/modal_helper.rb b/app/helpers/modal_helper.rb
deleted file mode 100644
index 2ce2efbb4..000000000
--- a/app/helpers/modal_helper.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-module ModalHelper
- def as_modal(options = {}, &block)
- options = {
- :class => "",
- :close => true
- }.merge(options)
-
- update_content("#modal") do
- content_tag(:div, :class => "not_empty", :id => "modal") do
- content_tag(:div, :id => "modal-overlay"){} +
- content_tag(:div, :id => "modal-content", :class => options[:class]) do
- if options[:close]
- link_to("close", :id => "modal-close", 'data-remote' => true) do
- image_tag 'modal-close.png'
- end +
- capture(&block)
- else
- capture(&block)
- end
- end
- end
- end
- end
-end
diff --git a/app/helpers/organizer_helper.rb b/app/helpers/organizer_helper.rb
new file mode 100644
index 000000000..0c3eb75b1
--- /dev/null
+++ b/app/helpers/organizer_helper.rb
@@ -0,0 +1,11 @@
+module OrganizerHelper
+ def google_api_key()
+ if ENV['HEROKU_APP'] == 'commonplace'
+ ['ABQIAAAAgdPfd74v_0Ttup6W0tJHtxQB4B98GOFQoxUPdFn0mOBvUSbzOxSwgIAcuwJ7Sux0NCxmE-bx8bLihQ','ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA','ABQIAAAAgdPfd74v_0Ttup6W0tJHtxQB4B98GOFQoxUPdFn0mOBvUSbzOxSwgIAcuwJ7Sux0NCxmE-bx8bLihQ'].shuffle.first
+ elsif ENV['HEROKU_APP'] == 'commonplace-staging'
+ 'ABQIAAAAgdPfd74v_0Ttup6W0tJHtxSeiCNuZ_fCHJEwH48648-0ULan5RRVuO5xxDLGQXIjDZFCu8_6tlc8HQ'
+ else
+ 'unknown_env_key'
+ end
+ end
+end
diff --git a/app/helpers/text_helper.rb b/app/helpers/text_helper.rb
deleted file mode 100644
index 72202547f..000000000
--- a/app/helpers/text_helper.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-module TextHelper
-
- def vowel?(char)
- !!char.match(/[aeiou]/i)
- end
-
- def reply_count(item)
- if item.replies.length == 0
- "no replies yet"
- else
- "(#{self.replies.length}) replies"
- end
- end
-
- def with_article(noun)
- [vowel?(noun.slice(0,1)) ? 'an' : 'a', noun].join(" ")
- end
-
- def markdown(text)
- BlueCloth.new(text || "").to_html
- end
-end
diff --git a/app/helpers/time_helper.rb b/app/helpers/time_helper.rb
deleted file mode 100644
index 5f1085aad..000000000
--- a/app/helpers/time_helper.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-module TimeHelper
-
- def full_date(date,time)
- date.strftime("%A, %B %d") + " at " + hours_minutes(time)
- end
-
- def hours_minutes time
- return time.strftime("%I:%M %p").sub(/^0/,'') # strip leading zero
- end
-
- def post_date time
- unless time
- return ""
- end
-
- diff = ( DateTime.now.to_i - time.to_i ) / 86400
-
- if diff < 7
- return time_ago_in_words(time, include_seconds = true) + " ago"
- elsif diff < 365
- return time.strftime("%B %d").sub(/(\s)(0)(\d*)/, '\1\3')
- else
- return time.strftime("%B %d %Y").sub(/(\s)(0)(\d*)/, '\1\3')
- end
- end
-
-
- def event_date time
- unless time
- return ""
- end
-
- time_string = time_ago_in_words(time)
- diff = ( time.to_i - DateTime.now.to_i ) / 86400
- if diff < 0
- return time_string + " ago"
- else
- return "in " + time_string
- end
- end
-
- def drop_down_times
- ((5..23).to_a + (0..4).to_a).map{ |h|
- 0.step(59, 30).map{ |m| Time.parse("#{h}:#{m}").to_s }
- }.flatten
- end
-
- def event_select_time(edge)
- content_tag(:li, :class => 'select required', :id => "event_#{edge}_input") do
- content_tag(:label, :for => "event_#{edge}") { edge.humanize } +
- select('event', edge, options_for_select(drop_down_times, @event.read_attribute(edge).to_s))
- end
- end
-
-end
diff --git a/app/helpers/update_helper.rb b/app/helpers/update_helper.rb
deleted file mode 100644
index 4eba81dfa..000000000
--- a/app/helpers/update_helper.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-module UpdateHelper
-
- def update_content(name, content = nil, &block)
- @_updated_content ||= Hash.new
- content = block_given? ? capture(&block) : "none"
- @_updated_content[name] = content || ""
- end
-
- def updated_content
- @_updated_content || Hash.new
- end
-
- def updated_content_or(key, &default)
- updated_content.has_key?(key) ? updated_content[key] : capture(&default)
- end
-end
diff --git a/public/images/Jcrop.gif b/app/images/Jcrop.gif
similarity index 100%
rename from public/images/Jcrop.gif
rename to app/images/Jcrop.gif
diff --git a/public/images/about.jpg b/app/images/about.jpg
similarity index 100%
rename from public/images/about.jpg
rename to app/images/about.jpg
diff --git a/app/images/active_admin/admin_notes_icon.png b/app/images/active_admin/admin_notes_icon.png
new file mode 100644
index 000000000..1d240a1a1
Binary files /dev/null and b/app/images/active_admin/admin_notes_icon.png differ
diff --git a/app/images/active_admin/loading.gif b/app/images/active_admin/loading.gif
new file mode 100644
index 000000000..da33c3e03
Binary files /dev/null and b/app/images/active_admin/loading.gif differ
diff --git a/app/images/active_admin/nested_menu_arrow.gif b/app/images/active_admin/nested_menu_arrow.gif
new file mode 100644
index 000000000..878357fe4
Binary files /dev/null and b/app/images/active_admin/nested_menu_arrow.gif differ
diff --git a/app/images/active_admin/nested_menu_arrow_dark.gif b/app/images/active_admin/nested_menu_arrow_dark.gif
new file mode 100644
index 000000000..006372c82
Binary files /dev/null and b/app/images/active_admin/nested_menu_arrow_dark.gif differ
diff --git a/app/images/active_admin/orderable.png b/app/images/active_admin/orderable.png
new file mode 100644
index 000000000..427009e72
Binary files /dev/null and b/app/images/active_admin/orderable.png differ
diff --git a/public/images/announcement-zone.png b/app/images/announcement-zone.png
similarity index 100%
rename from public/images/announcement-zone.png
rename to app/images/announcement-zone.png
diff --git a/public/images/announcements.png b/app/images/announcements.png
similarity index 100%
rename from public/images/announcements.png
rename to app/images/announcements.png
diff --git a/app/images/blue-arrow-down.png b/app/images/blue-arrow-down.png
new file mode 100644
index 000000000..f956ca3bb
Binary files /dev/null and b/app/images/blue-arrow-down.png differ
diff --git a/app/images/blue-arrow-up.png b/app/images/blue-arrow-up.png
new file mode 100644
index 000000000..c38b330fa
Binary files /dev/null and b/app/images/blue-arrow-up.png differ
diff --git a/public/images/bullet-pin.png b/app/images/bullet-pin.png
similarity index 100%
rename from public/images/bullet-pin.png
rename to app/images/bullet-pin.png
diff --git a/app/images/bullet-star.png b/app/images/bullet-star.png
new file mode 100644
index 000000000..61fd3a990
Binary files /dev/null and b/app/images/bullet-star.png differ
diff --git a/app/images/bullet-star2.png b/app/images/bullet-star2.png
new file mode 100644
index 000000000..3ee762ea5
Binary files /dev/null and b/app/images/bullet-star2.png differ
diff --git a/public/images/buttons/continue.png b/app/images/buttons/continue.png
similarity index 100%
rename from public/images/buttons/continue.png
rename to app/images/buttons/continue.png
diff --git a/app/images/buttons/continue2.png b/app/images/buttons/continue2.png
new file mode 100644
index 000000000..71900ed72
Binary files /dev/null and b/app/images/buttons/continue2.png differ
diff --git a/public/images/buttons/down-arrow.png b/app/images/buttons/down-arrow.png
similarity index 100%
rename from public/images/buttons/down-arrow.png
rename to app/images/buttons/down-arrow.png
diff --git a/app/images/buttons/facebook-login.png b/app/images/buttons/facebook-login.png
new file mode 100644
index 000000000..e88a3cf0c
Binary files /dev/null and b/app/images/buttons/facebook-login.png differ
diff --git a/app/images/buttons/facebook-sign-up.png b/app/images/buttons/facebook-sign-up.png
new file mode 100644
index 000000000..e97f48715
Binary files /dev/null and b/app/images/buttons/facebook-sign-up.png differ
diff --git a/app/images/buttons/learnmore.png b/app/images/buttons/learnmore.png
new file mode 100644
index 000000000..2c6ed456e
Binary files /dev/null and b/app/images/buttons/learnmore.png differ
diff --git a/public/images/buttons/login.png b/app/images/buttons/login.png
similarity index 100%
rename from public/images/buttons/login.png
rename to app/images/buttons/login.png
diff --git a/app/images/buttons/login2.png b/app/images/buttons/login2.png
new file mode 100644
index 000000000..4043207eb
Binary files /dev/null and b/app/images/buttons/login2.png differ
diff --git a/app/images/buttons/post-now-btn.png b/app/images/buttons/post-now-btn.png
new file mode 100644
index 000000000..f28e5ca9f
Binary files /dev/null and b/app/images/buttons/post-now-btn.png differ
diff --git a/public/images/buttons/post-now.png b/app/images/buttons/post-now.png
similarity index 100%
rename from public/images/buttons/post-now.png
rename to app/images/buttons/post-now.png
diff --git a/app/images/buttons/post-now2.png b/app/images/buttons/post-now2.png
new file mode 100644
index 000000000..eb9ce36fe
Binary files /dev/null and b/app/images/buttons/post-now2.png differ
diff --git a/public/images/buttons/red-post-now-button.png b/app/images/buttons/red-post-now-button.png
similarity index 100%
rename from public/images/buttons/red-post-now-button.png
rename to app/images/buttons/red-post-now-button.png
diff --git a/public/images/buttons/sign-up.png b/app/images/buttons/sign-up.png
similarity index 100%
rename from public/images/buttons/sign-up.png
rename to app/images/buttons/sign-up.png
diff --git a/app/images/buttons/signup.png b/app/images/buttons/signup.png
new file mode 100644
index 000000000..203809904
Binary files /dev/null and b/app/images/buttons/signup.png differ
diff --git a/app/images/cards/test.png b/app/images/cards/test.png
new file mode 100644
index 000000000..1104717f5
Binary files /dev/null and b/app/images/cards/test.png differ
diff --git a/app/images/cards/vienna.png b/app/images/cards/vienna.png
new file mode 100644
index 000000000..5a8bd0b24
Binary files /dev/null and b/app/images/cards/vienna.png differ
diff --git a/app/images/check-off.png b/app/images/check-off.png
new file mode 100644
index 000000000..b8013634b
Binary files /dev/null and b/app/images/check-off.png differ
diff --git a/app/images/check-on.png b/app/images/check-on.png
new file mode 100644
index 000000000..da7382ee5
Binary files /dev/null and b/app/images/check-on.png differ
diff --git a/public/images/clouds.png b/app/images/clouds.png
similarity index 100%
rename from public/images/clouds.png
rename to app/images/clouds.png
diff --git a/app/images/contacts-from-email-btn.jpg b/app/images/contacts-from-email-btn.jpg
new file mode 100644
index 000000000..eef7e680c
Binary files /dev/null and b/app/images/contacts-from-email-btn.jpg differ
diff --git a/public/images/create-a-feed.png b/app/images/create-a-feed.png
similarity index 100%
rename from public/images/create-a-feed.png
rename to app/images/create-a-feed.png
diff --git a/public/images/delete.png b/app/images/delete.png
similarity index 100%
rename from public/images/delete.png
rename to app/images/delete.png
diff --git a/app/images/delete_grey.png b/app/images/delete_grey.png
new file mode 100644
index 000000000..7711d4e54
Binary files /dev/null and b/app/images/delete_grey.png differ
diff --git a/public/images/directory-zone.png b/app/images/directory-zone.png
similarity index 100%
rename from public/images/directory-zone.png
rename to app/images/directory-zone.png
diff --git a/public/images/directory.png b/app/images/directory.png
similarity index 100%
rename from public/images/directory.png
rename to app/images/directory.png
diff --git a/app/images/doc-icon.png b/app/images/doc-icon.png
new file mode 100644
index 000000000..9674bfd2c
Binary files /dev/null and b/app/images/doc-icon.png differ
diff --git a/app/images/download-btn.png b/app/images/download-btn.png
new file mode 100644
index 000000000..73ccf6f7c
Binary files /dev/null and b/app/images/download-btn.png differ
diff --git a/public/images/event-zone.png b/app/images/event-zone.png
similarity index 100%
rename from public/images/event-zone.png
rename to app/images/event-zone.png
diff --git a/public/images/events.png b/app/images/events.png
similarity index 100%
rename from public/images/events.png
rename to app/images/events.png
diff --git a/app/images/example-email.png b/app/images/example-email.png
new file mode 100644
index 000000000..c1b9a93cf
Binary files /dev/null and b/app/images/example-email.png differ
diff --git a/app/images/example-platform.png b/app/images/example-platform.png
new file mode 100644
index 000000000..b235d6583
Binary files /dev/null and b/app/images/example-platform.png differ
diff --git a/public/images/fake_map.png b/app/images/fake_map.png
similarity index 100%
rename from public/images/fake_map.png
rename to app/images/fake_map.png
diff --git a/public/images/fallschurch_notification_header.png b/app/images/fallschurch_notification_header.png
similarity index 100%
rename from public/images/fallschurch_notification_header.png
rename to app/images/fallschurch_notification_header.png
diff --git a/public/images/favicon.png b/app/images/favicon.png
similarity index 100%
rename from public/images/favicon.png
rename to app/images/favicon.png
diff --git a/app/images/fb-btn.png b/app/images/fb-btn.png
new file mode 100644
index 000000000..51322952e
Binary files /dev/null and b/app/images/fb-btn.png differ
diff --git a/public/images/feed-post-dropdown-arrow.png b/app/images/feed-post-dropdown-arrow.png
similarity index 100%
rename from public/images/feed-post-dropdown-arrow.png
rename to app/images/feed-post-dropdown-arrow.png
diff --git a/app/images/feed_page/announcement-tab-icon.png b/app/images/feed_page/announcement-tab-icon.png
new file mode 100644
index 000000000..46fbb935f
Binary files /dev/null and b/app/images/feed_page/announcement-tab-icon.png differ
diff --git a/app/images/feed_page/check-off.png b/app/images/feed_page/check-off.png
new file mode 100644
index 000000000..b8013634b
Binary files /dev/null and b/app/images/feed_page/check-off.png differ
diff --git a/app/images/feed_page/check-on.png b/app/images/feed_page/check-on.png
new file mode 100644
index 000000000..da7382ee5
Binary files /dev/null and b/app/images/feed_page/check-on.png differ
diff --git a/app/images/feed_page/doc-icon.png b/app/images/feed_page/doc-icon.png
new file mode 100644
index 000000000..9674bfd2c
Binary files /dev/null and b/app/images/feed_page/doc-icon.png differ
diff --git a/app/images/feed_page/event-tab-icon.png b/app/images/feed_page/event-tab-icon.png
new file mode 100644
index 000000000..dc370fa59
Binary files /dev/null and b/app/images/feed_page/event-tab-icon.png differ
diff --git a/app/images/feed_page/invite-tab-icon.png b/app/images/feed_page/invite-tab-icon.png
new file mode 100644
index 000000000..2857c53cc
Binary files /dev/null and b/app/images/feed_page/invite-tab-icon.png differ
diff --git a/public/images/feeds.png b/app/images/feeds.png
similarity index 100%
rename from public/images/feeds.png
rename to app/images/feeds.png
diff --git a/public/images/goods-and-skills.png b/app/images/goods-and-skills.png
similarity index 100%
rename from public/images/goods-and-skills.png
rename to app/images/goods-and-skills.png
diff --git a/public/images/grid.png b/app/images/grid.png
similarity index 100%
rename from public/images/grid.png
rename to app/images/grid.png
diff --git a/app/images/group-icons/academic-life.png b/app/images/group-icons/academic-life.png
new file mode 100644
index 000000000..7e5776752
Binary files /dev/null and b/app/images/group-icons/academic-life.png differ
diff --git a/app/images/group-icons/city-problem-solving.png b/app/images/group-icons/city-problem-solving.png
new file mode 100644
index 000000000..87297eec1
Binary files /dev/null and b/app/images/group-icons/city-problem-solving.png differ
diff --git a/app/images/group-icons/dogs.png b/app/images/group-icons/dogs.png
new file mode 100644
index 000000000..ac4e3fa60
Binary files /dev/null and b/app/images/group-icons/dogs.png differ
diff --git a/app/images/group-icons/environment.png b/app/images/group-icons/environment.png
new file mode 100644
index 000000000..2fdeeff9e
Binary files /dev/null and b/app/images/group-icons/environment.png differ
diff --git a/app/images/group-icons/fredericksburg-happenings.png b/app/images/group-icons/fredericksburg-happenings.png
new file mode 100644
index 000000000..89af8fb2c
Binary files /dev/null and b/app/images/group-icons/fredericksburg-happenings.png differ
diff --git a/app/images/group-icons/gardening-home-improvement.png b/app/images/group-icons/gardening-home-improvement.png
new file mode 100644
index 000000000..5d9bd4930
Binary files /dev/null and b/app/images/group-icons/gardening-home-improvement.png differ
diff --git a/app/images/group-icons/link-sharing.png b/app/images/group-icons/link-sharing.png
new file mode 100644
index 000000000..e061f2a34
Binary files /dev/null and b/app/images/group-icons/link-sharing.png differ
diff --git a/app/images/group-icons/local-dining.png b/app/images/group-icons/local-dining.png
new file mode 100644
index 000000000..51c4a707c
Binary files /dev/null and b/app/images/group-icons/local-dining.png differ
diff --git a/app/images/group-icons/music-arts.png b/app/images/group-icons/music-arts.png
new file mode 100644
index 000000000..9dad4116c
Binary files /dev/null and b/app/images/group-icons/music-arts.png differ
diff --git a/app/images/group-icons/new-mothers.png b/app/images/group-icons/new-mothers.png
new file mode 100644
index 000000000..0ba2b295b
Binary files /dev/null and b/app/images/group-icons/new-mothers.png differ
diff --git a/app/images/group-icons/parents-families.png b/app/images/group-icons/parents-families.png
new file mode 100644
index 000000000..3b644ea04
Binary files /dev/null and b/app/images/group-icons/parents-families.png differ
diff --git a/app/images/group-icons/recipes.png b/app/images/group-icons/recipes.png
new file mode 100644
index 000000000..a748a85d4
Binary files /dev/null and b/app/images/group-icons/recipes.png differ
diff --git a/app/images/group-icons/schools.png b/app/images/group-icons/schools.png
new file mode 100644
index 000000000..5ca1451e0
Binary files /dev/null and b/app/images/group-icons/schools.png differ
diff --git a/app/images/group-icons/social-opportunities.png b/app/images/group-icons/social-opportunities.png
new file mode 100644
index 000000000..b7039f3b7
Binary files /dev/null and b/app/images/group-icons/social-opportunities.png differ
diff --git a/app/images/group-icons/sports-recreation.png b/app/images/group-icons/sports-recreation.png
new file mode 100644
index 000000000..0b2592481
Binary files /dev/null and b/app/images/group-icons/sports-recreation.png differ
diff --git a/app/images/group-icons/volunteer-opportunities.png b/app/images/group-icons/volunteer-opportunities.png
new file mode 100644
index 000000000..260d1e299
Binary files /dev/null and b/app/images/group-icons/volunteer-opportunities.png differ
diff --git a/app/images/harrisonburg_notification_header.png b/app/images/harrisonburg_notification_header.png
new file mode 100644
index 000000000..cf8b17e25
Binary files /dev/null and b/app/images/harrisonburg_notification_header.png differ
diff --git a/public/images/houses.png b/app/images/houses.png
similarity index 100%
rename from public/images/houses.png
rename to app/images/houses.png
diff --git a/app/images/icons/announcements-icon-selected.png b/app/images/icons/announcements-icon-selected.png
new file mode 100644
index 000000000..ff3791e49
Binary files /dev/null and b/app/images/icons/announcements-icon-selected.png differ
diff --git a/app/images/icons/announcements-icon.png b/app/images/icons/announcements-icon.png
new file mode 100644
index 000000000..03f6bd4e5
Binary files /dev/null and b/app/images/icons/announcements-icon.png differ
diff --git a/public/images/icons/arrow-l-hov.png b/app/images/icons/arrow-l-hov.png
similarity index 100%
rename from public/images/icons/arrow-l-hov.png
rename to app/images/icons/arrow-l-hov.png
diff --git a/public/images/icons/arrow-l.png b/app/images/icons/arrow-l.png
similarity index 100%
rename from public/images/icons/arrow-l.png
rename to app/images/icons/arrow-l.png
diff --git a/public/images/icons/arrow-r-hov.png b/app/images/icons/arrow-r-hov.png
similarity index 100%
rename from public/images/icons/arrow-r-hov.png
rename to app/images/icons/arrow-r-hov.png
diff --git a/public/images/icons/arrow-r.png b/app/images/icons/arrow-r.png
similarity index 100%
rename from public/images/icons/arrow-r.png
rename to app/images/icons/arrow-r.png
diff --git a/app/images/icons/discuss-icon-selected.png b/app/images/icons/discuss-icon-selected.png
new file mode 100644
index 000000000..f50cb67d9
Binary files /dev/null and b/app/images/icons/discuss-icon-selected.png differ
diff --git a/app/images/icons/discuss-icon.png b/app/images/icons/discuss-icon.png
new file mode 100644
index 000000000..3bb4cf839
Binary files /dev/null and b/app/images/icons/discuss-icon.png differ
diff --git a/app/images/icons/events-icon-selected.png b/app/images/icons/events-icon-selected.png
new file mode 100644
index 000000000..b77693b52
Binary files /dev/null and b/app/images/icons/events-icon-selected.png differ
diff --git a/app/images/icons/events-icon.png b/app/images/icons/events-icon.png
new file mode 100644
index 000000000..26493cc65
Binary files /dev/null and b/app/images/icons/events-icon.png differ
diff --git a/app/images/icons/neighborhood-post-selected.png b/app/images/icons/neighborhood-post-selected.png
new file mode 100644
index 000000000..7fe58892c
Binary files /dev/null and b/app/images/icons/neighborhood-post-selected.png differ
diff --git a/app/images/icons/neighborhood-post.png b/app/images/icons/neighborhood-post.png
new file mode 100644
index 000000000..0a5ac22e0
Binary files /dev/null and b/app/images/icons/neighborhood-post.png differ
diff --git a/app/images/icons/new-announcement.png b/app/images/icons/new-announcement.png
new file mode 100644
index 000000000..1f57557b1
Binary files /dev/null and b/app/images/icons/new-announcement.png differ
diff --git a/app/images/icons/new-event.png b/app/images/icons/new-event.png
new file mode 100644
index 000000000..db71192aa
Binary files /dev/null and b/app/images/icons/new-event.png differ
diff --git a/app/images/icons/new-post.png b/app/images/icons/new-post.png
new file mode 100644
index 000000000..58f143387
Binary files /dev/null and b/app/images/icons/new-post.png differ
diff --git a/public/images/intro_slideshow/neighborhood1.jpg b/app/images/intro_slideshow/neighborhood1.jpg
similarity index 100%
rename from public/images/intro_slideshow/neighborhood1.jpg
rename to app/images/intro_slideshow/neighborhood1.jpg
diff --git a/public/images/intro_slideshow/neighborhood2.jpg b/app/images/intro_slideshow/neighborhood2.jpg
similarity index 100%
rename from public/images/intro_slideshow/neighborhood2.jpg
rename to app/images/intro_slideshow/neighborhood2.jpg
diff --git a/app/images/invite/PDFLogo.png b/app/images/invite/PDFLogo.png
new file mode 100644
index 000000000..ede5d3a6c
Binary files /dev/null and b/app/images/invite/PDFLogo.png differ
diff --git a/app/images/invite/downloadzip.png b/app/images/invite/downloadzip.png
new file mode 100644
index 000000000..a73fe66aa
Binary files /dev/null and b/app/images/invite/downloadzip.png differ
diff --git a/app/images/invite/facebookinvite.png b/app/images/invite/facebookinvite.png
new file mode 100644
index 000000000..b08bc949c
Binary files /dev/null and b/app/images/invite/facebookinvite.png differ
diff --git a/app/images/invite/findneighbors.png b/app/images/invite/findneighbors.png
new file mode 100644
index 000000000..46bf2c4d8
Binary files /dev/null and b/app/images/invite/findneighbors.png differ
diff --git a/app/images/invite/joinfriends.png b/app/images/invite/joinfriends.png
new file mode 100644
index 000000000..78b725f0b
Binary files /dev/null and b/app/images/invite/joinfriends.png differ
diff --git a/app/images/invite/neighborinvite.png b/app/images/invite/neighborinvite.png
new file mode 100644
index 000000000..9a5e5ae79
Binary files /dev/null and b/app/images/invite/neighborinvite.png differ
diff --git a/app/images/invite/plane.png b/app/images/invite/plane.png
new file mode 100644
index 000000000..356227e2e
Binary files /dev/null and b/app/images/invite/plane.png differ
diff --git a/app/images/invite/twitterinv.png b/app/images/invite/twitterinv.png
new file mode 100644
index 000000000..7d7cd2642
Binary files /dev/null and b/app/images/invite/twitterinv.png differ
diff --git a/public/images/item_hover.png b/app/images/item_hover.png
similarity index 100%
rename from public/images/item_hover.png
rename to app/images/item_hover.png
diff --git a/app/images/learn_more/bulletin_screen_shot.png b/app/images/learn_more/bulletin_screen_shot.png
new file mode 100644
index 000000000..e5c14b85c
Binary files /dev/null and b/app/images/learn_more/bulletin_screen_shot.png differ
diff --git a/app/images/learn_more/community_screen_shot.png b/app/images/learn_more/community_screen_shot.png
new file mode 100644
index 000000000..aafa0bd61
Binary files /dev/null and b/app/images/learn_more/community_screen_shot.png differ
diff --git a/app/images/learn_more/post_screen_shot.png b/app/images/learn_more/post_screen_shot.png
new file mode 100644
index 000000000..793642bd5
Binary files /dev/null and b/app/images/learn_more/post_screen_shot.png differ
diff --git a/app/images/learn_more/sign_up_screen_shot.png b/app/images/learn_more/sign_up_screen_shot.png
new file mode 100644
index 000000000..faa88b4c1
Binary files /dev/null and b/app/images/learn_more/sign_up_screen_shot.png differ
diff --git a/app/images/left-arrow.png b/app/images/left-arrow.png
new file mode 100644
index 000000000..7e5b53c50
Binary files /dev/null and b/app/images/left-arrow.png differ
diff --git a/public/images/loading.gif b/app/images/loading.gif
similarity index 100%
rename from public/images/loading.gif
rename to app/images/loading.gif
diff --git a/public/images/logo-pin.png b/app/images/logo-pin.png
similarity index 100%
rename from public/images/logo-pin.png
rename to app/images/logo-pin.png
diff --git a/public/images/logo.png b/app/images/logo.png
similarity index 100%
rename from public/images/logo.png
rename to app/images/logo.png
diff --git a/app/images/logo2.png b/app/images/logo2.png
new file mode 100644
index 000000000..247ff8791
Binary files /dev/null and b/app/images/logo2.png differ
diff --git a/app/images/mail/invite-them-now-button.png b/app/images/mail/invite-them-now-button.png
new file mode 100644
index 000000000..601a7848c
Binary files /dev/null and b/app/images/mail/invite-them-now-button.png differ
diff --git a/app/images/mail/reply-button.png b/app/images/mail/reply-button.png
new file mode 100644
index 000000000..ca1a09097
Binary files /dev/null and b/app/images/mail/reply-button.png differ
diff --git a/app/images/mail/reply-now-button.png b/app/images/mail/reply-now-button.png
new file mode 100644
index 000000000..fe52b41db
Binary files /dev/null and b/app/images/mail/reply-now-button.png differ
diff --git a/app/images/main_page/announcement-tab-icon.png b/app/images/main_page/announcement-tab-icon.png
new file mode 100644
index 000000000..2857c53cc
Binary files /dev/null and b/app/images/main_page/announcement-tab-icon.png differ
diff --git a/app/images/main_page/event-tab-icon.png b/app/images/main_page/event-tab-icon.png
new file mode 100644
index 000000000..dc370fa59
Binary files /dev/null and b/app/images/main_page/event-tab-icon.png differ
diff --git a/app/images/main_page/group-post-tab-icon.png b/app/images/main_page/group-post-tab-icon.png
new file mode 100644
index 000000000..46051f185
Binary files /dev/null and b/app/images/main_page/group-post-tab-icon.png differ
diff --git a/app/images/main_page/neighborhood-post-tab-icon.png b/app/images/main_page/neighborhood-post-tab-icon.png
new file mode 100644
index 000000000..46fbb935f
Binary files /dev/null and b/app/images/main_page/neighborhood-post-tab-icon.png differ
diff --git a/app/images/mobile/0stars.png b/app/images/mobile/0stars.png
new file mode 100644
index 000000000..81947f7bc
Binary files /dev/null and b/app/images/mobile/0stars.png differ
diff --git a/app/images/mobile/0starsborder.png b/app/images/mobile/0starsborder.png
new file mode 100644
index 000000000..f4d231499
Binary files /dev/null and b/app/images/mobile/0starsborder.png differ
diff --git a/app/images/mobile/1stars.png b/app/images/mobile/1stars.png
new file mode 100644
index 000000000..12dd9c6a9
Binary files /dev/null and b/app/images/mobile/1stars.png differ
diff --git a/app/images/mobile/1starsborder.png b/app/images/mobile/1starsborder.png
new file mode 100644
index 000000000..ad21998f1
Binary files /dev/null and b/app/images/mobile/1starsborder.png differ
diff --git a/app/images/mobile/2stars.png b/app/images/mobile/2stars.png
new file mode 100644
index 000000000..fa7e2b95c
Binary files /dev/null and b/app/images/mobile/2stars.png differ
diff --git a/app/images/mobile/2starsborder.png b/app/images/mobile/2starsborder.png
new file mode 100644
index 000000000..10a2b912b
Binary files /dev/null and b/app/images/mobile/2starsborder.png differ
diff --git a/app/images/mobile/3stars.png b/app/images/mobile/3stars.png
new file mode 100644
index 000000000..7136c3f24
Binary files /dev/null and b/app/images/mobile/3stars.png differ
diff --git a/app/images/mobile/3starsborder.png b/app/images/mobile/3starsborder.png
new file mode 100644
index 000000000..22c5a9252
Binary files /dev/null and b/app/images/mobile/3starsborder.png differ
diff --git a/app/images/mobile/4stars.png b/app/images/mobile/4stars.png
new file mode 100644
index 000000000..071415689
Binary files /dev/null and b/app/images/mobile/4stars.png differ
diff --git a/app/images/mobile/4starsborder.png b/app/images/mobile/4starsborder.png
new file mode 100644
index 000000000..4a17ceef0
Binary files /dev/null and b/app/images/mobile/4starsborder.png differ
diff --git a/app/images/mobile/5stars.png b/app/images/mobile/5stars.png
new file mode 100644
index 000000000..370c60be5
Binary files /dev/null and b/app/images/mobile/5stars.png differ
diff --git a/app/images/mobile/arrow.png b/app/images/mobile/arrow.png
new file mode 100644
index 000000000..9993a06bf
Binary files /dev/null and b/app/images/mobile/arrow.png differ
diff --git a/app/images/mobile/checkbox.png b/app/images/mobile/checkbox.png
new file mode 100644
index 000000000..75f0ede29
Binary files /dev/null and b/app/images/mobile/checkbox.png differ
diff --git a/app/images/mobile/home.png b/app/images/mobile/home.png
new file mode 100644
index 000000000..0fc49fcb8
Binary files /dev/null and b/app/images/mobile/home.png differ
diff --git a/app/images/mobile/logo.gif b/app/images/mobile/logo.gif
new file mode 100644
index 000000000..0f0550b23
Binary files /dev/null and b/app/images/mobile/logo.gif differ
diff --git a/app/images/mobile/navbutton.png b/app/images/mobile/navbutton.png
new file mode 100644
index 000000000..c786de4ea
Binary files /dev/null and b/app/images/mobile/navbutton.png differ
diff --git a/app/images/mobile/navbuttonblack.png b/app/images/mobile/navbuttonblack.png
new file mode 100644
index 000000000..b7a9bab49
Binary files /dev/null and b/app/images/mobile/navbuttonblack.png differ
diff --git a/app/images/mobile/navbuttonblue.png b/app/images/mobile/navbuttonblue.png
new file mode 100644
index 000000000..97a2c983b
Binary files /dev/null and b/app/images/mobile/navbuttonblue.png differ
diff --git a/app/images/mobile/navlinkright.png b/app/images/mobile/navlinkright.png
new file mode 100644
index 000000000..df5131f87
Binary files /dev/null and b/app/images/mobile/navlinkright.png differ
diff --git a/app/images/mobile/navlinkrightblack.png b/app/images/mobile/navlinkrightblack.png
new file mode 100644
index 000000000..ef5508491
Binary files /dev/null and b/app/images/mobile/navlinkrightblack.png differ
diff --git a/app/images/mobile/navright.png b/app/images/mobile/navright.png
new file mode 100644
index 000000000..afa269d08
Binary files /dev/null and b/app/images/mobile/navright.png differ
diff --git a/app/images/mobile/navrightblack.png b/app/images/mobile/navrightblack.png
new file mode 100644
index 000000000..80c5b8334
Binary files /dev/null and b/app/images/mobile/navrightblack.png differ
diff --git a/app/images/mobile/play.gif b/app/images/mobile/play.gif
new file mode 100644
index 000000000..7447d0541
Binary files /dev/null and b/app/images/mobile/play.gif differ
diff --git a/app/images/mobile/searchfield.png b/app/images/mobile/searchfield.png
new file mode 100644
index 000000000..05eb98a07
Binary files /dev/null and b/app/images/mobile/searchfield.png differ
diff --git a/app/images/mobile/tributton.png b/app/images/mobile/tributton.png
new file mode 100644
index 000000000..f5c8f55f3
Binary files /dev/null and b/app/images/mobile/tributton.png differ
diff --git a/public/images/modal-close.png b/app/images/modal-close.png
similarity index 100%
rename from public/images/modal-close.png
rename to app/images/modal-close.png
diff --git a/app/images/nav-down-arrow.png b/app/images/nav-down-arrow.png
new file mode 100644
index 000000000..14b0f2d69
Binary files /dev/null and b/app/images/nav-down-arrow.png differ
diff --git a/public/images/nav-down-arrow.png b/app/images/nav-down-arrow.png.bak
similarity index 100%
rename from public/images/nav-down-arrow.png
rename to app/images/nav-down-arrow.png.bak
diff --git a/app/images/neighborhood-bg.png b/app/images/neighborhood-bg.png
new file mode 100644
index 000000000..2fc7d6b52
Binary files /dev/null and b/app/images/neighborhood-bg.png differ
diff --git a/public/images/neighborhood-zone.png b/app/images/neighborhood-zone.png
similarity index 100%
rename from public/images/neighborhood-zone.png
rename to app/images/neighborhood-zone.png
diff --git a/public/images/notification_border.png b/app/images/notification_border.png
similarity index 100%
rename from public/images/notification_border.png
rename to app/images/notification_border.png
diff --git a/public/images/notification_header.png b/app/images/notification_header.png
similarity index 100%
rename from public/images/notification_header.png
rename to app/images/notification_header.png
diff --git a/app/images/ourcommonplace-logo.png b/app/images/ourcommonplace-logo.png
new file mode 100644
index 000000000..7e8a660ab
Binary files /dev/null and b/app/images/ourcommonplace-logo.png differ
diff --git a/public/images/people.png b/app/images/people.png
similarity index 100%
rename from public/images/people.png
rename to app/images/people.png
diff --git a/app/images/pete-davis.png b/app/images/pete-davis.png
new file mode 100644
index 000000000..0654b3970
Binary files /dev/null and b/app/images/pete-davis.png differ
diff --git a/public/images/pin-icon.png b/app/images/pin-icon.png
similarity index 100%
rename from public/images/pin-icon.png
rename to app/images/pin-icon.png
diff --git a/public/images/plus_sign.png b/app/images/plus_sign.png
similarity index 100%
rename from public/images/plus_sign.png
rename to app/images/plus_sign.png
diff --git a/public/images/plus_sign.psd b/app/images/plus_sign.psd
similarity index 100%
rename from public/images/plus_sign.psd
rename to app/images/plus_sign.psd
diff --git a/app/images/post-box-button-sprite.png b/app/images/post-box-button-sprite.png
new file mode 100644
index 000000000..40d1eb109
Binary files /dev/null and b/app/images/post-box-button-sprite.png differ
diff --git a/app/images/post-box-button-sprite2.png b/app/images/post-box-button-sprite2.png
new file mode 100644
index 000000000..4f89aa05a
Binary files /dev/null and b/app/images/post-box-button-sprite2.png differ
diff --git a/app/images/post-hall-btn-selected.png b/app/images/post-hall-btn-selected.png
new file mode 100644
index 000000000..d83d59270
Binary files /dev/null and b/app/images/post-hall-btn-selected.png differ
diff --git a/app/images/post-hall-btn.png b/app/images/post-hall-btn.png
new file mode 100644
index 000000000..c371649c3
Binary files /dev/null and b/app/images/post-hall-btn.png differ
diff --git a/app/images/post-nav-hover-arrow.png b/app/images/post-nav-hover-arrow.png
new file mode 100644
index 000000000..9b6d438f2
Binary files /dev/null and b/app/images/post-nav-hover-arrow.png differ
diff --git a/public/images/posts.png b/app/images/posts.png
similarity index 100%
rename from public/images/posts.png
rename to app/images/posts.png
diff --git a/public/images/privacy.jpg b/app/images/privacy.jpg
similarity index 100%
rename from public/images/privacy.jpg
rename to app/images/privacy.jpg
diff --git a/public/images/reply-arrow-top.png b/app/images/reply-arrow-top.png
similarity index 100%
rename from public/images/reply-arrow-top.png
rename to app/images/reply-arrow-top.png
diff --git a/public/images/say-something-selected.png b/app/images/say-something-selected.png
similarity index 100%
rename from public/images/say-something-selected.png
rename to app/images/say-something-selected.png
diff --git a/public/images/say-something-unselected.png b/app/images/say-something-unselected.png
similarity index 100%
rename from public/images/say-something-unselected.png
rename to app/images/say-something-unselected.png
diff --git a/app/images/search-blue.png b/app/images/search-blue.png
new file mode 100644
index 000000000..a03c7282f
Binary files /dev/null and b/app/images/search-blue.png differ
diff --git a/app/images/shared/icons/add_person.png b/app/images/shared/icons/add_person.png
new file mode 100644
index 000000000..5e665a48f
Binary files /dev/null and b/app/images/shared/icons/add_person.png differ
diff --git a/app/images/shared/icons/search.png b/app/images/shared/icons/search.png
new file mode 100644
index 000000000..36a9a49ed
Binary files /dev/null and b/app/images/shared/icons/search.png differ
diff --git a/public/images/sign-up-now-btn.png b/app/images/sign-up-now-btn.png
similarity index 100%
rename from public/images/sign-up-now-btn.png
rename to app/images/sign-up-now-btn.png
diff --git a/public/images/sign-up-now.png b/app/images/sign-up-now.png
similarity index 100%
rename from public/images/sign-up-now.png
rename to app/images/sign-up-now.png
diff --git a/public/images/speech-bubble.png b/app/images/speech-bubble.png
similarity index 100%
rename from public/images/speech-bubble.png
rename to app/images/speech-bubble.png
diff --git a/public/images/staging.png b/app/images/staging.png
similarity index 100%
rename from public/images/staging.png
rename to app/images/staging.png
diff --git a/public/images/staging_notification_header.png b/app/images/staging_notification_header.png
similarity index 100%
rename from public/images/staging_notification_header.png
rename to app/images/staging_notification_header.png
diff --git a/public/images/staging_signup.png b/app/images/staging_signup.png
similarity index 100%
rename from public/images/staging_signup.png
rename to app/images/staging_signup.png
diff --git a/app/images/starter_site/border.jpg b/app/images/starter_site/border.jpg
new file mode 100644
index 000000000..16d1eb45a
Binary files /dev/null and b/app/images/starter_site/border.jpg differ
diff --git a/app/images/starter_site/bubble.png b/app/images/starter_site/bubble.png
new file mode 100644
index 000000000..d3b549429
Binary files /dev/null and b/app/images/starter_site/bubble.png differ
diff --git a/app/images/starter_site/bubble2.png b/app/images/starter_site/bubble2.png
new file mode 100644
index 000000000..2c82e3a40
Binary files /dev/null and b/app/images/starter_site/bubble2.png differ
diff --git a/app/images/starter_site/by.png b/app/images/starter_site/by.png
new file mode 100644
index 000000000..0893d5555
Binary files /dev/null and b/app/images/starter_site/by.png differ
diff --git a/app/images/starter_site/cp_public.png b/app/images/starter_site/cp_public.png
new file mode 100644
index 000000000..9a0f9d05a
Binary files /dev/null and b/app/images/starter_site/cp_public.png differ
diff --git a/app/images/starter_site/events.png b/app/images/starter_site/events.png
new file mode 100644
index 000000000..5ac56927b
Binary files /dev/null and b/app/images/starter_site/events.png differ
diff --git a/app/images/starter_site/goods_and_skills.png b/app/images/starter_site/goods_and_skills.png
new file mode 100644
index 000000000..72132a381
Binary files /dev/null and b/app/images/starter_site/goods_and_skills.png differ
diff --git a/app/images/starter_site/grid.png b/app/images/starter_site/grid.png
new file mode 100644
index 000000000..129d4a29f
Binary files /dev/null and b/app/images/starter_site/grid.png differ
diff --git a/app/images/starter_site/heart.png b/app/images/starter_site/heart.png
new file mode 100644
index 000000000..8f06e19b5
Binary files /dev/null and b/app/images/starter_site/heart.png differ
diff --git a/app/images/starter_site/icons/facebook.png b/app/images/starter_site/icons/facebook.png
new file mode 100644
index 000000000..a6cdb701e
Binary files /dev/null and b/app/images/starter_site/icons/facebook.png differ
diff --git a/app/images/starter_site/icons/newsletter.png b/app/images/starter_site/icons/newsletter.png
new file mode 100644
index 000000000..12b849846
Binary files /dev/null and b/app/images/starter_site/icons/newsletter.png differ
diff --git a/app/images/starter_site/icons/press-kit.png b/app/images/starter_site/icons/press-kit.png
new file mode 100644
index 000000000..1cd5906d1
Binary files /dev/null and b/app/images/starter_site/icons/press-kit.png differ
diff --git a/app/images/starter_site/icons/rox-home.png b/app/images/starter_site/icons/rox-home.png
new file mode 100644
index 000000000..54dcffb38
Binary files /dev/null and b/app/images/starter_site/icons/rox-home.png differ
diff --git a/app/images/starter_site/icons/twitter.png b/app/images/starter_site/icons/twitter.png
new file mode 100644
index 000000000..5b7f93b8e
Binary files /dev/null and b/app/images/starter_site/icons/twitter.png differ
diff --git a/app/images/starter_site/johns.png b/app/images/starter_site/johns.png
new file mode 100644
index 000000000..b7e866523
Binary files /dev/null and b/app/images/starter_site/johns.png differ
diff --git a/app/images/starter_site/logo.jpg b/app/images/starter_site/logo.jpg
new file mode 100644
index 000000000..22fee0b2b
Binary files /dev/null and b/app/images/starter_site/logo.jpg differ
diff --git a/app/images/starter_site/logo.png b/app/images/starter_site/logo.png
new file mode 100644
index 000000000..f5a7adeee
Binary files /dev/null and b/app/images/starter_site/logo.png differ
diff --git a/app/images/starter_site/logo1.png b/app/images/starter_site/logo1.png
new file mode 100644
index 000000000..affb38728
Binary files /dev/null and b/app/images/starter_site/logo1.png differ
diff --git a/app/images/starter_site/nd.png b/app/images/starter_site/nd.png
new file mode 100644
index 000000000..fd6486714
Binary files /dev/null and b/app/images/starter_site/nd.png differ
diff --git a/app/images/starter_site/person1.jpg b/app/images/starter_site/person1.jpg
new file mode 100644
index 000000000..a7e40b18e
Binary files /dev/null and b/app/images/starter_site/person1.jpg differ
diff --git a/app/images/starter_site/person2.png b/app/images/starter_site/person2.png
new file mode 100644
index 000000000..85031c80f
Binary files /dev/null and b/app/images/starter_site/person2.png differ
diff --git a/app/images/starter_site/person3.png b/app/images/starter_site/person3.png
new file mode 100644
index 000000000..de3edfcaa
Binary files /dev/null and b/app/images/starter_site/person3.png differ
diff --git a/app/images/starter_site/person5.png b/app/images/starter_site/person5.png
new file mode 100644
index 000000000..f4b1f6286
Binary files /dev/null and b/app/images/starter_site/person5.png differ
diff --git a/app/images/starter_site/person6.png b/app/images/starter_site/person6.png
new file mode 100644
index 000000000..333b2834b
Binary files /dev/null and b/app/images/starter_site/person6.png differ
diff --git a/app/images/starter_site/posts.png b/app/images/starter_site/posts.png
new file mode 100644
index 000000000..eeca860d0
Binary files /dev/null and b/app/images/starter_site/posts.png differ
diff --git a/app/images/starter_site/rails.png b/app/images/starter_site/rails.png
new file mode 100644
index 000000000..d5edc04e6
Binary files /dev/null and b/app/images/starter_site/rails.png differ
diff --git a/app/images/starter_site/screenshot1.png b/app/images/starter_site/screenshot1.png
new file mode 100644
index 000000000..83050ac08
Binary files /dev/null and b/app/images/starter_site/screenshot1.png differ
diff --git a/app/images/starter_site/screenshot2.png b/app/images/starter_site/screenshot2.png
new file mode 100644
index 000000000..a283bd520
Binary files /dev/null and b/app/images/starter_site/screenshot2.png differ
diff --git a/app/images/starter_site/screenshot3.png b/app/images/starter_site/screenshot3.png
new file mode 100644
index 000000000..532dadd65
Binary files /dev/null and b/app/images/starter_site/screenshot3.png differ
diff --git a/app/images/starter_site/screenshot4.png b/app/images/starter_site/screenshot4.png
new file mode 100644
index 000000000..72caa9a4a
Binary files /dev/null and b/app/images/starter_site/screenshot4.png differ
diff --git a/app/images/starter_site/share.png b/app/images/starter_site/share.png
new file mode 100644
index 000000000..70a3540c3
Binary files /dev/null and b/app/images/starter_site/share.png differ
diff --git a/app/images/starter_site/skyline-bg.png b/app/images/starter_site/skyline-bg.png
new file mode 100644
index 000000000..688282070
Binary files /dev/null and b/app/images/starter_site/skyline-bg.png differ
diff --git a/app/images/starter_site/user1.png b/app/images/starter_site/user1.png
new file mode 100644
index 000000000..ce06f954b
Binary files /dev/null and b/app/images/starter_site/user1.png differ
diff --git a/app/images/starter_site/users.png b/app/images/starter_site/users.png
new file mode 100644
index 000000000..da3a3fecd
Binary files /dev/null and b/app/images/starter_site/users.png differ
diff --git a/app/images/starter_site/users1.png b/app/images/starter_site/users1.png
new file mode 100644
index 000000000..46e5d5b40
Binary files /dev/null and b/app/images/starter_site/users1.png differ
diff --git a/app/images/step-1-icon-small.png b/app/images/step-1-icon-small.png
new file mode 100644
index 000000000..b8daaec47
Binary files /dev/null and b/app/images/step-1-icon-small.png differ
diff --git a/public/images/step-1-icon.png b/app/images/step-1-icon.png
similarity index 100%
rename from public/images/step-1-icon.png
rename to app/images/step-1-icon.png
diff --git a/app/images/step-2-icon-small.png b/app/images/step-2-icon-small.png
new file mode 100644
index 000000000..86cbfbb97
Binary files /dev/null and b/app/images/step-2-icon-small.png differ
diff --git a/public/images/step-2-icon.png b/app/images/step-2-icon.png
similarity index 100%
rename from public/images/step-2-icon.png
rename to app/images/step-2-icon.png
diff --git a/app/images/step-3-icon-small.png b/app/images/step-3-icon-small.png
new file mode 100644
index 000000000..9dca05472
Binary files /dev/null and b/app/images/step-3-icon-small.png differ
diff --git a/public/images/step-3-icon.png b/app/images/step-3-icon.png
similarity index 100%
rename from public/images/step-3-icon.png
rename to app/images/step-3-icon.png
diff --git a/public/images/step-4-icon-large.png b/app/images/step-4-icon-large.png
similarity index 100%
rename from public/images/step-4-icon-large.png
rename to app/images/step-4-icon-large.png
diff --git a/public/images/step-4-icon.png b/app/images/step-4-icon.png
similarity index 100%
rename from public/images/step-4-icon.png
rename to app/images/step-4-icon.png
diff --git a/public/images/step-5-icon.png b/app/images/step-5-icon.png
similarity index 100%
rename from public/images/step-5-icon.png
rename to app/images/step-5-icon.png
diff --git a/public/images/terms.jpg b/app/images/terms.jpg
similarity index 100%
rename from public/images/terms.jpg
rename to app/images/terms.jpg
diff --git a/public/images/test.png b/app/images/test.png
similarity index 100%
rename from public/images/test.png
rename to app/images/test.png
diff --git a/public/images/test_notification_header.png b/app/images/test_notification_header.png
similarity index 100%
rename from public/images/test_notification_header.png
rename to app/images/test_notification_header.png
diff --git a/public/images/test_signup.png b/app/images/test_signup.png
similarity index 100%
rename from public/images/test_signup.png
rename to app/images/test_signup.png
diff --git a/public/images/tipsy.gif b/app/images/tipsy.gif
similarity index 100%
rename from public/images/tipsy.gif
rename to app/images/tipsy.gif
diff --git a/app/images/tooltip-bg-sm.png b/app/images/tooltip-bg-sm.png
new file mode 100644
index 000000000..074f3af13
Binary files /dev/null and b/app/images/tooltip-bg-sm.png differ
diff --git a/app/images/topbubble.png b/app/images/topbubble.png
new file mode 100644
index 000000000..137f7bef2
Binary files /dev/null and b/app/images/topbubble.png differ
diff --git a/app/images/tour/announcement-icon.png b/app/images/tour/announcement-icon.png
new file mode 100644
index 000000000..7fb67ed6c
Binary files /dev/null and b/app/images/tour/announcement-icon.png differ
diff --git a/app/images/tour/discussion-icon.png b/app/images/tour/discussion-icon.png
new file mode 100644
index 000000000..e6805f2d0
Binary files /dev/null and b/app/images/tour/discussion-icon.png differ
diff --git a/app/images/tour/events-icon.png b/app/images/tour/events-icon.png
new file mode 100644
index 000000000..12ab9056f
Binary files /dev/null and b/app/images/tour/events-icon.png differ
diff --git a/app/images/tour/large-tour-bg.png b/app/images/tour/large-tour-bg.png
new file mode 100644
index 000000000..a5de515dc
Binary files /dev/null and b/app/images/tour/large-tour-bg.png differ
diff --git a/app/images/tour/neighborhood-post-icon.png b/app/images/tour/neighborhood-post-icon.png
new file mode 100644
index 000000000..fae0a9e4b
Binary files /dev/null and b/app/images/tour/neighborhood-post-icon.png differ
diff --git a/app/images/tour/next-button.png b/app/images/tour/next-button.png
new file mode 100644
index 000000000..8881977d1
Binary files /dev/null and b/app/images/tour/next-button.png differ
diff --git a/app/images/tour/reverse-small-tour-bg.png b/app/images/tour/reverse-small-tour-bg.png
new file mode 100644
index 000000000..8668179fe
Binary files /dev/null and b/app/images/tour/reverse-small-tour-bg.png differ
diff --git a/app/images/tour/small-tour-bg.png b/app/images/tour/small-tour-bg.png
new file mode 100644
index 000000000..074f3af13
Binary files /dev/null and b/app/images/tour/small-tour-bg.png differ
diff --git a/app/images/tour/star-icon.png b/app/images/tour/star-icon.png
new file mode 100644
index 000000000..1a6450905
Binary files /dev/null and b/app/images/tour/star-icon.png differ
diff --git a/app/images/tour/tour-button.png b/app/images/tour/tour-button.png
new file mode 100644
index 000000000..fb3b915d3
Binary files /dev/null and b/app/images/tour/tour-button.png differ
diff --git a/app/images/tour/up-tour-bg.png b/app/images/tour/up-tour-bg.png
new file mode 100644
index 000000000..459004de5
Binary files /dev/null and b/app/images/tour/up-tour-bg.png differ
diff --git a/app/images/tour/welcome-bg.png b/app/images/tour/welcome-bg.png
new file mode 100644
index 000000000..846ac628d
Binary files /dev/null and b/app/images/tour/welcome-bg.png differ
diff --git a/app/images/tour/welcome-to.png b/app/images/tour/welcome-to.png
new file mode 100644
index 000000000..7c7dd480c
Binary files /dev/null and b/app/images/tour/welcome-to.png differ
diff --git a/public/images/transparent_big.png b/app/images/transparent_big.png
similarity index 100%
rename from public/images/transparent_big.png
rename to app/images/transparent_big.png
diff --git a/public/images/transparent_old.png b/app/images/transparent_old.png
similarity index 100%
rename from public/images/transparent_old.png
rename to app/images/transparent_old.png
diff --git a/public/images/transparent_small.png b/app/images/transparent_small.png
similarity index 100%
rename from public/images/transparent_small.png
rename to app/images/transparent_small.png
diff --git a/public/images/upload.gif b/app/images/upload.gif
similarity index 100%
rename from public/images/upload.gif
rename to app/images/upload.gif
diff --git a/app/images/upperuws_notification_header.png b/app/images/upperuws_notification_header.png
new file mode 100644
index 000000000..51844105b
Binary files /dev/null and b/app/images/upperuws_notification_header.png differ
diff --git a/public/images/waiting.gif b/app/images/waiting.gif
similarity index 100%
rename from public/images/waiting.gif
rename to app/images/waiting.gif
diff --git a/public/images/westroxbury.png b/app/images/westroxbury.png
similarity index 100%
rename from public/images/westroxbury.png
rename to app/images/westroxbury.png
diff --git a/public/images/westroxbury/slideshow/1.jpg b/app/images/westroxbury/slideshow/1.jpg
similarity index 100%
rename from public/images/westroxbury/slideshow/1.jpg
rename to app/images/westroxbury/slideshow/1.jpg
diff --git a/public/images/westroxbury/slideshow/2.jpg b/app/images/westroxbury/slideshow/2.jpg
similarity index 100%
rename from public/images/westroxbury/slideshow/2.jpg
rename to app/images/westroxbury/slideshow/2.jpg
diff --git a/public/images/westroxbury/slideshow/3.jpg b/app/images/westroxbury/slideshow/3.jpg
similarity index 100%
rename from public/images/westroxbury/slideshow/3.jpg
rename to app/images/westroxbury/slideshow/3.jpg
diff --git a/public/images/westroxbury_notification_header.png b/app/images/westroxbury_notification_header.png
similarity index 100%
rename from public/images/westroxbury_notification_header.png
rename to app/images/westroxbury_notification_header.png
diff --git a/public/images/westroxbury_signup.png b/app/images/westroxbury_signup.png
similarity index 100%
rename from public/images/westroxbury_signup.png
rename to app/images/westroxbury_signup.png
diff --git a/public/images/yourtown.png b/app/images/yourtown.png
similarity index 100%
rename from public/images/yourtown.png
rename to app/images/yourtown.png
diff --git a/app/javascripts/accounts.js b/app/javascripts/accounts.js
new file mode 100644
index 000000000..0414802ff
--- /dev/null
+++ b/app/javascripts/accounts.js
@@ -0,0 +1,32 @@
+
+function load_modal(){
+ var photo_form = '
';
+ $.modal(photo_form, {
+ opacity:70,
+ overlayCss: {backgroundColor:"#000"},
+ containerCss:{
+ backgroundColor:"#fff",
+ borderColor:"#fff",
+ height:300,
+ padding:0,
+ width:340
+ },
+ overlayClose:true
+
+ });
+ $('#webcam').webcam({
+ width: 320,
+ height: 240,
+ mode: "save",
+ swffile: "/swf/jscam.swf",
+ onTick: function() {},
+ onSave: function(data) {},
+ onCapture: function() {
+ webcam.save('/account/take_photo');
+ },
+ debug: function() {},
+ onLoad: function() {}
+ });
+}
diff --git a/app/javascripts/active_admin.js b/app/javascripts/active_admin.js
new file mode 100644
index 000000000..5b3073cf6
--- /dev/null
+++ b/app/javascripts/active_admin.js
@@ -0,0 +1,51 @@
+/* Active Admin JS */
+
+$(function(){
+ $(".datepicker").datepicker({dateFormat: 'yy-mm-dd'});
+
+ $(".clear_filters_btn").click(function(){
+ window.location.search = "";
+ return false;
+ });
+
+ // AJAX Comments
+ $('form#admin_note_new').submit(function() {
+
+ if ($(this).find('#admin_note_body').val() != "") {
+ $(this).fadeOut('slow', function() {
+ $('.loading_indicator').fadeIn();
+ $.ajax({
+ url: $(this).attr('action'),
+ type: 'POST',
+ dataType: 'json',
+ data: $(this).serialize(),
+ success: function(data, textStatus, xhr) {
+ $('.loading_indicator').fadeOut('slow', function(){
+
+ // Hide the empty message
+ $('.admin_notes_list li.empty').fadeOut().remove();
+
+ // Add the note
+ $('.admin_notes_list').append(data['note']);
+
+ // Update the number of notes
+ $('.admin_notes h3 span.admin_notes_count').html("(" + data['number_of_notes'] + ")");
+
+ // Reset the form
+ $('form#new_active_admin_admin_note').find('#active_admin_admin_note_body').val("");
+
+ // Show the form
+ $('form#new_active_admin_admin_note').fadeIn('slow');
+ })
+ },
+ error: function(xhr, textStatus, errorThrown) {
+ //called when there is an error
+ }
+ });
+ });
+
+ };
+
+ return false;
+ });
+});
diff --git a/app/javascripts/active_admin_vendor.js b/app/javascripts/active_admin_vendor.js
new file mode 100644
index 000000000..f1a88eeb0
--- /dev/null
+++ b/app/javascripts/active_admin_vendor.js
@@ -0,0 +1,382 @@
+/*!
+ * jQuery JavaScript Library v1.4.2
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Sat Feb 13 22:33:48 2010 -0500
+ */
+(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o
)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
+Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
+(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
+a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
+"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
+function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;ba";
+var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
+parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
+s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
+applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
+else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
+a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
+w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
+cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
+c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
+a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
+function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
+k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
+C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type=
+e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
+f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
+if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
+e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
+"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
+d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
+t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
+g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
+CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
+g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
+text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
+setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
+h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
+"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
+h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
+q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="";
+if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
+(function(){var g=s.createElement("div");g.innerHTML="";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
+function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
+{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
+"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
+d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
+a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
+1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"+d+">"},F={option:[1,""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
+""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
+return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
+""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
+c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
+c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
+function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
+Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
+"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
+a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
+a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/"
+ + ""
+ + ""
+ + WYMeditor.DIALOG_BODY
+ + "