diff --git a/Gemfile b/Gemfile index f746c9b..801a0d5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,12 +1,22 @@ source 'http://rubygems.org' -gem 'rails', '3.0.0' +gem 'rails', '3.1.1' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'sqlite3-ruby', :require => 'sqlite3' +# Gems used only for assets and not required +# in production environments by default. +group :assets do + gem 'sass-rails', " ~> 3.1.0" + gem 'coffee-rails', "~> 3.1.0" + gem 'uglifier' +end + +gem 'jquery-rails' + # Use unicorn as the web server # gem 'unicorn' @@ -29,14 +39,14 @@ gem 'aws-s3', :require => 'aws/s3' # gem 'webrat' # end +gem 'sass-rails', "~> 3.1.0" gem "exception_notification", :git => "git://github.com/rails/exception_notification", :require => 'exception_notifier' gem 'pg' -gem 'meta_where' -gem 'typus', :git => 'https://github.com/fesplugas/typus.git' +gem 'devise' +gem 'squeel' gem 'mini_exiftool' -gem 'will_paginate', :git => 'http://github.com/mislav/will_paginate.git', :branch => 'rails3' +gem 'will_paginate' gem 'rdiscount' gem 'paperclip' gem 'acts_as_markup' -gem 'jquery-rails', '>= 0.2.6' gem 'yaml_db' diff --git a/Gemfile.lock b/Gemfile.lock index 877cede..2093375 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,115 +4,148 @@ GIT specs: exception_notification (1.0.0) -GIT - remote: http://github.com/mislav/will_paginate.git - revision: b1a5beeec9f56ecbe3594fcdca76d92b6767ce50 - branch: rails3 - specs: - will_paginate (3.0.pre3) - -GIT - remote: https://github.com/fesplugas/typus.git - revision: d03b28cc20c9b5cb82a34065d14348d491018b27 - specs: - typus (3.0.3) - render_inheritable - will_paginate (~> 3.0.pre2) - GEM remote: http://rubygems.org/ specs: - RedCloth (4.2.3) - abstract (1.0.0) - actionmailer (3.0.0) - actionpack (= 3.0.0) - mail (~> 2.2.5) - actionpack (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - builder (~> 2.1.2) - erubis (~> 2.6.6) - i18n (~> 0.4.1) - rack (~> 1.2.1) - rack-mount (~> 0.6.12) - rack-test (~> 0.5.4) - tzinfo (~> 0.3.23) - activemodel (3.0.0) - activesupport (= 3.0.0) - builder (~> 2.1.2) - i18n (~> 0.4.1) - activerecord (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - arel (~> 1.0.0) - tzinfo (~> 0.3.23) - activeresource (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - activesupport (3.0.0) + RedCloth (4.2.8) + actionmailer (3.1.1) + actionpack (= 3.1.1) + mail (~> 2.3.0) + actionpack (3.1.1) + activemodel (= 3.1.1) + activesupport (= 3.1.1) + builder (~> 3.0.0) + erubis (~> 2.7.0) + i18n (~> 0.6) + rack (~> 1.3.2) + rack-cache (~> 1.1) + rack-mount (~> 0.8.2) + rack-test (~> 0.6.1) + sprockets (~> 2.0.2) + activemodel (3.1.1) + activesupport (= 3.1.1) + builder (~> 3.0.0) + i18n (~> 0.6) + activerecord (3.1.1) + activemodel (= 3.1.1) + activesupport (= 3.1.1) + arel (~> 2.2.1) + tzinfo (~> 0.3.29) + activeresource (3.1.1) + activemodel (= 3.1.1) + activesupport (= 3.1.1) + activesupport (3.1.1) + multi_json (~> 1.0) acts_as_markup (1.3.4) RedCloth (~> 4.2) activerecord (>= 2.3.2) activesupport (>= 2.3.2) rdiscount (~> 1.3) wikitext (~> 2.0) - arel (1.0.1) - activesupport (~> 3.0.0) + arel (2.2.1) aws-s3 (0.6.2) builder mime-types xml-simple - builder (2.1.2) - erubis (2.6.6) - abstract (>= 1.0.0) - i18n (0.4.2) - jquery-rails (0.2.6) - rails (~> 3.0) - thor (~> 0.14.4) - mail (2.2.12) - activesupport (>= 2.3.6) + bcrypt-ruby (3.0.1) + builder (3.0.0) + cocaine (0.2.0) + coffee-rails (3.1.1) + coffee-script (>= 2.2.0) + railties (~> 3.1.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.1.2) + devise (1.4.9) + bcrypt-ruby (~> 3.0) + orm_adapter (~> 0.0.3) + warden (~> 1.0.3) + erubis (2.7.0) + execjs (1.2.9) + multi_json (~> 1.0) + hike (1.2.1) + i18n (0.6.0) + jquery-rails (1.0.16) + railties (~> 3.0) + thor (~> 0.14) + json (1.6.1) + mail (2.3.0) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) - meta_where (0.9.6) - activerecord (~> 3.0.0) - activesupport (~> 3.0.0) - arel (~> 1.0.1) - mime-types (1.16) - mini_exiftool (1.0.1) - paperclip (2.3.8) - activerecord - activesupport + mime-types (1.17.2) + mini_exiftool (1.3.1) + multi_json (1.0.3) + orm_adapter (0.0.5) + paperclip (2.4.5) + activerecord (>= 2.3.0) + activesupport (>= 2.3.2) + cocaine (>= 0.0.2) + mime-types pg (0.11.0) - polyglot (0.3.1) - rack (1.2.1) - rack-mount (0.6.13) + polyamorous (0.5.0) + activerecord (~> 3.0) + polyglot (0.3.2) + rack (1.3.5) + rack-cache (1.1) + rack (>= 0.4) + rack-mount (0.8.3) rack (>= 1.0.0) - rack-test (0.5.6) + rack-ssl (1.3.2) + rack + rack-test (0.6.1) rack (>= 1.0) - rails (3.0.0) - actionmailer (= 3.0.0) - actionpack (= 3.0.0) - activerecord (= 3.0.0) - activeresource (= 3.0.0) - activesupport (= 3.0.0) - bundler (~> 1.0.0) - railties (= 3.0.0) - railties (3.0.0) - actionpack (= 3.0.0) - activesupport (= 3.0.0) - rake (>= 0.8.4) - thor (~> 0.14.0) - rake (0.8.7) - rdiscount (1.6.5) - render_inheritable (1.0.0) - rails (~> 3.0) - sqlite3-ruby (1.3.2) + rails (3.1.1) + actionmailer (= 3.1.1) + actionpack (= 3.1.1) + activerecord (= 3.1.1) + activeresource (= 3.1.1) + activesupport (= 3.1.1) + bundler (~> 1.0) + railties (= 3.1.1) + railties (3.1.1) + actionpack (= 3.1.1) + activesupport (= 3.1.1) + rack-ssl (~> 1.3.2) + rake (>= 0.8.7) + rdoc (~> 3.4) + thor (~> 0.14.6) + rake (0.9.2.2) + rdiscount (1.6.8) + rdoc (3.11) + json (~> 1.4) + sass (3.1.10) + sass-rails (3.1.4) + actionpack (~> 3.1.0) + railties (~> 3.1.0) + sass (>= 3.1.4) + sprockets (~> 2.0.0) + tilt (~> 1.3.2) + sprockets (2.0.3) + hike (~> 1.2) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sqlite3 (1.3.4) + sqlite3-ruby (1.3.3) + sqlite3 (>= 1.3.3) + squeel (0.9.3) + activerecord (~> 3.0) + activesupport (~> 3.0) + polyamorous (~> 0.5.0) thor (0.14.6) - treetop (1.4.9) + tilt (1.3.3) + treetop (1.4.10) + polyglot polyglot (>= 0.3.1) - tzinfo (0.3.23) + tzinfo (0.3.30) + uglifier (1.0.4) + execjs (>= 0.3.0) + multi_json (>= 1.0.2) + warden (1.0.6) + rack (>= 1.0) wikitext (2.1.1) + will_paginate (3.0.2) xml-simple (1.1.1) yaml_db (0.2.2) @@ -122,15 +155,18 @@ PLATFORMS DEPENDENCIES acts_as_markup aws-s3 + coffee-rails (~> 3.1.0) + devise exception_notification! - jquery-rails (>= 0.2.6) - meta_where + jquery-rails mini_exiftool paperclip pg - rails (= 3.0.0) + rails (= 3.1.1) rdiscount + sass-rails (~> 3.1.0) sqlite3-ruby - typus! - will_paginate! + squeel + uglifier + will_paginate yaml_db diff --git a/Rakefile b/Rakefile index 0ddd1b5..51bc076 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ +#!/usr/bin/env rake # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) -require 'rake' -Photos::Application.load_tasks +DanBarberPhoto::Application.load_tasks diff --git a/public/images/me.jpg b/app/assets/images/me.jpg similarity index 100% rename from public/images/me.jpg rename to app/assets/images/me.jpg diff --git a/public/images/rails.png b/app/assets/images/rails.png similarity index 100% rename from public/images/rails.png rename to app/assets/images/rails.png diff --git a/public/images/title.png b/app/assets/images/title.png similarity index 100% rename from public/images/title.png rename to app/assets/images/title.png diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js new file mode 100644 index 0000000..1631d3d --- /dev/null +++ b/app/assets/javascripts/application.js @@ -0,0 +1,12 @@ +// This is a manifest file that'll be compiled into including all the files listed below. +// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +// be included in the compiled file accessible from http://example.com/assets/application.js +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// the compiled file. +// +//= require modernizr +//= require jquery +//= require jquery_ujs +//= require fancybox +//= require validate +//= require_directory . diff --git a/public/javascripts/photos.js b/app/assets/javascripts/photos.js similarity index 100% rename from public/javascripts/photos.js rename to app/assets/javascripts/photos.js diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css new file mode 100644 index 0000000..9257721 --- /dev/null +++ b/app/assets/stylesheets/application.css @@ -0,0 +1,7 @@ +/* + * This is a manifest file that'll automatically include all the stylesheets available in this directory + * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at + * the top of the compiled file, but it's generally better to create a new file per style scope. + *= require_self + *= require_directory . +*/ \ No newline at end of file diff --git a/app/assets/stylesheets/includes/_box_shadow.sass b/app/assets/stylesheets/includes/_box_shadow.sass new file mode 100644 index 0000000..d8de3f6 --- /dev/null +++ b/app/assets/stylesheets/includes/_box_shadow.sass @@ -0,0 +1,4 @@ +@mixin box-shadow($value) + -webkit-box-shadow: unquote($value) + -moz-box-shadow: unquote($value) + box-shadow: unquote($value) \ No newline at end of file diff --git a/app/assets/stylesheets/photos.css.sass b/app/assets/stylesheets/photos.css.sass new file mode 100644 index 0000000..9fc51ce --- /dev/null +++ b/app/assets/stylesheets/photos.css.sass @@ -0,0 +1,276 @@ +@import "includes/box_shadow" + +body + background: #101010 + color: white + font-family: "Helvetica Neue", "Arial", "Helvatica", sans-serif + font-size: 14px + overflow: hidden + +a + text-decoration: none + +p a + display: inline !important + color: #acf + &:hover + color: #fff + +#page + position: absolute + top: 40% + margin-top: -230px + width: 100% + +#container + padding-top: 20px + +#wrapper + background: #101010 + +#header + position: relative + background: #0082bf + height: 308px + a + display: block + height: 306px + width: 306px + &:hover + background: rgba(255, 255, 255, 0.1) + img + padding: 0 + margin: 0 + position: absolute + bottom: 18px + right: 20px + +#footer + //background: #333 + color: #333 + text-align: right + height: 28px + p + margin: 0 10px + +.sg-5, .sg-7, .sg-11, .sg-17, .sg-35, .sg-5 a, .sg-7 a, .sg-11 a, .sg-17 a, .sg-35 + -moz-border-radius: 2px + -webkit-border-radius: 2px + border-radius: 2px + +.sg-5 a, .sg-7 a, .sg-11 a, .sg-17 a + border: 1px solid rgba(255, 255, 255, 0.1) + +.sg-5 + height: 140px + a + position: relative + display: block + color: white + height: 138px + width: 138px + +.sg-7 + height: 196px + a + position: relative + display: block + color: white + height: 194px + width: 194px + +.sg-11 + height: 308px + a + display: block + height: 306px + width: 306px + +.sg-17 + height: 476px + a + display: block + width: 474px + height: 474px + +.about + background-color: #99BF00 + +.portfolio + background-color: #C03232 + +.contact + background-color: #777 + +.about a:focus, .portfolio a:focus, .contact a:focus + background: rgba(255, 255, 255, 0.1) + +.about a:hover, .portfolio a:hover, .contact a:hover + background: rgba(255, 255, 255, 0.2) + +.about a span, .portfolio a span, .contact a span + position: absolute + top: 10px + right: 20px + +.category + position: relative + a + display: block + color: white + text-decoration: none + +.photo a + display: block + color: white + text-decoration: none + +.category a + .arrow + position: absolute + font-size: 2em + bottom: 20px + left: 20px + &:focus + background: rgba(255, 255, 255, 0.1) + +.photo a:focus + background: rgba(255, 255, 255, 0.1) + +.category a:hover, .photo a:hover + background: rgba(255, 255, 255, 0.2) + +.blank-category, .blank-photo + background: #222 + outline: 1px dashed #444 + +.category h3 + position: absolute + top: 16px + right: 0 + text-align: right + margin: 0 20px + font-weight: normal + font-size: 1.1em + line-height: 1em + +img + +.page-links + background: #666 + +.prev-link, .next-link + color: white + font-size: 2em + position: relative + display: block + +.prev-link div, .next-link div + position: absolute + bottom: 15px + +.prev-link div + left: 20px + +.next-link div + right: 20px + +.prev-link:hover, .next-link:hover + background: rgba(255, 255, 255, 0.2) + +.about-content + background: #444 + color: #ccc + overflow: auto + div + padding: 15px 20px + p + margin-bottom: 0.6em + line-height: 1.35em + +/* FORM + +.contact-form + background: #ddd + +.field_with_errors + display: inline + +form + padding: 10px 25px + p + margin: 10px 0 + color: #555 + label + color: #666 + display: block + width: 75px + float: left + &.error + float: none + display: inline + color: #990000 + margin-left: 10px + textarea + height: 150px + width: 335px + font-family: "Helvetica Neue","Arial","Helvatica",sans-serif + font-size: 14px + padding: 3px + color: #333 + border: 2px solid #999 + -moz-border-radius: 3px + -webkit-border-radius: 3px + border-radius: 3px + input + &[type='text'] + font-family: "Helvetica Neue","Arial","Helvatica",sans-serif + font-size: 14px + padding: 3px + color: #333 + border: 2px solid #999 + -moz-border-radius: 3px + -webkit-border-radius: 3px + border-radius: 3px + &#contact_name, &#contact_email + width: 175px + &#contact_subject + width: 335px + +#alert + background: #fffeef + color: #664400 + border-width: 2px 0 + border-style: solid + border-color: #996600 + padding: 0 10px 2px + margin-top: 15px + +#notice + background: #efffef + color: #446600 + border-width: 2px 0 + border-style: solid + border-color: #669900 + padding: 0 10px 2px + margin-top: 15px + +.field_with_errors + input, textarea + background: #ffefef + border-color: #cc3333 !important + +input.error, textarea.error + background: #ffefef + border-color: #cc3333 !important + +form input[type='submit'] + background: #666 + font-family: "Helvetica Neue","Arial","Helvatica",sans-serif + font-size: 14px + padding: 3px + color: white + border: 2px solid #333 + -moz-border-radius: 3px + -webkit-border-radius: 3px + border-radius: 3px diff --git a/app/assets/stylesheets/scrollbars.css.sass b/app/assets/stylesheets/scrollbars.css.sass new file mode 100644 index 0000000..c3fdf7d --- /dev/null +++ b/app/assets/stylesheets/scrollbars.css.sass @@ -0,0 +1,47 @@ +/* Shamelessly stolen from elliottkember.com, which in turn was shamelessly stolen from maxvoltar.com, which in turn was shamelessly stolen from chatrboxapp.com. + + +::-webkit-scrollbar + width: 6px + height: 6px +::-webkit-scrollbar-button + &:start:decrement, &:end:increment + display: block + height: 4px + &:vertical:increment + background-color: #fff + background: transparent +::-webkit-scrollbar-track, ::-webkit-scrollbar-track-piece + -webkit-border-radius: 3px +::-webkit-scrollbar-thumb + &:vertical + height: 50px + background-color: #666 + opacity: 0.5 + -webkit-border-radius: 3px + position: relative + &:horizontal + width: 50px + background-color: #999 + -webkit-border-radius: 3px + &:vertical + &:hover + background-color: #999 + &:active, &:focus + background-color: #ddd + +html + /*overflow-y: scroll; + overflow: auto + /*width: 100% !important; + +/* @group default + +#wrapper + margin: 0 auto + +html + overflow-x: hidden + +#turn_wrapper + left: 10px !important diff --git a/app/assets/stylesheets/squaregrid.css.sass b/app/assets/stylesheets/squaregrid.css.sass new file mode 100644 index 0000000..3c8ad49 --- /dev/null +++ b/app/assets/stylesheets/squaregrid.css.sass @@ -0,0 +1,239 @@ +/* RESET CSS by http://meyerweb.com/eric/tools/css/reset/ + +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td + margin: 0 + padding: 0 + border: 0 + outline: 0 + font-size: 100% + vertical-align: baseline + background: transparent + +body + line-height: 1 + +ol, ul + list-style: none + +blockquote, q + quotes: none + +blockquote + &:before, &:after + content: '' + content: none + +q + &:before, &:after + content: '' + content: none + +\:focus + outline: 0 + +/* remember to define focus styles! + +ins + text-decoration: none + +/* remember to highlight inserts somehow! + +del + text-decoration: line-through + +table + border-collapse: collapse + border-spacing: 0 + +/* tables still need 'cellspacing="0"' in the markup + +.clear + clear: both + display: block + overflow: hidden + visibility: hidden + width: 0 + height: 0 + +/* source: http://sonspring.com/journal/clearing-floats + +/* BEGIN SQUARE GRID CODE + +body + background-color: #f4f4f4 + font-size: 62.5% + line-height: 28px + /* for RTL add: 'direction: rtl;' + +/* your main wrapping div + +#wrapper + margin: 0 auto + position: relative + overflow: hidden + width: 994px + background: #fff + +#container + width: 1008px + /* essential + margin-left: -7px + +/* global styling to apply to all columns + +.sg-1, .sg-2, .sg-3, .sg-4, .sg-5, .sg-6, .sg-7, .sg-8, .sg-9, .sg-10, .sg-11, .sg-12, .sg-13, .sg-14, .sg-15, .sg-16, .sg-17, .sg-18, .sg-19, .sg-20, .sg-21, .sg-22, .sg-23, .sg-24, .sg-25, .sg-26, .sg-27, .sg-28, .sg-29, .sg-30, .sg-31, .sg-32, .sg-33, .sg-34, .sg-35 + margin: 0px 14px 28px 14px + float: left + /* for RTL change float to 'right' + +/* if you want to have a div as a parent with divs inside - add this class to parent div + +.sgParent + margin: 0px + +/* essential: width for all columns + +.sg-1 + width: 28px + +.sg-2 + width: 56px + +.sg-3 + width: 84px + +.sg-4 + width: 112px + +.sg-5 + width: 140px + +.sg-6 + width: 168px + +.sg-7 + width: 196px + +.sg-8 + width: 224px + +.sg-9 + width: 252px + +.sg-10 + width: 280px + +.sg-11 + width: 308px + +.sg-12 + width: 336px + +.sg-13 + width: 364px + +.sg-14 + width: 392px + +.sg-15 + width: 420px + +.sg-16 + width: 448px + +.sg-17 + width: 476px + +.sg-18 + width: 504px + +.sg-19 + width: 532px + +.sg-20 + width: 560px + +.sg-21 + width: 588px + +.sg-22 + width: 616px + +.sg-23 + width: 644px + +.sg-24 + width: 672px + +.sg-25 + width: 700px + +.sg-26 + width: 728px + +.sg-27 + width: 756px + +.sg-28 + width: 784px + +.sg-29 + width: 812px + +.sg-30 + width: 840px + +.sg-31 + width: 868px + +.sg-32 + width: 896px + +.sg-33 + width: 924px + +.sg-34 + width: 952px + +.sg-35 + width: 980px + +/* add a dividing border to the right or left simply by addiing one of these classes to a div + +.borderRight + border-right: 1px solid #222 + margin-right: 0px + padding-right: 13px + +.borderLeft + border-left: 1px solid #222 + margin-left: 0px + padding-left: 13px + +/* CONTROLLER - optional + +#controller + position: fixed + top: 14px + right: 14px + z-index: 9999 + ul + border-color: #222 + border-style: solid + border-width: 0px 1px + li + a + color: #222 + display: block + font: 14px / 26px Verdana + height: 26px + width: 26px + margin: 1px + text-align: center + text-decoration: none + &:hover + font-weight: bold + &.selected a + background-color: #222 + color: #fff + font-weight: bold diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 100c63d..e1a004a 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -3,7 +3,7 @@ class CategoriesController < ApplicationController # GET /categories # GET /categories.xml def index - @categories = Category.order('sort ASC').paginate :all, :page => params[:page], :per_page => 4 + @categories = Category.order('sort ASC').paginate :page => params[:page], :per_page => 4 @photos = Photo.featured.limit(2).order('RANDOM()') diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 48308f6..1ca84c1 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -7,7 +7,7 @@ class PhotosController < ApplicationController def index if params[:category_id] @category = Category.find_by_id(params[:category_id]) - @photos = @category.photos.enabled.order(:taken_at.desc).paginate(:page => params[:page], :per_page => 11) + @photos = @category.photos.enabled.order{taken_at.desc}.paginate(:page => params[:page], :per_page => 11) @page_title = @category.name else @photos = Photo.enabled.order(:taken_at.desc).paginate :all, :page => params[:page], :per_page => 11 diff --git a/public/stylesheets/.gitkeep b/app/mailers/.gitkeep similarity index 100% rename from public/stylesheets/.gitkeep rename to app/mailers/.gitkeep diff --git a/app/models/.gitkeep b/app/models/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app/models/photo.rb b/app/models/photo.rb index 9cafa47..e12754c 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -11,7 +11,7 @@ class Photo < ActiveRecord::Base :size3 => "84x84#", :size2 => "56x56#" }, :storage => :s3, - :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", + :s3_credentials => "#{Rails.root}/config/s3.yml", :s3_protocol => "https", :path => ":attachment/:id/:style.:extension", :bucket => 'danbarberphoto', diff --git a/app/views/layouts/photos.html.erb b/app/views/layouts/photos.html.erb index 31d12a1..1c325f9 100644 --- a/app/views/layouts/photos.html.erb +++ b/app/views/layouts/photos.html.erb @@ -11,7 +11,7 @@ <%= stylesheet_link_tag "photos", :media => "all" %> <%= stylesheet_link_tag "fancybox", :media => "all" %> <%= stylesheet_link_tag "scrollbars", :media => "screen" %> - <%= javascript_include_tag 'jquery', 'jquery.validate', 'jrails', 'fancybox', 'photos' %> + <%= javascript_include_tag 'application' %> @@ -24,7 +24,7 @@
<%= yield %> diff --git a/app/views/pages/about.html.erb b/app/views/pages/about.html.erb index b5d65d8..78c2c5c 100644 --- a/app/views/pages/about.html.erb +++ b/app/views/pages/about.html.erb @@ -13,7 +13,7 @@
-
+
diff --git a/config.ru b/config.ru index 69cf39b..230e0be 100644 --- a/config.ru +++ b/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) -run Photos::Application +run DanBarberPhoto::Application diff --git a/config/application.rb b/config/application.rb index 7eb867c..6475e16 100644 --- a/config/application.rb +++ b/config/application.rb @@ -2,11 +2,14 @@ require File.expand_path('../boot', __FILE__) require 'rails/all' -# If you have a Gemfile, require the gems listed there, including any gems -# you've limited to :test, :development, or :production. -Bundler.require(:default, Rails.env) if defined?(Bundler) +if defined?(Bundler) + # If you precompile assets before deploying to production, use this line + Bundler.require *Rails.groups(:assets => %w(development test)) + # If you want your assets lazily compiled in production, use this line + # Bundler.require(:default, :assets, Rails.env) +end -module Photos +module DanBarberPhoto class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers @@ -27,11 +30,8 @@ module Photos # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # JavaScript files you want as :defaults (application.js is always included). - # config.action_view.javascript_expansions[:defaults] = %w(jquery rails) + config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + config.i18n.default_locale = :en # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" @@ -39,6 +39,15 @@ module Photos # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] + # Enable the asset pipeline + config.assets.enabled = true + + # Version of your assets, change this if you want to expire all your assets + config.assets.version = '1.0' + + # Prefer SASS syntax for stylesheets + config.sass.preferred_syntax = :sass + # Rack Middleware config.middleware.use ::ExceptionNotifier, :email_prefix => "[DanBarberPhoto] ", :sender_address => %{"Exception Notification" }, @@ -46,5 +55,3 @@ module Photos end end - -ActionMailer::Base.delivery_method = :sendmail diff --git a/config/boot.rb b/config/boot.rb index ab6cb37..4489e58 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,13 +1,6 @@ require 'rubygems' # Set up gems listed in the Gemfile. -gemfile = File.expand_path('../../Gemfile', __FILE__) -begin - ENV['BUNDLE_GEMFILE'] = gemfile - require 'bundler' - Bundler.setup -rescue Bundler::GemNotFound => e - STDERR.puts e.message - STDERR.puts "Try running `bundle install`." - exit! -end if File.exist?(gemfile) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) + +require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) diff --git a/config/environment.rb b/config/environment.rb index 6c12e33..9087dc3 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -2,4 +2,4 @@ require File.expand_path('../application', __FILE__) # Initialize the rails application -Photos::Application.initialize! +DanBarberPhoto::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 8cdd743..c85b54c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,9 +1,9 @@ -Photos::Application.configure do - # Settings specified here will take precedence over those in config/environment.rb +DanBarberPhoto::Application.configure do + # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development - # since you don't have to restart the webserver when you make code changes. + # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Log error messages when you accidentally call methods on nil. @@ -11,7 +11,6 @@ Photos::Application.configure do # Show full error reports and disable caching config.consider_all_requests_local = true - config.action_view.debug_rjs = true config.action_controller.perform_caching = false # Don't care if the mailer can't send @@ -22,5 +21,24 @@ Photos::Application.configure do # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin -end + # Do not compress assets + config.assets.compress = false + + # Expands the lines which load the assets + config.assets.debug = true + + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { + :address => "smtp.gmail.com", + :port => 587, + :domain => 'danbee.co.uk', + :user_name => 'webapps@danbee.co.uk', + :password => 'fy-qua-paqu-rhuh-quok-py', + :authentication => 'plain', + :enable_starttls_auto => true + } + + config.action_mailer.default_url_options = { :host => "danbarberphoto.dev" } + +end \ No newline at end of file diff --git a/config/environments/production.rb b/config/environments/production.rb index 66a1a1a..978091c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,7 +1,6 @@ -Photos::Application.configure do - # Settings specified here will take precedence over those in config/environment.rb +DanBarberPhoto::Application.configure do + # Settings specified here will take precedence over those in config/application.rb - # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true @@ -9,14 +8,27 @@ Photos::Application.configure do config.consider_all_requests_local = false config.action_controller.perform_caching = true + # Disable Rails's static asset server (Apache or nginx will already do this) + config.serve_static_assets = false + + # Compress JavaScripts and CSS + config.assets.compress = true + + # Don't fallback to assets pipeline if a precompiled asset is missed + config.assets.compile = false + + # Generate digests for assets URLs + config.assets.digest = true + + # Defaults to Rails.root.join("public/assets") + # config.assets.manifest = YOUR_PATH + # Specifies the header that your server uses for sending files - config.action_dispatch.x_sendfile_header = "X-Sendfile" + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - # For nginx: - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' - - # If you have no front-end server that supports something like X-Sendfile, - # just comment this out and Rails will serve the files + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true # See everything in the log (default is :info) # config.log_level = :debug @@ -27,13 +39,12 @@ Photos::Application.configure do # Use a different cache store in production # config.cache_store = :mem_cache_store - # Disable Rails's static asset server - # In production, Apache or nginx will already do this - config.serve_static_assets = false - - # Enable serving of images, stylesheets, and javascripts from an asset server + # Enable serving of images, stylesheets, and JavaScripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" + # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) + config.assets.precompile += %w( admin.js admin.css ) + # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false @@ -46,4 +57,18 @@ Photos::Application.configure do # Send deprecation notices to registered listeners config.active_support.deprecation = :notify + + # Heroku Sendgrid settings. + ActionMailer::Base.smtp_settings = { + :address => 'smtp.sendgrid.net', + :port => '587', + :authentication => :plain, + :user_name => ENV['SENDGRID_USERNAME'], + :password => ENV['SENDGRID_PASSWORD'], + :domain => 'heroku.com' + } + ActionMailer::Base.delivery_method = :smtp + + config.action_mailer.default_url_options = { :host => "danbarberphoto.com" } + end diff --git a/config/environments/test.rb b/config/environments/test.rb index 33e40e5..b1a0a1d 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,4 +1,4 @@ -Photos::Application.configure do +DanBarberPhoto::Application.configure do # Settings specified here will take precedence over those in config/environment.rb # The test environment is used exclusively to run your application's diff --git a/config/initializers/cookie_verification_secret.rb b/config/initializers/cookie_verification_secret.rb deleted file mode 100644 index f74da38..0000000 --- a/config/initializers/cookie_verification_secret.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -ActionController::Base.cookie_verifier_secret = 'b1d6b935fa81c698e8da3f2452f0aabc70c70c06903b6a9f281caf8cdb64ed4f4eaeb02c19077c642dee2dcb40191780fbe028fb7c6274f8a47550ec6b2c7663'; diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index a4a0489..cb1ab71 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -4,4 +4,4 @@ # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -Photos::Application.config.secret_token = 'd1211d350d798302a7221c5278ead687c890f694207a9f6b5224a26bac2f00e853f9ecc780554d2e3f1f36606a583c7c6f1f371ce945082f7a3154132762e1b7' +DanBarberPhoto::Application.config.secret_token = '61b03777f23e7feb0610d1a7ef5f89c7cf884b73502ab4ef88517d578308a8adeddbf5b362776b1d48957a0b4f3d2227208b62ba057666b90eec6cd804a71a03' diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index c0e57cd..2eaad7f 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,8 +1,8 @@ # Be sure to restart your server when you modify this file. -Photos::Application.config.session_store :cookie_store, :key => '_photos_session' +DanBarberPhoto::Application.config.session_store :cookie_store, key: '_danbarberphoto_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information -# (create the session table with "rake db:sessions:create") -# Photos::Application.config.session_store :active_record_store +# (create the session table with "rails generate session_migration") +# DanBarberPhoto::Application.config.session_store :active_record_store diff --git a/config/initializers/typus.rb b/config/initializers/typus.rb deleted file mode 100644 index 0ff0036..0000000 --- a/config/initializers/typus.rb +++ /dev/null @@ -1,31 +0,0 @@ -Typus.setup do |config| - - # Application name. - config.admin_title = "danbarberphoto" - # config.admin_sub_title = "" - - # When mailer_sender is set, password recover is enabled. This email - # address will be used in Admin::Mailer. - # config.mailer_sender = "admin@example.com" - - # Define paperclip attachment styles. - # config.file_preview = :medium - # config.file_thumbnail = :thumb - config.file_preview = :preview - config.file_thumbnail = :size2 - - # Authentication: +:none+, +:http_basic+ - # Run `rails g typus:migration` if you need an advanced authentication system. - # config.authentication = :none - - # Define username and password for +:http_basic+ authentication - # config.username = "admin" - # config.password = "columbia" - - # Pagination options: - # These options are passed to `will_paginate`. You can see the available - # options in the plugin source. (https://github.com/mislav/will_paginate/blob/rails3/lib/will_paginate/view_helpers.rb) - # config.pagination = { :previous_label => "← " + Typus::I18n.t("Previous"), - # :next_label => Typus::I18n.t("Next") + " →" } - -end diff --git a/config/initializers/typus_authentication.rb b/config/initializers/typus_authentication.rb deleted file mode 100644 index 9329423..0000000 --- a/config/initializers/typus_authentication.rb +++ /dev/null @@ -1,18 +0,0 @@ -Typus.setup do |config| - - # Define authentication: +:none+, +:http_basic+, +:session+ - config.authentication = :session - - # Define master_role. - # config.master_role = "admin" - - # Define relationship. - # config.relationship = "typus_users" - - # Define user_class_name. - config.user_class_name = "AdminUser" - - # Define user_fk. - config.user_fk = "admin_user_id" - -end diff --git a/config/initializers/typus_resources.rb b/config/initializers/typus_resources.rb deleted file mode 100644 index a728122..0000000 --- a/config/initializers/typus_resources.rb +++ /dev/null @@ -1,27 +0,0 @@ -Typus::Resources.setup do |config| - - # Defines default_action_on_item. - # config.default_action_on_item = "edit" - - # Defines end_year. - # config.end_year = nil - - # Defines form_rows. - # config.form_rows = 15 - - # Defines action_after_save. - # config.action_after_save = "edit" - - # Defines minute_step. - # config.minute_step = 5 - - # Defines only_user_items. - # config.only_user_items = false - - # Defines per_page. - # config.per_page = 15 - - # Defines start_year. - # config.start_year = nil - -end diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb new file mode 100644 index 0000000..999df20 --- /dev/null +++ b/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# Disable root element in JSON by default. +ActiveSupport.on_load(:active_record) do + self.include_root_in_json = false +end diff --git a/config/locales/en.yml b/config/locales/en.yml index a747bfa..179c14c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,5 +1,5 @@ # Sample localization file for English. Add more files in this directory for other locales. -# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. en: hello: "Hello world" diff --git a/config/routes.rb b/config/routes.rb index 72decb7..b058a68 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,4 @@ -Photos::Application.routes.draw do +DanBarberPhoto::Application.routes.draw do resources :contacts # The priority is based upon order of creation: diff --git a/lib/assets/.gitkeep b/lib/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/log/.gitkeep b/log/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/public/images/.DS_Store b/public/images/.DS_Store deleted file mode 100644 index 6a4b2e3..0000000 Binary files a/public/images/.DS_Store and /dev/null differ diff --git a/public/images/admin/fancybox/fancy_close.png b/public/images/admin/fancybox/fancy_close.png deleted file mode 100644 index 0703530..0000000 Binary files a/public/images/admin/fancybox/fancy_close.png and /dev/null differ diff --git a/public/images/admin/ui-icons.png b/public/images/admin/ui-icons.png deleted file mode 100644 index 8ede620..0000000 Binary files a/public/images/admin/ui-icons.png and /dev/null differ diff --git a/public/images/fancybox/blank.gif b/public/images/fancybox/blank.gif deleted file mode 100644 index 35d42e8..0000000 Binary files a/public/images/fancybox/blank.gif and /dev/null differ diff --git a/public/images/fancybox/fancy_close.png b/public/images/fancybox/fancy_close.png deleted file mode 100644 index 0703530..0000000 Binary files a/public/images/fancybox/fancy_close.png and /dev/null differ diff --git a/public/images/fancybox/fancy_loading.png b/public/images/fancybox/fancy_loading.png deleted file mode 100644 index 2503017..0000000 Binary files a/public/images/fancybox/fancy_loading.png and /dev/null differ diff --git a/public/images/fancybox/fancy_nav_left.png b/public/images/fancybox/fancy_nav_left.png deleted file mode 100644 index ebaa6a4..0000000 Binary files a/public/images/fancybox/fancy_nav_left.png and /dev/null differ diff --git a/public/images/fancybox/fancy_nav_right.png b/public/images/fancybox/fancy_nav_right.png deleted file mode 100644 index 873294e..0000000 Binary files a/public/images/fancybox/fancy_nav_right.png and /dev/null differ diff --git a/public/images/fancybox/fancy_shadow_e.png b/public/images/fancybox/fancy_shadow_e.png deleted file mode 100644 index 2eda089..0000000 Binary files a/public/images/fancybox/fancy_shadow_e.png and /dev/null differ diff --git a/public/images/fancybox/fancy_shadow_n.png b/public/images/fancybox/fancy_shadow_n.png deleted file mode 100644 index 69aa10e..0000000 Binary files a/public/images/fancybox/fancy_shadow_n.png and /dev/null differ diff --git a/public/images/fancybox/fancy_shadow_ne.png b/public/images/fancybox/fancy_shadow_ne.png deleted file mode 100644 index 79f6980..0000000 Binary files a/public/images/fancybox/fancy_shadow_ne.png and /dev/null differ diff --git a/public/images/fancybox/fancy_shadow_nw.png b/public/images/fancybox/fancy_shadow_nw.png deleted file mode 100644 index 7182cd9..0000000 Binary files a/public/images/fancybox/fancy_shadow_nw.png and /dev/null differ diff --git a/public/images/fancybox/fancy_shadow_s.png b/public/images/fancybox/fancy_shadow_s.png deleted file mode 100644 index d8858bf..0000000 Binary files a/public/images/fancybox/fancy_shadow_s.png and /dev/null differ diff --git a/public/images/fancybox/fancy_shadow_se.png b/public/images/fancybox/fancy_shadow_se.png deleted file mode 100644 index 541e3ff..0000000 Binary files a/public/images/fancybox/fancy_shadow_se.png and /dev/null differ diff --git a/public/images/fancybox/fancy_shadow_sw.png b/public/images/fancybox/fancy_shadow_sw.png deleted file mode 100644 index b451689..0000000 Binary files a/public/images/fancybox/fancy_shadow_sw.png and /dev/null differ diff --git a/public/images/fancybox/fancy_shadow_w.png b/public/images/fancybox/fancy_shadow_w.png deleted file mode 100644 index 8a4e4a8..0000000 Binary files a/public/images/fancybox/fancy_shadow_w.png and /dev/null differ diff --git a/public/images/fancybox/fancy_title_left.png b/public/images/fancybox/fancy_title_left.png deleted file mode 100644 index 6049223..0000000 Binary files a/public/images/fancybox/fancy_title_left.png and /dev/null differ diff --git a/public/images/fancybox/fancy_title_main.png b/public/images/fancybox/fancy_title_main.png deleted file mode 100644 index 8044271..0000000 Binary files a/public/images/fancybox/fancy_title_main.png and /dev/null differ diff --git a/public/images/fancybox/fancy_title_over.png b/public/images/fancybox/fancy_title_over.png deleted file mode 100644 index d9f458f..0000000 Binary files a/public/images/fancybox/fancy_title_over.png and /dev/null differ diff --git a/public/images/fancybox/fancy_title_right.png b/public/images/fancybox/fancy_title_right.png deleted file mode 100644 index e36d9db..0000000 Binary files a/public/images/fancybox/fancy_title_right.png and /dev/null differ diff --git a/public/index.html_ b/public/index.html_ deleted file mode 100644 index 75d5edd..0000000 --- a/public/index.html_ +++ /dev/null @@ -1,239 +0,0 @@ - - - - Ruby on Rails: Welcome aboard - - - - -
- - -
- - - - -
-

Getting started

-

Here’s how to get rolling:

- -
    -
  1. -

    Use rails generate to create your models and controllers

    -

    To see all available options, run it without parameters.

    -
  2. - -
  3. -

    Set up a default route and remove or rename this file

    -

    Routes are set up in config/routes.rb.

    -
  4. - -
  5. -

    Create your database

    -

    Run rake db:migrate to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password.

    -
  6. -
-
-
- - -
- - diff --git a/public/javascripts/admin/application.js b/public/javascripts/admin/application.js deleted file mode 100644 index 4789b11..0000000 --- a/public/javascripts/admin/application.js +++ /dev/null @@ -1,2 +0,0 @@ -// Place your application-specific JavaScript functions and classes for -// Typus here. diff --git a/public/javascripts/admin/jquery-1.4.1.min.js b/public/javascripts/admin/jquery-1.4.1.min.js deleted file mode 100644 index 0c7294c..0000000 --- a/public/javascripts/admin/jquery-1.4.1.min.js +++ /dev/null @@ -1,152 +0,0 @@ -/*! - * jQuery JavaScript Library v1.4.1 - * 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: Mon Jan 25 19:43:33 2010 -0500 - */ -(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(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,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f, -a.currentTarget);m=0;for(s=i.length;m)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent, -va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=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(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]], -[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a, -this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this, -a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.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(Q.apply(this,arguments),"slice",Q.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,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support= -{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; -b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="";a=r.createDocumentFragment();a.appendChild(d.firstChild); -c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=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(),Ua=0,xa={},Va={};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==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true, -{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa: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{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}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===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&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===v)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 ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/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(o){var m= -c(this);m.addClass(a.call(this,o,m.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===v){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 i=b?d:0;for(d=b?d+1:e.length;i=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});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 v;if(f&&b in c.attrFn)return c(a)[b](d); -f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.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:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;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&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=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!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j= -function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a, -d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+ -s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a, -"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.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 v;a.result=v;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(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b, -d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), -fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| -d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b= -0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true}; -c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b= -a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!== -"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this, -"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"|| -d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.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 ea.call(this,a)},beforeactivate:function(a){a= -a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.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 i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, -b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g|| -typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u= -l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.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])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&& -y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l=0))k||l.push(u);else if(k)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,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.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,k){return!!o(k[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,k,l){return h===l.length-1},even:function(g,h){return h%2=== -0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return hk[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k= -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 k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="? -k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=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(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id"); -return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href", -2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== -0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[], -l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.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 i=d;i0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e --1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.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(pa(a[0])||pa(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);bb.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||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.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===v||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 Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/"},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!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(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}},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(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/