Permalink
Browse files

remove docs and related, they now live at fog/fog.github.com

  • Loading branch information...
1 parent 289dcc3 commit 1cfd2c5546697584d03b477c77a7aba63d225ea4 @geemus geemus committed Dec 28, 2012
View
5 Rakefile
@@ -106,7 +106,6 @@ task :release => :build do
sh "git push origin master"
sh "git push origin v#{version}"
sh "gem push pkg/#{name}-#{version}.gem"
- Rake::Task[:docs].invoke
end
task :build => :gemspec do
@@ -151,7 +150,3 @@ end
require "tasks/changelog_task"
Fog::Rake::ChangelogTask.new
-
-require "tasks/documentation_task"
-Fog::Rake::DocumentationTask.new
-
View
39 docs/_config.yml
@@ -1,39 +0,0 @@
-safe: false
-auto: false
-server: false
-server_port: 4000
-
-source: .
-destination: ./_site
-plugins: ./_plugins
-
-future: true
-lsi: false
-pygments: false
-markdown: maruku
-permalink: none
-
-maruku:
- use_tex: false
- use_divs: false
- png_engine: blahtex
- png_dir: images/latex
- png_url: /images/latex
-
-rdiscount:
- extensions: []
-
-kramdown:
- auto_ids: true,
- footnote_nr: 1
- entity_output: as_char
- toc_levels: 1..6
- use_coderay: false
-
- coderay:
- coderay_wrap: div
- coderay_line_numbers: inline
- coderay_line_numbers_start: 1
- coderay_tab_width: 4
- coderay_bold_every: 10
- coderay_css: style
View
111 docs/_layouts/default.html
@@ -1,111 +0,0 @@
-<!doctype html>
-
-<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
-<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
-<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
-<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
-<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
-<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-
- <title>fog - {{ page.title }}</title>
- <meta name="description" content="">
- <meta name="author" content="">
-
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <!--
- <link rel="shortcut icon" href="/public/favicon.ico">
- <link rel="apple-touch-icon" href="/public/apple-touch-icon.png">
- -->
-
- <link rel="stylesheet" href="/public/css/style.css?v=2">
- <link rel="stylesheet" href="/public/css/fog.css?v=2">
- <script src="/public/js/libs/modernizr-1.6.min.js"></script>
-
-</head>
-
-<body>
-
- <div id="container">
- <header>
- <a href="/"><img src="/public/images/fog.png" title="fog" /></a>
- <h1>{{ page.title }}</h1>
- <dl>
- <dt>version</dt><dd>vX.Y.Z</dd>
- <dt>install</dt><dd><code>gem install fog</code></dd>
- <dt>source</dt><dd><a href="http://github.com/fog/fog">fog/fog</a></dd>
- </dl>
- </header>
-
- <nav>
- <ul>
- <li><a href="/">Home</a></li>
- <li><a href="/about/structure.html">Structure</a></li>
- <li><a href="/about/getting_started.html">Getting Started</a></li>
- <li>&nbsp;</li>
- <li><a href="/storage">Storage</a></li>
- <li><a href="/compute">Compute</a></li>
- <li><a href="/dns">DNS</a></li>
- <li><a href="/cdn">CDN</a></li>
- </ul>
- </nav>
-
- <div id="main">
-
- {{ content }}
-
- <h2>About</h2>
- <ul>
- <li><a href="/">Home</a></li>
- <li><a href="/about/contributing.html">Contributing</a></li>
- <li><a href="/about/press.html">Press</a></li>
- <li><a href="/about/supported_services.html">Supported Services</a></li>
- <li><a href="/about/users.html">Users</a></li>
- </ul>
-
- </div>
-
- <footer>
- sponsored by
- <img height="20px" src="/public/images/engineyard.png" title="engineyard" />
- </footer>
- </div> <!-- end of #container -->
-
-
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
- <script>!window.jQuery && document.write(unescape('%3Cscript src="public/js/libs/jquery-1.4.2.js"%3E%3C/script%3E'))</script>
-
-
- <!-- scripts concatenated and minified via ant build script-->
- <script src="public/js/plugins.js"></script>
- <script src="public/js/script.js"></script>
- <!-- end concatenated and minified scripts-->
-
-
- <!--[if lt IE 7 ]>
- <script src="public/js/libs/dd_belatedpng.min.js"></script>
- <script> DD_belatedPNG.fix('img, .png_bg'); </script>
- <![endif]-->
-
- <!-- yui profiler and profileviewer - remove for production -->
- <script src="public/js/profiling/yahoo-profiling.min.js"></script>
- <script src="public/js/profiling/config.js"></script>
- <!-- end profiling code -->
-
-
- <!-- change the UA-XXXXX-X to be your site's ID -->
- <script>
- var _gaq = [['_setAccount', 'UA-301159-7'], ['_trackPageview']];
- (function(d, t) {
- var g = d.createElement(t),
- s = d.getElementsByTagName(t)[0];
- g.async = true;
- g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- s.parentNode.insertBefore(g, s);
- })(document, 'script');
- </script>
-
-</body>
-</html>
View
229 docs/about/contributing.markdown
@@ -1,229 +0,0 @@
----
-layout: default
-title: Contributing
----
-
-First off, high five for coming to visit this page. You are my new hero.
-
-## Overview
-
-* Organize your patches by keeping all related changes together in a topic branch.
-* Rebase your branch against master before submitting a pull request (and squish any 'oops' or work in progress commits).
-* Ensure your changes work with both Ruby 1.8.7 and 1.9! We support both!
-* Submit changes as pull requests describing what the changes should cover and referencing issues (if any).
-* Use 'tags' in your commits to indicate the scope, so things like '\[aws|compute\] fixed something'.
-* Write and run tests. Tests should follow through usage workflows and ought to pass both with mocking on and off.
-
-## Deep dive
-
-Now then, some of the what makes it tick and why. For simplicity let's pretend you want to implement a new service, from scratch. I will walk through the requisite pieces and important things to keep in mind as you go.
-
-But, before I dive too deep, I'll leave you with an out. Other great ways to contribute are fixing bugs, writing documentation or helping port other projects to use fog. That way everybody wins!
-
-## The Service
-
-First and foremost you'll need to create a service, which should start from something like:
-
- module Fog
- class TheService < Fog::Service
-
- requires :necessary_credential
-
- model_path 'path/to/models'
- collection 'name_of_collection'
- model 'name_of_model'
-
- request_path 'path/to/requests'
- request 'name_of_request'
-
- class Mock
- include Collections
- end
-
- class Real
- include Collections
- end
-
- end
- end
-
-### Highlights:
-* we segregate between real and mock so it is easier to add stuff to one or the other later.
-* this is where any shared stuff will go, like making/signing requests
-
-## Requests
-
-The next thing to bite off are the requests. fog is all about making cloud services easier to use and move between, but requests are not where this happens. Requests should map closely to the actual api requests (you should be able to directly reference the api docs and vice versa). In particular, try to keep the output of any data parsing as close to the actual format as possible. This makes implementation and maintenance much easier and provides a solid foundation for models to build nice things on top of. I generally end up working on stuff to get/list details first and then filling in create/destroy pairs and other requests.
-You start with something like this:
-
-<pre>
-module Fog
- class TheService
-
- class Real
-
- def request(*args)
- end
-
- end
-
- class Mock
-
- def request(*args)
- Fog::Mock.not_implemented
- end
-
- end
-
- end
-end
-</pre>
-
-### Highlights:
-* You should define the method twice, once for the real implementation and once for mocked (they should take the same arguments).
-* The mock versions should just start out by raising a not implemented error, you can come back and fill this in later.
-* The real version should make a request, probably by a method defined on the real class in the service you defined earlier.
-* Each request should either return an Excon::Response (with a parsed body where appropriate) or raise an error.
-
-## Tests
-
-Now would be a good time to write some tests to make sure what you have written works (and will continue to). I've tried a couple variations on testing in the past, but have settled on consolidated lifetime testing. These vary enough that its hard to give a single simple example, but you can see many examples in "tests/compute/requests/aws":https://github.com/fog/fog/tree/master/tests/compute/requests/aws/.
-
-### Highlights:
-* Reuse the same objects and take them through their whole life cycle (this is much faster, and most of the time if one portion fails the others would anyway).
-* Test the format of the output to ensure parsers match expectations (check the provider's api docs) and that mocks return matching data.
-* Test common failure cases and their behavior, you'll need to know how the service acts in these cases to make better mocks.
-
-## Models
-
-You could also skip to the mocks here if you wanted, but I usually find the more time I spend working with the service the easier it is to build mocks. The models are the real pay dirt, you have slogged through low level requests that map to the provider api and now you want a nice interface. This is where models and collections come in. Collections provide access to lists of data on the provider and for creating new objects. Models represent the individual objects.
-
-If you know which object you'd like to represent you should start with the collection. When naming, please refer to the names that have been chosen for other services. I haven't standardized all nouns yet, but a few are already shared (Flavor, Image, Server)
-An example servers collection:
-
- require 'fog/collection'
- require 'fog/theservice/models/server'
- module Fog
- class TheService
-
- class Servers < Fog::Collection
-
- model Fog::TheService::Server
-
- def all
- # get list of servers
- load(data) # data is an array of attribute hashes
- end
-
- def get(identity)
- # get server matching id
- new(data) # data is an attribute hash
- rescue Excon::Errors::NotFound
- nil
- end
-
- end
-
- end
- end
-
-### Highlights
-* First make an accessor in the Collections model so it will be included in Real and Mock.
-* `#model` will take a reference to the class that will be instantiated to represent individual objects.
-* `#all` should get a list of servers from the provider and pass an array of attribute hashes, one per server, to load.
-* `#get` should take an identity reference and instantiate a new model object with an attribute hash returned from the remote server, or return nil of no such object exists.
-
-Models handle remapping attributes into friendlier names and providing the rest of the interface.
-An example model:
-
- require 'fog/model'
- module Fog
- module TheService
-
- class Server << Fog::Model
-
- identity :id
-
- attribute :state, 'StatusValue'
-
- def destroy
- requires :identity
- connection.destroy_server(identity)
- true
- end
-
- def ready?
- state == 'running'
- end
-
- def save
- requires ...
- connection.create_server(options)
- true
- end
-
- end
-
- end
- end
-
-### Highlights
-* `#identity` captures the id/name that the objects are identified by and takes the same arguments as attribute.
-* `#attribute` takes the name to make a variable available as and one or more aliases that parsers/requests will return this value as.
-* `#destroy` will require the identity of the model and should destroy it and return true.
-* `#ready?` should return whether the object has finished being initialized (where appropriate).
-* `#save` should take any required objects and instantiate the object on the provider's service.
-* These models just rely on underlying collections and requests, so it should not be necessary at this level to distinguish between Real and Mock methods.
-
-## Mocks
-
-Mocks provide a powerful tool for users of fog to experiment with their implementations much more quickly and without incurring costs. I usually save these for last, as implementing the requests and models provide some necessary context to finally put the mocks together. Your services mock class should have a data method that will return mocked data like so:
-
- module Fog
- module TheService
-
- class Mock
- def self.data
- @data ||= Hash.new do |hash, key|
- hash[key] = {}
- end
- end
- end
-
- end
- end
-
-The keys in this hash should represent a unique identifier of the user accessing the data and the value assigned should contain any default data that a new user might have. Any implemented mock requests should then return data retrieved from here or raise an error.
-For instance:
-
- module Fog
- module TheService
-
- class Mock
-
- def destroy_server(server_identity)
- if data = self.data[:servers].delete(server_identity)
- response = Excon::Response.new
- response.status = 202
- response.body = data
- response
- else
- raise Fog::TheService::NotFound
- end
- end
-
- end
-
- end
- end
-
-### Highlights
-* Mock requests should return the same type of data as an already parsed real response or should return the same error as a real problem.
-* By mocking at this low level, higher level functions are automatically mocked out for you.
-* The extra rigorous tests related to output formatting and error messages should help keep you honest, and each should pass in both mocked and unmocked modes.
-
-## Summary
-
-That provides a lot more detail than you will probably need right away, but hopefully you can refer back to different sections as you need them. If you have any questions send me a github message or email me (address is on my profile). You should always start development by creating your own fork. When you feel confident about your fork, send me a pull request. Be forewarned that I may edit some things before it gets to master, but I'll do my best to take care of this in a timely manner.
-
-Thanks again for your interest and let me know if there is anything else I can do to help.
View
108 docs/about/getting_started.markdown
@@ -1,108 +0,0 @@
----
-layout: default
-title: Getting Started
----
-
-First off, install the gem:
-
- $ gem install fog
-
-## Setting Up Local Storage
-
-We will be using Local storage in the example. Local storage provides the same api that cloud storage services in fog do, but without the bother of needing to signup for stuff or pay extra money.
-
-First, make a local directory to hold your data.
-
- $ mkdir ~/fog
-
-Now we can start writing our script, first off we should require fog.
-
- require 'rubygems'
- require 'fog'
-
-Now in order to play with our data we need to setup a storage connection.
-
- storage = Fog::Storage.new({
- :local_root => '~/fog',
- :provider => 'Local'
- })
-
-`storage` will now contain our storage object, configured to use the Local provider from our specified directory.
-
-## Storing Data
-
-Now that you have cleared the preliminaries you are ready to start storing data. Storage providers in fog segregate files into `directories` to make it easier to organize things. So lets create a directory so we can see that in action.
-
- directory = storage.directories.create(
- :key => 'data'
- )
-
-To make sure it was created you can always check in your filesystem, but we can also check from inside fog.
-
- storage.directories
-
-Progress! Now it is time to actually create a file inside our new directory.
-
- file = directory.files.create(
- :body => 'Hello World!',
- :key => 'hello_world.txt'
- )
-
-We should now have our file, first we can open it up and make sure we are on the right track.
-
- $ open ~/fog/hello_world.txt
-
-It is much more likely that you will want to see what files you have from inside fog though.
-
- directory.files
-
-Now that we have run through all the basics, lets clean up our mess.
-
- file.destroy
- directory.destroy
-
-After that you should be able to check your directory list in fog or your filesystem and see you are safely back to square one.
-
-## Next Steps
-
-Using the same interface you can also practice working against a real provider (such as Amazon S3). Rather than worrying about signing up for an account right away though, we can use mocks to simulate S3 while we practice.
-
-This time we will turn on mocking and then, just like before, we will need to make a connection.
-
- Fog.mock!
- storage = Fog::Storage.new({
- :aws_access_key_id => 'fake_access_key_id',
- :aws_secret_access_key => 'fake_secret_access_key',
- :provider => 'AWS'
- })
-
-You may notice that we used bogus credentials, this is fine since we are just simulating things. To use real S3 you can simply omit Fog.mock! and swap in your real credentials.
-
-If you'd like to turn off mocking after turning it on, you can do it at any time and every subsequent connection will be a real connection.
-
- # Turn on mocking
- Fog.mock!
-
- # Create a mock connection to S3
- storage = Fog::Storage.new({
- :aws_access_key_id => "asdf",
- :aws_secret_access_key => "asdf",
- :provider => "AWS"
- })
-
- # Turn off mocking
- Fog.unmock!
-
- # Create a real connection to S3
- storage = Fog::Storage.new({
- :aws_access_key_id => "asdf",
- :aws_secret_access_key => "asdf",
- :provider => "AWS"
- })
-
-Don't worry about your losing mock data, it stays around until you reset it or until your process exits.
-
- # Reset all mock data
- Fog::Mock.reset
-
-Congratulations and welcome to the cloud! Continue your journey at [fog.io](http://fog.io)
View
52 docs/about/press.markdown
@@ -1,52 +0,0 @@
----
-layout: default
-title: Press
----
-
-Mentions and blog posts from elsewhere in reverse chronological order by day (and alphasorted for same days).
-
-**September 13th, 2011**
-
-* [Libvirt support for fog](http://jedi.be/blog/2011/09/13/libvirt-fog-provider/)
-
-**August 1st, 2011**
-
-* [Using EBS Snapshots with Fog](http://www.mediamolecule.com/lab/article/using_ebs_snapshots_with_fog/)
-
-**June 21st, 2011**
-
-* [Mocking fog When Using It With Carrierwave](http://www.engineyard.com/blog/2011/mocking-fog-when-using-it-with-carrierwave/)
-
-**June 14th, 2011**
-
-* [Backing Up Your Data With Fog](http://larrywright.me/blog/articles/221-backing-up-your-data-with-fog)
-
-**April 7th, 2011**
-
-* [Testing multipart Uploads to S3 with Threads](http://blog.vicecity.co.uk/post/4425574978/multipart-uploads-fog-threads-win)
-
-**March 9th, 2011**
-
-* [Offsite Backups with fog](http://www.engineyard.com/blog/2011/offsite-backups-with-fog/)
-
-**March 2nd, 2011**
-
-* [Better AWS Access Control with IAM and Fog](http://blog.zerosum.org/2011/03/02/better-aws-access-control-with-iam-and-fog.html)
-* [Using Amazon's CloudFormation, cloud-init, chef and fog to automate infrastructure](http://allanfeid.com/content/using-amazons-cloudformation-cloud-init-chef-and-fog-automate-infrastructure)
-
-**January 6th, 2011**
-
-* [Happy New Year (and 0.4.0) from fog!](http://www.engineyard.com/blog/2011/happy-new-year-and-0-4-0-from-fog/)
-
-**November 30th, 2010**
-
-* [Getting Hired: fog Edition](http://www.engineyard.com/blog/2010/getting-hired-fog-edition/)
-
-**October 13, 2010**
-
-* [Engine Yard Announces Formal Support for ‘fog’ to Ensure Application Portability in the Cloud](http://www.engineyard.com/company/press/2010-10-13-engine-yard-announces-formal-support-for-%E2%80%98fog%E2%80%99-to-ensure-application-portability-in-the-cloud)
-* [Wesley Beary and fog Promoted to the Engine Yard Open Source Program](http://www.engineyard.com/blog/2010/wesley-beary-and-fog-promoted-to-the-engine-yard-open-source-program/)
-
-**September 28, 2010**
-
-* [The Curious Tale of the Humble Micro](http://www.engineyard.com/blog/2010/the-curious-tale-of-the-humble-micro/)
View
78 docs/about/structure.markdown
@@ -1,78 +0,0 @@
----
-layout: default
-title: Structure
----
-
-fog is the Ruby cloud computing library, top to bottom:
-
-* Collections provide a simplified interface, making clouds easier to work with and switch between.
-* Requests allow power users to get the most out of the features of each individual cloud.
-* Mocks make testing and integrating a breeze.
-
-## Collections
-
-A high level interface to each cloud is provided through collections, such as `images` and `servers`.
-You can see a list of available collections by calling `collections` on the connection object. You can try it out using the `fog` command:
-
- >> AWS.collections
- [:addresses, :directories, ..., :volumes, :zones]
-
-Some collections are available across multiple providers:
-
-* compute providers have `flavors`, `images` and `servers`
-* dns providers have `zones` and `records`
-* storage providers have `directories` and `files`
-
-Collections share basic CRUD type operations, such as:
-* `all` - fetch every object of that type from the provider.
-* `create` - initialize a new record locally and a remote resource with the provider.
-* `get` - fetch a single object by it's identity from the provider.
-* `new` - initialize a new record locally, but do not create a remote resource with the provider.
-
-As an example, we'll try initializing and persisting a Rackspace Cloud server:
-
- require 'fog'
-
- compute = Fog::Compute.new({
- :provider => 'Rackspace',
- :rackspace_api_key => key,
- :rackspace_username => username
- })
-
- # boot a gentoo server (flavor 1 = 256, image 3 = gentoo 2008.0)
- server = compute.servers.create(:flavor_id => 1, :image_id => 3, :name => 'my_server')
- server.wait_for { ready? } # give server time to boot
-
- # DO STUFF
-
- server.destroy # cleanup after yourself or regret it, trust me
-
-## Models
-
-Many of the collection methods return individual objects, which also provide common methods:
-* `destroy` - will destroy the persisted object from the provider
-* `save` - persist the object to the provider
-* `wait_for` - takes a block and waits for either the block to return true for the object or for a timeout (defaults to 10 minutes)
-
-## Requests
-
-Requests allow you to dive deeper when the models just can't cut it.
-You can see a list of available requests by calling #requests on the connection object.
-
-For instance, ec2 provides methods related to reserved instances that don't have any models (yet). Here is how you can lookup your reserved instances:
-
- $ fog
- >> AWS[:ec2].describe_reserved_instances
- #<Excon::Response [...]>
-
-It will return an [excon](http://github.com/geemus/excon) response, which has `body`, `headers` and `status`. Both return nice hashes.
-
-## Mocks
-
-As you might imagine, testing code using Fog can be slow and expensive, constantly turning on and and shutting down instances.
-Mocking allows skipping this overhead by providing an in memory representation resources as you make requests.
-Enabling mocking easy to use, before you run other commands, simply run:
-
- Fog.mock!
-
-Then proceed as usual, if you run into unimplemented mocks fog will raise an error and as always contributions are welcome!
View
34 docs/about/users.markdown
@@ -1,34 +0,0 @@
----
-layout: default
-title: Users
----
-
-Here lies a listing of projects and products that are using fog.
-
-Please feel free to add your own, just please follow these rules for consistency and readability.
-
-1. Listings should be in alphabetical order and should have a link and list of services used.
-2. Projects that are open source should link to where the source code can be found.
-3. Products that are not open source should link to where more information about the product can be found.
-
-Thanks for following these rules to keep the quality high and and the content useful!
-
-## Projects
-
-* [carrierwave](http://github.com/jnicklas/carrierwave) = AWS => Storage
-* [chef](http://github.com/opscode/chef) = AWS => Compute, Slicehost => Compute, Terremark => vCloud, Rackspace => Compute
-* [deckard](http://github.com/joewilliams/deckard) = AWS => Compute
-* [gaff](http://github.com/joewilliams/gaff) = AWS => Compute, Slicehost => Compute
-* [gemcutter](http://github.com/rubygems/gemcutter) = AWS => Storage
-* [plover](http://github.com/railsmachine/plover) = AWS => Compute
-
-## Products
-
-* [DevStructure](http://devstructure.com/) = AWS => Compute, Rackspace => Compute, Slicehost => Compute
-* [Engine Yard AppCloud](http://www.engineyard.com/cloud) = AWS => \[Compute, Storage\]
-* [iSwifter](http://iswifter.youwebinc.com/) = BlueBox => Compute
-* [OpenFeint](http://openfeint.com) = BlueBox => Compute
-* [PeopleAdmin](http://www.peopleadmin.com) = AWS => [Compute, Storage]
-* [PHPFog](https://phpfog.com) = AWS => Compute
-* [RowFeeder](https://rowfeeder.com) = Blue Box Group => Compute
-* [Viximo](http://viximo.com) = AWS => Compute
View
148 docs/cdn/index.markdown
@@ -1,148 +0,0 @@
----
-layout: default
-title: CDN
----
-
-Faster websites are better. <a href="http://www.websiteoptimization.com/speed/tweak/design-factors/">Better experience</a>, <a href="http://exp-platform.com/Documents/IEEEComputer2007OnlineExperiments.pdf">better sales</a>, <a href="http://www.stevesouders.com/blog/2009/07/27/wikia-fast-pages-retain-users/">you name it</a>. Unfortunately, making a website faster can be tough. Thankfully a content distribution network, or CDN, can give you great performance bang for your buck. A CDN helps speed things up by putting copies of your files closer to your users. It's like the difference between pizza delivery from across the street and pizza delivery from the next town over.
-
-The ease and deliciousness are the good news, but until recently CDN's were only available in the big leagues via 'my business guys will talk to your business guys' deals. Fortunately for us, Amazon recently updated <a href="http://aws.amazon.com/cloudfront/">CloudFront</a>, their CDN service, to allow us to get these benefits with just a credit card and an API call. So now we'll see how you can spend a few minutes to save your users countless hours of load time.
-
-## Preliminaries
-
-First, make sure you have fog installed:
-
- gem install fog
-
-Now you'll need to <a href="https://aws-portal.amazon.com/gp/aws/developer/subscription/index.html?productCode=AmazonCloudFront">sign up for Cloudfront</a>. Gather up the credentials your new credentials to initialize a connection to the service:
-
- require 'fog'
-
- # create a connection to the service
- cdn = Fog::CDN.new({
- :provider => 'AWS',
- :aws_access_key_id => YOUR_AWS_ACCESS_KEY_ID,
- :aws_secret_access_key => YOUR_AWS_SECRET_ACCESS_KEY
- }
-
-## Setting Up Your CDN
-
-Now you'll need to create a 'distribution' which represents a mapping from the CDN to your domain. For the examples we'll pretend we are working on 'http://www.example.com', but you can just switch it to your actual domain. Some <a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/CreateDistribution.html">other options</a> are available, but the only other one we need to fill in is OriginProtocolPolicy. This sets what to do about http vs https. We will use 'match-viewer' which returns the same protocol as the request, but you can also choose 'http-only' which always returns http responses.
-
- data = cdn.post_distribution({
- 'CustomOrigin' => {
- 'DNSName' => 'www.example.com',
- 'OriginProtocolPolicy' => 'match-viewer'
- }
- })
-
- # parse the response for stuff you'll need later
- distribution_id = data.body['Id']
- caller_reference = data.body['DistributionConfig']['CallerReference']
- etag = data.headers['ETag']
- cdn_domain_name = data.body['DomainName']
-
- # wait for the updates to propogate
- Fog.wait_for {
- cdn.get_distribution(distribution_id).body['Status'] == 'Deployed'
- }
-
-Fog also supports models for the AWS CDN. The above code can also be written like this:
-
- distribution = cdn.distributions.create( :custom_origin => {
- 'DNSName' => 'www.example.com',
- 'OriginProtocolPolicy' => 'match-viewer'
- }, :enabled => true
- })
-
- distribution.wait_for { ready? }
-
-Like other collections supported by Fog, it is also possible to browse the list of distributions:
-
- cdn.distributions.all
-
-Or get access to a distinct distribution by its identity:
-
- cdn.distributions.get(distribution_id)
-
-
-## Getting Served
-
-With the domain name from the distribution in hand you should now be ready to serve content from the edge. All you need to do is start replacing urls like `http://www.example.com/stylesheets/foo.css` with `#{cdn_domain_name}/stylesheets/foo.css`. Just because you can do something doesn't always mean you should though. Dynamic pages are not really well suited to CDN storage, since CDN content will be the same for every user. Fortunately some of your most used content is a great fit. By just switching over your images, javascripts and stylesheets you can have an impact for each and every one of your users.
-
-Congrats, your site is faster! By default the urls aren't very pretty, something like `http://d1xdx2sah5udd0.cloudfront.net/stylesheets/foo.css`. Thankfully you can use CNAME config options to utilize something like `http://assets.example.com/stylesheets/foo.css`, if you are interested in learning more about this let me know in the comments.
-
-## Invalidating the CDN caches
-
-Sometimes, some part of the CDN cache needs to be invalidated because the origin changed and we need a faster propagation than waiting for the objects to expire by themselves. To do this, CloudFront supports creating <a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/Actions_Invalidations.html">distributions invalidation</a>.
-
-An invalidation can be created with the following code:
-
- # let's invalidate /test.html and /path/to/file.html
- data = cdn.post_invalidation(distribution_id, [ "/test.html", "/path/to/file.html" ])
- invalidation_id = data.body['Id']
-
- Fog.wait_for { cdn.get_invalidation(distribution_id, invalidation_id).body['Status'] == 'Completed' }
-
-It is also possible to list past and current invalidation for a given distribution:
-
- cdn.get_invalidation_list(distribution_id)
-
-The same can be written with Fog CDN model abstraction:
-
- distribution = cdn.distributions.get(distribution_id)
-
- invalidation = distribution.invalidations.create(:paths => [ "/test.html", "/path/to/file.html" ])
- invalidation.wait_for { ready? }
-
-Listing invalidations is as simple as:
-
- distribution.invalidations.all
-
- # this returns only summarized invalidation
- # to get access to the invalidations path:
- distribution.invalidations.get(invalidation_id)
-
-
-## Cleaning Up
-
-But, just in case you need to update things I'll run through how you can make changes. In my case I just want to clean up after myself, so I'll use the distribution_id and ETag from before to disable the distribution. We need to use the ETag as well because it provides a way to refer to different versions of the same distribution and ensures we are updating the version that we think we are.
-
- data = cdn.put_distribution_config(
- distribution_id,
- etag,
- {
- 'CustomOrigin' => {
- 'DNSName' => 'www.example.com',
- 'OriginProtocolPolicy' => 'match-viewer'
- },
- 'CallerReference' => caller_reference,
- 'Enabled' => 'false'
- }
- )
-
- # parse the updated etag
- etag = data.headers['ETag']
-
-Now you just need to wait for the update to happen like before and once its disabled we can delete it:
-
- Fog.wait_for {
- cdn.get_distribution(distribution_id).body['Status'] == 'Deployed'
- }
- cdn.delete_distribution(distribution_id, etag)
-
-This can also be written with CDN models as:
-
- distribution = cdn.distributions.get(distribution_id)
-
- # make sure the distribution is deployed otherwise it can't be disabled
- distribution.wait_for { ready? }
-
- distribution.disable
-
- # Disabling a distribution is a lengthy operation
- distribution.wait_for { ready? }
-
- # and finally let's get rid of it
- distribution.destroy
-
-Thats it, now go forth and speed up some load times!
View
122 docs/compute/index.markdown
@@ -1,122 +0,0 @@
----
-layout: default
-title: Compute
----
-
-Compute is the lifeblood of the cloud, but with great power comes great complication. Compute opens up huge swaths of potential, but it varies greatly in both capabilities and usage from provider to provider. Thankfully fog helps to abstract these idiosyncrasies to provide a more seamless experience.
-
-## Installing fog
-
-fog is distributed as a RubyGem:
-
- gem install fog
-
-Or for bundler users, you can add it in your Gemfile:
-
- gem "fog"
-
-## Using Amazon EC2 and fog
-
-Sign up for an account <a href="http://aws-portal.amazon.com/gp/aws/developer/subscription/index.html?productCode=AmazonEC2">here</a> and copy down your secret access key and access key id from <a href="http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key">here</a>. We are about to get into the code samples, so be sure to fill in anything in ALL_CAPS with your own values!
-
-First, create a connection with your new account:
-
- require 'rubygems'
- require 'fog'
-
- # create a connection
- connection = Fog::Compute.new({
- :provider => 'AWS',
- :aws_access_key_id => YOUR_AWS_ACCESS_KEY_ID,
- :aws_secret_access_key => YOUR_AWS_SECRET_ACCESS_KEY
- })
-
-With that in hand we are ready to start making EC2 calls!
-
-## Servers the EC2 way
-
-Creating a server on EC2 is very easy if you are willing to accept the defaults (the smallest server size, using Ubuntu 10.04 LTS). NOTE: the default EC2 image uses the 'ubuntu' username, rather than 'root' like other services.
-
- server = connection.servers.create
-
-You can then list your servers to see that it now appears:
-
- connection.servers
-
-Rather than worrying about the whole list, we can also just get the latest data for just our server:
-
- server.reload
-
-That can get tedious quickly however, especially when servers can take several minutes to boot. Fog has `wait_for` for cases like this and `ready?` for checking to see when a server has completed its start up.
-
- server.wait_for { ready? }
-
-Once we are done with that we can shut it down.
-
- server.destroy
-
-## Bootstrap: Servers the fog Way
-
-Cycling servers is great, but in order to actually ssh in we need to setup ssh keys and open ports. But rather than worrying about the nitty gritty, we will utilize `bootstrap`. NOTE: normally we could leave out username and use the default (root), but the default Ubuntu from Canonical uses the ubuntu username instead.
-
- server = connection.servers.bootstrap(:private_key_path => '~/.ssh/id_rsa', :public_key_path => '~/.ssh/id_rsa.pub', :username => 'ubuntu')
-
-Bootstrap will create the server, but it will also make sure that port 22 is open for traffic and has ssh keys setup. The ssh key pair you specified will be registered under the name "fog\_default" unless you've set `Fog.credential` to a custom string value. In order to hook everything up `bootstrap` will need the server to be running, so by the time it finishes it will be ready. You can then make commands to it directly:
-
- server.ssh('pwd')
- server.ssh(['pwd', 'whoami'])
-
-These return an array of results, where each has stdout, stderr and status values so you can check out what your commands accomplished. Now just shut it down to make sure you don't continue getting charged.
-
- server.destroy
-
-
-### Managing multiple ssh key pairs on EC2
-
-The key pair you've specified, will be registered as "fog\_default" after running `bootstrap` for the first time. If you want to use multiple key pairs with the same AWS credentials, you need to set `Fog.credential` to register your other key pairs under different names. Your additional key pair will then be registered as "fog\_#{Fog.credential}":
-
- Fog.credential = 'my_custom_key'
- connection.servers.bootstrap(:private_key_path => '~/.ssh/my_custom_key', :public_key_path => '~/.ssh/my_custom_key.pub')
-
-If you've already registered a custom key pair e.g. using `connection.create_key_pair` or `connection.import_key_pair`, you can set your key paths using `Fog.credentials` and pass in the name of this key so `bootstrap` will use it instead of "fog\_default":
-
- Fog.credentials = Fog.credentials.merge({ :private_key_path => "~/.ssh/my_custom_key", :public_key_path => "~/.ssh/my_custom_key.pub" })
- connection.import_key_pair('my_custom_key', IO.read('~/.ssh/my_custom_key.pub')) if connection.key_pairs.get('my_custom_key').nil?
- server = connection.servers.bootstrap(:key_name => 'my_custom_key')
-
-## Rackspace Cloud Servers
-
-Rackspace has <a href="http://www.rackspacecloud.com/cloud_hosting_products/servers">Cloud Servers</a> and you can sign up <a href="https://www.rackspacecloud.com/signup">here</a> and get your credentials <a href="https://manage.rackspacecloud.com/APIAccess.do">here</a>.
-
- # create a connection
- connection = Fog::Compute.new({
- :provider => 'Rackspace',
- :rackspace_username => RACKSPACE_USERNAME,
- :rackspace_api_key => RACKSPACE_API_KEY
- })
-
-If you work with the European cloud from Rackspace you have to add the following:
-
- :rackspace_auth_url => "lon.auth.api.rackspacecloud.com"
-
-We will skip over learning how to do this the 'Rackspace Way' and instead jump right to using bootstrap to get their smallest Ubuntu 10.04 LTS server.
-
- server = connection.servers.bootstrap
-
-You can run all the same ssh commands and do what you need to, then once again shutdown to ensure you are not charged once you are done.
-
- server.destroy
-
-## Mocking out Compute
-
-You can also start any of these scripts with `Fog.mock!` or start the fog interactive tool from the command line with `FOG_MOCK=true fog` to run in mock mode. In this mode commands are run as local simulation, so no cloud resources are ever consumed and things operate much faster.
-
-## Cleaning up
-
-To cover your tracks its a good idea to check for running servers and shut them down, here is one way you might do that.
-
- connection.servers.select {|server| server.ready? && server.destroy}
-
-## Summary
-
-Compute can be tricky, but the abstractions in fog make it much easier to get started. With your servers up and running you can then focus on the task at hand and get some work done. Congratulations on adding a new tool to your arsenal and let us know what we can do better.
View
79 docs/dns/index.markdown
@@ -1,79 +0,0 @@
----
-layout: default
-title: DNS
----
-
-The power and flexibility of the cloud are amazing. But sometimes it can be a pain to chase your resources around and keep everything up to date. This is especially true of keeping track of addresses for DNS, but thankfully more and more API driven options are available, allowing you to automate your DNS to keep up with your hardware changes.
-
-## Setup
-
-First, make sure you have fog installed:
-
- gem install fog
-
-For this first example we will use Zerigo (see below for how to use other providers). You can signup for Zerigo DNS <a href="https://www.zerigo.com/signup/dns">here</a>. Gather up your new credentials to initialize a connection to the service:
-
- require 'rubygems'
- require 'fog'
-
- # create a connection to the service
- dns = Fog::DNS.new({
- :provider => 'Zerigo',
- :zerigo_email => ZERIGO_EMAIL,
- :zerigo_token => ZERIGO_TOKEN
- })
-
-## Getting in the Zone
-
-The first thing you need to do to prepare for your DNS excursion is create a zone for your domain. The zone will contain all of the more specific records that you will create later. You will just need to specify the domain, which should be your url without the 'http' or 'www' parts, and an email address. Then you can create the zone with your DNS connection:<!--more-->
-
- zone = @dns.zones.create(
- :domain => 'example.com',
- :email => 'admin@example.com'
- )
-
-Now that you have a zone you will need to update your registrar to let them know what DNS servers are responsible for your domain. You can ask the zone what values to use:
-
- zone.nameservers
-
-## Spinning Records
-
-With your new zone in hand you can add records as needed. First and foremost you will probably want the 'www' version of your site to point to whatever your ip might be:
-
- record = @zone.records.create(
- :value => '1.2.3.4',
- :name => 'example.com',
- :type => 'A'
- )
-
-Adding other records is similarly easy, for instance if we want 'www.example.com' to go to the same place, we can use a cname record:
-
- record = @zone.records.create(
- :value => 'example.com',
- :name => 'www',
- :type => 'CNAME'
- )
-
-Or, similarly you might want to have your blog elsewhere:
-
- record = @zone.records.create(
- :value => '4.3.2.1',
- :name => 'blog.example.com',
- :type => 'A'
- )
-
-You can add more specifics if you need to, but reasonable defaults make it just that easy. You can also add any other kind of DNS record you might need for mail or other purposes, you can find a nice overview of record options and types <a href="http://en.wikipedia.org/wiki/Domain_Name_System#DNS_resource_records">on Wikipedia</a>.
-
-## No Zerigo? No Problem
-
-If you already have an account with another service you can just as easily use this same code with different credentials. fog currently supports <a href="http://aws.amazon.com/route53/">AWS Route 53</a>, <a href="http://bluebox.net">Blue Box</a>, <a href="http://dnsimple.com">DNSimple</a>, <a href="http://www.linode.com">Linode</a>, <a href="http://www.rackspace.com">Rackspace</a>, <a href="http://www.slicehost.com">Slicehost</a> and <a href="http://www.zerigo.com/managed-dns">Zerigo</a>; so you can have your pick. As an example you can connect to AWS instead of Zerigo:
-
- dns = Fog::DNS.new({
- :provider => 'AWS',
- :aws_access_key_id => YOUR_AWS_ACCESS_KEY_ID,
- :aws_secret_access_key => YOUR_AWS_SECRET_ACCESS_KEY
- })
-
-## Go Forth and Resolve
-
-Using this makes it easier to give yourself shortcuts to your cloud servers and manage how clients and users access them as well. It is great to have this flexibility so that you can modify your cloud infrastructure as needed while keeping everything ship shape. It also provides a nice way to create custom subdomains for users and just generally round out your cloud solution.
View
93 docs/index.markdown
@@ -1,93 +0,0 @@
----
-layout: default
-title: The Ruby cloud services library
----
-
-Whether you need compute, dns, storage, or a multitude of other services, fog provides an accessible entry point and facilitates cross service compatibility.
-
-Just getting started working with cloud resources? You are not alone, and having so many complicated options makes it hard to know where to start. fog delivers the knowledge of cloud experts to you, helping you to bootstrap your cloud usage and guiding you as your own expertise develops.
-
-By coding with fog from the start you avoid vendor lock-in and give yourself more flexibility to provide value. Whether you are writing a library, designing a software as a service product or just hacking on the weekend this flexibility is a huge boon.
-
-With a rapidly expanding community and codebase the advantages of fog just keep coming. Join us and together we will realize the future of cloud computing.
-
-## Getting Started
-
- sudo gem install fog
-
-Now type 'fog' to try stuff, confident that fog will let you know what to do. Here is an example of wading through server creation for Amazon Elastic Compute Cloud:
-
- >> server = Compute[:aws].servers.create
- ArgumentError: image_id is required for this operation
-
- >> server = Compute[:aws].servers.create(:image_id => 'ami-5ee70037')
- <Fog::AWS::EC2::Server [...]>
-
- >> server.destroy # cleanup after yourself or regret it, trust me
- true
-
-## Go forth and conquer
-
-Play around and use the console to explore or check out the [getting started guide](/about/getting_started.html) for more details. Once you are reading to start scripting fog, here is a quick hint on how to make connections without the command line thing to help you.
-
- # create a compute connection
- compute = Fog::Compute.new({:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY})
- # compute operations go here
-
- # create a storage connection
- storage = Fog::Storage.new({:provider => 'AWS', :aws_access_key_id => ACCESS_KEY_ID, :aws_secret_access_key => SECRET_ACCESS_KEY})
- # storage operations go here
-
-geemus says: "That should give you everything you need to get started, but let me know if there is anything I can do to help!"
-
-## Contributing
-
-* Find something you would like to work on.
- * Look for anything you can help with in the [issue tracker](https://github.com/fog/fog/issues).
- * Look at the [code quality metrics](https://codeclimate.com/github/fog/fog) for anything you can help clean up.
- * Or anything else!
-* Fork the project and do your work in a topic branch.
- * Make sure your changes will work on both Ruby 1.8.7 and Ruby 1.9.
-* Add a config at `tests/.fog` for the component you want to test.
-* Add shindo tests to prove your code works and run all the tests using `bundle exec rake`.
-* Rebase your branch against `fog/fog` to make sure everything is up to date.
-* Commit your changes and send a pull request.
-
-## Resources
-
-Enjoy, and let me know what I can do to continue improving fog!
-
-* Work through the [fog tutorial](https://github.com/downloads/geemus/learn_fog/learn_fog.tar.gz)
-* Read fog's API documentation [master branch](http://rubydoc.info/github/fog/fog) or [latest gem release](http://rubydoc.info/gems/fog)
-* Stay up to date by following [@fog](http://twitter.com/fog) and/or [@geemus](http://twitter.com/geemus) on Twitter.
-* Get and give help on the [#ruby-fog](irc://irc.freenode.net/ruby-fog) irc channel on Freenode
-* Follow release notes and discussions on the [mailing list](http://groups.google.com/group/ruby-fog)
-* Report bugs or find tasks to help with in the [issues](http://github.com/fog/fog/issues)
-* Learn about [contributing](/about/contributing.html)
-* See where fog is used and let the world know how you use it [in the wild](/about/users.html)
-* Check out blog posts and other mentions in the [press](/about/press.html)
-
-## Copyright
-
-(The MIT License)
-
-Copyright (c) 2012 [geemus (Wesley Beary)](http://github.com/geemus)
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
25 docs/public/crossdomain.xml
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
-<cross-domain-policy>
-
-
-<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
-
-<!-- Most restrictive policy: -->
- <site-control permitted-cross-domain-policies="none"/>
-
-
-
-<!-- Least restrictive policy: -->
-<!--
- <site-control permitted-cross-domain-policies="all"/>
- <allow-access-from domain="*" to-ports="*" secure="false"/>
- <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
--->
-<!--
- If you host a crossdomain.xml file with allow-access-from domain=“*”
- and don’t understand all of the points described here, you probably
- have a nasty security vulnerability. ~ simon willison
--->
-
-</cross-domain-policy>
View
142 docs/public/css/fog.css
@@ -1,142 +0,0 @@
-/* layout */
-body {
- background-color: #EBF2F9;
- line-height: 1.5em;
- text-align: center;
-}
-
-#container {
- margin: auto;
- text-align: left;
- width: 800px;
-}
-
-header {
- background-color: #A0C0E1;
- border-color: #70A1D2;
- -moz-border-radius: 0 0 0.5em 0.5em;
- border-radius: 0 0 0.5em 0.5em;
- border-style: solid;
- border-width: 0 1px 1px 1px;
- color: #FFF;
- height: 154px;
- margin-bottom: 2em;
- position: relative;
- text-align: center;
-}
-
-header a, header a:active, header a:visited {
- color: #FFF;
-}
-
-header img {
- position: absolute;
- left: 0;
- top: 0;
-}
-
-header h1 {
- font-size: 2em;
- line-height: 154px;
-}
-
-header dl {
- background-color: #70A1D2;
- border-color: #70A1D2;
- -moz-border-radius: 0 0 0.5em 0.5em;
- border-radius: 0 0 0.5em 0.5em;
- height: 140px; /* 154 - padding-top */
- position: absolute;
- padding: 14px 1.5em 0 1.5em;
- right: 0;
- top: 0;
-}
-
-header dl dt {
- font-weight: bold;
-}
-
-nav, #main {
- background-color: #FFF;
- -moz-border-radius: 0.5em;
- border-radius: 0.5em;
- color: #666;
- border: 1px solid #70A1D2;
- padding: 0 1em;
- margin-bottom: 2em;
-}
-
-nav {
- padding: 1em;
-}
-
-nav li {
- display: inline;
- padding-left: 2em;
-}
-
-nav li a {
- font-size: 1.5em;
-}
-
-footer {
- background-color: #A0C0E1;
- border-color: #70A1D2;
- -moz-border-radius: 0.5em 0.5em 0 0;
- border-radius: 0.5em 0.5em 0 0;
- border-style: solid;
- border-width: 1px 1px 0 1px;
- color: #FFF;
- text-align: center;
-}
-
-footer img {
- padding: 5px;
- vertical-align: middle;
-}
-
-/* misc */
-
-h2 {
- border-bottom: 2px solid #A0C0E1;
- color: #70A1D2;
- font-size: 1.5em;
- margin-top: 1.33333333333333em;
- padding: 0 0.75em 0.75em 0;
-}
-
-code, pre {
- background-color: #EBF2F9;
- border: 1px solid #70A1D2;
- color: #666;
-}
-
-code {
- padding: 0 0.2em;
-}
-
-p, ul {
- margin-bottom: 1em;
- margin-top: 1em;
-}
-
-pre {
- -moz-border-radius: 0.5em;
- border-radius: 0.5em;
- margin: 1em;
- white-space: pre;
-}
-
-pre code {
- border: none;
-}
-
-@media all and (orientation:portrait) {
-}
-
-@media all and (orientation:landscape) {
-}
-
-@media screen and (max-device-width: 480px) {
- /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
-}
View
8 docs/public/css/handheld.css
@@ -1,8 +0,0 @@
-* {
- float: none;
- background: #fff;
- color: #000;
-}
-
-
-body { font-size: 80%; }
View
129 docs/public/css/style.css
@@ -1,129 +0,0 @@
-/* HTML5 ✰ Boilerplate */
-
-html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
-small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, figcaption, figure, footer, header, hgroup,
-menu, nav, section, summary, time, mark, audio, video {
- margin:0;
- padding:0;
- border:0;
- outline:0;
- font-size:100%;
- vertical-align:baseline;
- background:transparent;
-}
-article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
- display:block;
-}
-nav ul { list-style:none; }
-blockquote, q { quotes:none; }
-blockquote:before, blockquote:after,
-q:before, q:after { content:''; content:none; }
-a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; }
-ins { background-color:#ff9; color:#000; text-decoration:none; }
-mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; }
-del { text-decoration: line-through; }
-abbr[title], dfn[title] { border-bottom:1px dotted; cursor:help; }
-table { border-collapse:collapse; border-spacing:0; }
-hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; }
-input, select { vertical-align:middle; }
-
-
-body { font:13px/1.231 sans-serif; *font-size:small; }
-select, input, textarea, button { font:99% sans-serif; }
-pre, code, kbd, samp { font-family: monospace, sans-serif; }
-
-body, select, input, textarea { color: #444; }
-h1,h2,h3,h4,h5,h6 { font-weight: bold; }
-html { overflow-y: scroll; }
-
-a:hover, a:active { outline: none; }
-a, a:active, a:visited { color: #607890; }
-a:hover { color: #036; }
-
-ul, ol { margin-left: 1.8em; }
-ol { list-style-type: decimal; }
-
-nav ul, nav li { margin: 0; }
-small { font-size: 85%; }
-strong, th { font-weight: bold; }
-td, td img { vertical-align: top; }
-sub { vertical-align: sub; font-size: smaller; }
-sup { vertical-align: super; font-size: smaller; }
-pre { padding: 15px; white-space: pre; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; }
-textarea { overflow: auto; }
-.ie6 legend, .ie7 legend { margin-left: -7px; }
-input[type="radio"] { vertical-align: text-bottom; }
-input[type="checkbox"] { vertical-align: bottom; }
-.ie7 input[type="checkbox"] { vertical-align: baseline; }
-.ie6 input { vertical-align: text-bottom; }
-label, input[type=button], input[type=submit], button { cursor: pointer; }
-button, input, select, textarea { margin: 0; }
-input:valid, textarea:valid { }
-input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
-.no-boxshadow input:invalid,
-.no-boxshadow textarea:invalid { background-color: #f0dddd; }
-
-::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
-::selection { background:#FF5E99; color:#fff; text-shadow: none; }
-a:link { -webkit-tap-highlight-color: #FF5E99; }
-
-button { width: auto; overflow: visible; }
-.ie7 img { -ms-interpolation-mode: bicubic; }
-
-.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
-.hidden { display: none; visibility: hidden; }
-.visuallyhidden { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px); }
-.invisible { visibility: hidden; }
-.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; visibility: hidden; }
-.clearfix:after { clear: both; }
-.clearfix { zoom: 1; }
-
-
- /* Primary Styles
- Author:
- */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-@media all and (orientation:portrait) {
-
-}
-
-@media all and (orientation:landscape) {
-
-}
-
-@media screen and (max-device-width: 480px) {
-
-
- /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
-}
-
-@media print {
- * { background: transparent !important; color: #444 !important; text-shadow: none !important; }
- a, a:visited { color: #444 !important; text-decoration: underline; }
- a:after { content: " (" attr(href) ")"; }
- abbr:after { content: " (" attr(title) ")"; }
- .ir a:after { content: ""; }
- pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
- thead { display: table-header-group; }
- tr, img { page-break-inside: avoid; }
- @page { margin: 0.5cm; }
- p, h2, h3 { orphans: 3; widows: 3; }
- h2, h3{ page-break-after: avoid; }
-}
-
View
3 docs/public/images/.gitignore
@@ -1,3 +0,0 @@
-*
-!.gitignore
-
View
BIN docs/public/images/engineyard.png
Deleted file not rendered
View
BIN docs/public/images/fog.png
Deleted file not rendered
View
289 docs/public/js/libs/dd_belatedpng.js
@@ -1,289 +0,0 @@
-/**
-* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
-* Author: Drew Diller
-* Email: drew.diller@gmail.com
-* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
-* Version: 0.0.8a
-* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
-*
-* Example usage:
-* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
-* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
-**/
-
-/*
-PLEASE READ:
-Absolutely everything in this script is SILLY. I know this. IE's rendering of certain pixels doesn't make sense, so neither does this code!
-*/
-
-var DD_belatedPNG = {
- ns: 'DD_belatedPNG',
- imgSize: {},
- delay: 10,
- nodesFixed: 0,
- createVmlNameSpace: function () { /* enable VML */
- if (document.namespaces && !document.namespaces[this.ns]) {
- document.namespaces.add(this.ns, 'urn:schemas-microsoft-com:vml');
- }
- },
- createVmlStyleSheet: function () { /* style VML, enable behaviors */
- /*
- Just in case lots of other developers have added
- lots of other stylesheets using document.createStyleSheet
- and hit the 31-limit mark, let's not use that method!
- further reading: http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx
- */
- var screenStyleSheet, printStyleSheet;
- screenStyleSheet = document.createElement('style');
- screenStyleSheet.setAttribute('media', 'screen');
- document.documentElement.firstChild.insertBefore(screenStyleSheet, document.documentElement.firstChild.firstChild);
- if (screenStyleSheet.styleSheet) {
- screenStyleSheet = screenStyleSheet.styleSheet;
- screenStyleSheet.addRule(this.ns + '\\:*', '{behavior:url(#default#VML)}');
- screenStyleSheet.addRule(this.ns + '\\:shape', 'position:absolute;');
- screenStyleSheet.addRule('img.' + this.ns + '_sizeFinder', 'behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;'); /* large negative top value for avoiding vertical scrollbars for large images, suggested by James O'Brien, http://www.thanatopsic.org/hendrik/ */
- this.screenStyleSheet = screenStyleSheet;
-
- /* Add a print-media stylesheet, for preventing VML artifacts from showing up in print (including preview). */
- /* Thanks to Rémi Prévost for automating this! */
- printStyleSheet = document.createElement('style');
- printStyleSheet.setAttribute('media', 'print');
- document.documentElement.firstChild.insertBefore(printStyleSheet, document.documentElement.firstChild.firstChild);
- printStyleSheet = printStyleSheet.styleSheet;
- printStyleSheet.addRule(this.ns + '\\:*', '{display: none !important;}');
- printStyleSheet.addRule('img.' + this.ns + '_sizeFinder', '{display: none !important;}');
- }
- },
- readPropertyChange: function () {
- var el, display, v;
- el = event.srcElement;
- if (!el.vmlInitiated) {
- return;
- }
- if (event.propertyName.search('background') != -1 || event.propertyName.search('border') != -1) {
- DD_belatedPNG.applyVML(el);
- }
- if (event.propertyName == 'style.display') {
- display = (el.currentStyle.display == 'none') ? 'none' : 'block';
- for (v in el.vml) {
- if (el.vml.hasOwnProperty(v)) {
- el.vml[v].shape.style.display = display;
- }
- }
- }
- if (event.propertyName.search('filter') != -1) {
- DD_belatedPNG.vmlOpacity(el);
- }
- },
- vmlOpacity: function (el) {
- if (el.currentStyle.filter.search('lpha') != -1) {
- var trans = el.currentStyle.filter;
- trans = parseInt(trans.substring(trans.lastIndexOf('=')+1, trans.lastIndexOf(')')), 10)/100;
- el.vml.color.shape.style.filter = el.currentStyle.filter; /* complete guesswork */
- el.vml.image.fill.opacity = trans; /* complete guesswork */
- }
- },
- handlePseudoHover: function (el) {
- setTimeout(function () { /* wouldn't work as intended without setTimeout */
- DD_belatedPNG.applyVML(el);
- }, 1);
- },
- /**
- * This is the method to use in a document.
- * @param {String} selector - REQUIRED - a CSS selector, such as '#doc .container'
- **/
- fix: function (selector) {
- if (this.screenStyleSheet) {
- var selectors, i;
- selectors = selector.split(','); /* multiple selectors supported, no need for multiple calls to this anymore */
- for (i=0; i<selectors.length; i++) {
- this.screenStyleSheet.addRule(selectors[i], 'behavior:expression(DD_belatedPNG.fixPng(this))'); /* seems to execute the function without adding it to the stylesheet - interesting... */
- }
- }
- },
- applyVML: function (el) {
- el.runtimeStyle.cssText = '';
- this.vmlFill(el);
- this.vmlOffsets(el);
- this.vmlOpacity(el);
- if (el.isImg) {
- this.copyImageBorders(el);
- }
- },
- attachHandlers: function (el) {
- var self, handlers, handler, moreForAs, a, h;
- self = this;
- handlers = {resize: 'vmlOffsets', move: 'vmlOffsets'};
- if (el.nodeName == 'A') {
- moreForAs = {mouseleave: 'handlePseudoHover', mouseenter: 'handlePseudoHover', focus: 'handlePseudoHover', blur: 'handlePseudoHover'};
- for (a in moreForAs) {
- if (moreForAs.hasOwnProperty(a)) {
- handlers[a] = moreForAs[a];
- }
- }
- }
- for (h in handlers) {
- if (handlers.hasOwnProperty(h)) {
- handler = function () {
- self[handlers[h]](el);
- };
- el.attachEvent('on' + h, handler);
- }
- }
- el.attachEvent('onpropertychange', this.readPropertyChange);
- },
- giveLayout: function (el) {
- el.style.zoom = 1;
- if (el.currentStyle.position == 'static') {
- el.style.position = 'relative';
- }
- },
- copyImageBorders: function (el) {
- var styles, s;
- styles = {'borderStyle':true, 'borderWidth':true, 'borderColor':true};
- for (s in styles) {
- if (styles.hasOwnProperty(s)) {
- el.vml.color.shape.style[s] = el.currentStyle[s];
- }
- }
- },
- vmlFill: function (el) {
- if (!el.currentStyle) {
- return;
- } else {
- var elStyle, noImg, lib, v, img, imgLoaded;
- elStyle = el.currentStyle;
- }
- for (v in el.vml) {
- if (el.vml.hasOwnProperty(v)) {
- el.vml[v].shape.style.zIndex = elStyle.zIndex;
- }
- }
- el.runtimeStyle.backgroundColor = '';
- el.runtimeStyle.backgroundImage = '';
- noImg = true;
- if (elStyle.backgroundImage != 'none' || el.isImg) {
- if (!el.isImg) {
- el.vmlBg = elStyle.backgroundImage;
- el.vmlBg = el.vmlBg.substr(5, el.vmlBg.lastIndexOf('")')-5);
- }
- else {
- el.vmlBg = el.src;
- }
- lib = this;
- if (!lib.imgSize[el.vmlBg]) { /* determine size of loaded image */
- img = document.createElement('img');
- lib.imgSize[el.vmlBg] = img;
- img.className = lib.ns + '_sizeFinder';
- img.runtimeStyle.cssText = 'behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;'; /* make sure to set behavior to none to prevent accidental matching of the helper elements! */
- imgLoaded = function () {
- this.width = this.offsetWidth; /* weird cache-busting requirement! */
- this.height = this.offsetHeight;
- lib.vmlOffsets(el);
- };
- img.attachEvent('onload', imgLoaded);
- img.src = el.vmlBg;
- img.removeAttribute('width');
- img.removeAttribute('height');
- document.body.insertBefore(img, document.body.firstChild);
- }
- el.vml.image.fill.src = el.vmlBg;
- noImg = false;
- }
- el.vml.image.fill.on = !noImg;
- el.vml.image.fill.color = 'none';
- el.vml.color.shape.style.backgroundColor = elStyle.backgroundColor;
- el.runtimeStyle.backgroundImage = 'none';
- el.runtimeStyle.backgroundColor = 'transparent';
- },
- /* IE can't figure out what do when the offsetLeft and the clientLeft add up to 1, and the VML ends up getting fuzzy... so we have to push/enlarge things by 1 pixel and then clip off the excess */
- vmlOffsets: function (el) {
- var thisStyle, size, fudge, makeVisible, bg, bgR, dC, altC, b, c, v;
- thisStyle = el.currentStyle;
- size = {'W':el.clientWidth+1, 'H':el.clientHeight+1, 'w':this.imgSize[el.vmlBg].width, 'h':this.imgSize[el.vmlBg].height, 'L':el.offsetLeft, 'T':el.offsetTop, 'bLW':el.clientLeft, 'bTW':el.clientTop};
- fudge = (size.L + size.bLW == 1) ? 1 : 0;
- /* vml shape, left, top, width, height, origin */
- makeVisible = function (vml, l, t, w, h, o) {
- vml.coordsize = w+','+h;
- vml.coordorigin = o+','+o;
- vml.path = 'm0,0l'+w+',0l'+w+','+h+'l0,'+h+' xe';
- vml.style.width = w + 'px';
- vml.style.height = h + 'px';
- vml.style.left = l + 'px';
- vml.style.top = t + 'px';
- };
- makeVisible(el.vml.color.shape, (size.L + (el.isImg ? 0 : size.bLW)), (size.T + (el.isImg ? 0 : size.bTW)), (size.W-1), (size.H-1), 0);
- makeVisible(el.vml.image.shape, (size.L + size.bLW), (size.T + size.bTW), (size.W), (size.H), 1 );
- bg = {'X':0, 'Y':0};
- if (el.isImg) {
- bg.X = parseInt(thisStyle.paddingLeft, 10) + 1;
- bg.Y = parseInt(thisStyle.paddingTop, 10) + 1;
- }
- else {
- for (b in bg) {
- if (bg.hasOwnProperty(b)) {
- this.figurePercentage(bg, size, b, thisStyle['backgroundPosition'+b]);
- }
- }
- }
- el.vml.image.fill.position = (bg.X/size.W) + ',' + (bg.Y/size.H);
- bgR = thisStyle.backgroundRepeat;
- dC = {'T':1, 'R':size.W+fudge, 'B':size.H, 'L':1+fudge}; /* these are defaults for repeat of any kind */
- altC = { 'X': {'b1': 'L', 'b2': 'R', 'd': 'W'}, 'Y': {'b1': 'T', 'b2': 'B', 'd': 'H'} };
- if (bgR != 'repeat' || el.isImg) {
- c = {'T':(bg.Y), 'R':(bg.X+size.w), 'B':(bg.Y+size.h), 'L':(bg.X)}; /* these are defaults for no-repeat - clips down to the image location */
- if (bgR.search('repeat-') != -1) { /* now let's revert to dC for repeat-x or repeat-y */
- v = bgR.split('repeat-')[1].toUpperCase();
- c[altC[v].b1] = 1;
- c[altC[v].b2] = size[altC[v].d];
- }
- if (c.B > size.H) {
- c.B = size.H;
- }
- el.vml.image.shape.style.clip = 'rect('+c.T+'px '+(c.R+fudge)+'px '+c.B+'px '+(c.L+fudge)+'px)';
- }
- else {
- el.vml.image.shape.style.clip = 'rect('+dC.T+'px '+dC.R+'px '+dC.B+'px '+dC.L+'px)';
- }
- },
- figurePercentage: function (bg, size, axis, position) {
- var horizontal, fraction;
- fraction = true;
- horizontal = (axis == 'X');
- switch(position) {
- case 'left':
- case 'top':
- bg[axis] = 0;
- break;
- case 'center':
- bg[axis] = 0.5;
- break;
- case 'right':
- case 'bottom':
- bg[axis] = 1;
- break;
- default:
- if (position.search('%') != -1) {
- bg[axis] = parseInt(position, 10) / 100;
- }
- else {
- fraction = false;
- }
- }
- bg[axis] = Math.ceil( fraction ? ( (size[horizontal?'W': 'H'] * bg[axis]) - (size[horizontal?'w': 'h'] * bg[axis]) ) : parseInt(position, 10) );
- if (bg[axis] % 2 === 0) {
- bg[axis]++;
- }
- return bg[axis];
- },
- fixPng: function (el) {
- el.style.behavior = 'none';
- var lib, els, nodeStr, v, e;
- if (el.nodeName == 'BODY' || el.nodeName == 'TD' || el.nodeName == 'TR') { /* elements not supported yet */
- return;
- }
- el.isImg = false;
- if (el.nodeName == 'IMG') {
- if(el.src.toLowerCase().search(/\.png$/) != -1) {
- el.isImg = true;
- el.style.visibility = 'hidden';
View
13 docs/public/js/libs/dd_belatedpng.min.js
@@ -1,13 +0,0 @@
-/**
-* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML <IMG/>.
-* Author: Drew Diller
-* Email: drew.diller@gmail.com
-* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
-* Version: 0.0.8a
-* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
-*
-* Example usage:
-* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
-* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
-**/
-var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;b<c.length;b++){this.screenStyleSheet.addRule(c[b],"behavior:expression(DD_belatedPNG.fixPng(this))")}}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlOffsets(a);this.vmlOpacity(a);if(a.isImg){this.copyImageBorders(a)}},attachHandlers:function(i){var d,c,g,e,b,f;d=this;c={resize:"vmlOffsets",move:"vmlOffsets"};if(i.nodeName=="A"){e={mouseleave:"handlePseudoHover",mouseenter:"handlePseudoHover",focus:"handlePseudoHover",blur:"handlePseudoHover"};for(b in e){if(e.hasOwnProperty(b)){c[b]=e[b]}}}for(f in c){if(c.hasOwnProperty(f)){g=function(){d[c[f]](i)};i.attachEvent("on"+f,g)}}i.attachEvent("onpropertychange",this.readPropertyChange)},giveLayout:function(a){a.style.zoom=1;if(a.currentStyle.position=="static"){a.style.position="relative"}},copyImageBorders:function(b){var c,a;c={borderStyle:true,borderWidth:true,borderColor:true};for(a in c){if(c.hasOwnProperty(a)){b.vml.color.shape.style[a]=b.currentStyle[a]}}},vmlFill:function(e){if(!e.currentStyle){return}else{var d,f,g,b,a,c;d=e.currentStyle}for(b in e.vml){if(e.vml.hasOwnProperty(b)){e.vml[b].shape.style.zIndex=d.zIndex}}e.runtimeStyle.backgroundColor="";e.runtimeStyle.backgroundImage="";f=true;if(d.backgroundImage!="none"||e.isImg){if(!e.isImg){e.vmlBg=d.backgroundImage;e.vmlBg=e.vmlBg.substr(5,e.vmlBg.lastIndexOf('")')-5)}else{e.vmlBg=e.src}g=this;if(!g.imgSize[e.vmlBg]){a=document.createElement("img");g.imgSize[e.vmlBg]=a;a.className=g.ns+"_sizeFinder";a.runtimeStyle.cssText="behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;";c=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;g.vmlOffsets(e)};a.attachEvent("onload",c);a.src=e.vmlBg;a.removeAttribute("width");a.removeAttribute("height");document.body.insertBefore(a,document.body.firstChild)}e.vml.image.fill.src=e.vmlBg;f=false}e.vml.image.fill.on=!f;e.vml.image.fill.color="none";e.vml.color.shape.style.backgroundColor=d.backgroundColor;e.runtimeStyle.backgroundImage="none";e.runtimeStyle.backgroundColor="transparent"},vmlOffsets:function(d){var h,n,a,e,g,m,f,l,j,i,k;h=d.currentStyle;n={W:d.clientWidth+1,H:d.clientHeight+1,w:this.imgSize[d.vmlBg].width,h:this.imgSize[d.vmlBg].height,L:d.offsetLeft,T:d.offsetTop,bLW:d.clientLeft,bTW:d.clientTop};a=(n.L+n.bLW==1)?1:0;e=function(b,p,q,c,s,u){b.coordsize=c+","+s;b.coordorigin=u+","+u;b.path="m0,0l"+c+",0l"+c+","+s+"l0,"+s+" xe";b.style.width=c+"px";b.style.height=s+"px";b.style.left=p+"px";b.style.top=q+"px"};e(d.vml.color.shape,(n.L+(d.isImg?0:n.bLW)),(n.T+(d.isImg?0:n.bTW)),(n.W-1),(n.H-1),0);e(d.vml.image.shape,(n.L+n.bLW),(n.T+n.bTW),(n.W),(n.H),1);g={X:0,Y:0};if(d.isImg){g.X=parseInt(h.paddingLeft,10)+1;g.Y=parseInt(h.paddingTop,10)+1}else{for(j in g){if(g.hasOwnProperty(j)){this.figurePercentage(g,n,j,h["backgroundPosition"+j])}}}d.vml.image.fill.position=(g.X/n.W)+","+(g.Y/n.H);m=h.backgroundRepeat;f={T:1,R:n.W+a,B:n.H,L:1+a};l={X:{b1:"L",b2:"R",d:"W"},Y:{b1:"T",b2:"B",d:"H"}};if(m!="repeat"||d.isImg){i={T:(g.Y),R:(g.X+n.w),B:(g.Y+n.h),L:(g.X)};if(m.search("repeat-")!=-1){k=m.split("repeat-")[1].toUpperCase();i[l[k].b1]=1;i[l[k].b2]=n[l[k].d]}if(i.B>n.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();
View
6,240 docs/public/js/libs/jquery-1.4.2.js
0 additions, 6,240 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
154 docs/public/js/libs/jquery-1.4.2.min.js
@@ -1,154 +0,0 @@
-/*!
- * 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<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
-e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
-j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
-"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
-true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\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(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
-c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
-L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
-"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
-a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
-d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
-a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
-!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
-true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-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="<input type='radio' name='radiotest' checked='checked'/>";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<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
-i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
-" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
-this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-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<d;j++){var i=
-e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=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<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
-null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},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();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<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){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||s;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=s.documentElement;d=s.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!==w)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){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
-"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},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}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};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 Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=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?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
-{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
-if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(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},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;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
-!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},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;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
-u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
-fu