├── docs
├── iphone.png
├── black_bg.png
├── favicon.png
├── oss-credit.png
├── ipad-demo-bg.png
├── sidetap-logo.png
└── style.css
├── src
├── theme
│ └── default
│ │ ├── img
│ │ ├── info.png
│ │ ├── menu.png
│ │ └── arrow-right-white.png
│ │ ├── default.less
│ │ └── default.css
├── coffee
│ ├── sidetap_loader.coffee
│ ├── sidetap_standard.coffee
│ └── sidetap_ios.coffee
├── skeleton.html
├── sidetap.css
├── sidetap.min.js
├── less
│ └── sidetap.less
└── sidetap.js
├── demo
└── stonehenge
│ ├── assets
│ ├── img
│ │ └── ajax-loader.gif
│ ├── css
│ │ └── stonehenge.css
│ ├── coffee
│ │ └── stonehenge.coffee
│ └── js
│ │ ├── stonehenge.js
│ │ └── images.js
│ └── index.html
├── .gitignore
├── package.json
├── LICENSE.md
├── grunt.js
├── README.md
├── index.html
└── lib
├── harvey.js
└── jquery.1.7.2.js
/docs/iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/docs/iphone.png
--------------------------------------------------------------------------------
/docs/black_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/docs/black_bg.png
--------------------------------------------------------------------------------
/docs/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/docs/favicon.png
--------------------------------------------------------------------------------
/docs/oss-credit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/docs/oss-credit.png
--------------------------------------------------------------------------------
/docs/ipad-demo-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/docs/ipad-demo-bg.png
--------------------------------------------------------------------------------
/docs/sidetap-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/docs/sidetap-logo.png
--------------------------------------------------------------------------------
/src/theme/default/img/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/src/theme/default/img/info.png
--------------------------------------------------------------------------------
/src/theme/default/img/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/src/theme/default/img/menu.png
--------------------------------------------------------------------------------
/demo/stonehenge/assets/img/ajax-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/demo/stonehenge/assets/img/ajax-loader.gif
--------------------------------------------------------------------------------
/src/theme/default/img/arrow-right-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/harvesthq/Sidetap/HEAD/src/theme/default/img/arrow-right-white.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
3 | src/sidetap_ios.js
4 | src/sidetap_loader.js
5 | src/sidetap_standard.js
6 |
7 | demo/sleuth/.sass-cache/
8 | demo/sleuth/config.rb
9 |
--------------------------------------------------------------------------------
/src/coffee/sidetap_loader.coffee:
--------------------------------------------------------------------------------
1 | ###
2 | Constructor function for Sidetap
3 | ###
4 |
5 | this.sidetap = () ->
6 | ios5 = window.SharedWorker and navigator.userAgent.match(/^((?!android).)*webkit.*$/i)
7 | return if ios5 then new SidetapIos() else new SidetapStandard()
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "harvest",
3 | "name": "sidetap",
4 | "version": "0.1.1",
5 | "description": "Some other day.",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/harvesthq/sidetap"
9 | },
10 | "engines": {
11 | "node": ">=0.4.0"
12 | },
13 | "dependencies": {},
14 | "devDependencies": {
15 | "coffee-script": ">= 1.2",
16 | "less": ">= 418",
17 | }
18 | }
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # SideTap, a mobile framework
2 | ## by Patrick Filler for [Harvest](http://getharvest.com)
3 |
4 | Available for use under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
5 |
6 | Copyright (c) 2012 by Harvest
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
--------------------------------------------------------------------------------
/demo/stonehenge/assets/css/stonehenge.css:
--------------------------------------------------------------------------------
1 | /* Stonehenge Content */
2 |
3 | .loading {
4 | height: 3em;
5 | background: url('../img/ajax-loader.gif') no-repeat center center;
6 | }
7 | #detail figure.loading img, #detail figure.loading figcaption {
8 | display: none;
9 | }
10 |
11 | .container {
12 | padding: 44px 0 0;
13 | }
14 | #about .container {
15 | text-align: center;
16 | padding: 84px 10px 10px;
17 | }
18 |
19 | .thumbnails {
20 | overflow: auto;
21 | padding-top: 1.5%;
22 | }
23 | .thumbnails li {
24 | float: left;
25 | width: 23.5%;
26 | margin: 0 0 1.5% 1.5%;
27 | line-height: 0;
28 | }
29 | .thumbnails li img {
30 | display: block;
31 | width: 100%;
32 | }
33 | .thumbnails.loading li {
34 | display: none
35 | }
36 |
37 | #detail img {
38 | border-bottom: 1px solid rgba(255, 255, 255, 0.1);
39 | width: 100%;
40 | }
41 | #detail figcaption {
42 | font-style: normal;
43 | padding: 10px;
44 | text-align: center;
45 | }
46 | #detail cite {
47 | font-style: normal;
48 | font-weight: bold;
49 | }
50 | #detail address {
51 | font-size: 12px;
52 | font-style: normal;
53 | line-height: 20px;
54 | }
55 |
56 | .sidetap-logo {
57 | display: block;
58 | margin: 0px auto;
59 | padding: 20px 0;
60 | width: 80%;
61 | }
62 | small {
63 | display: block;
64 | font-size: 12px;
65 | padding: 30px 0;
66 | }
--------------------------------------------------------------------------------
/grunt.js:
--------------------------------------------------------------------------------
1 | /**
2 | * grunt
3 | * CoffeeScript example
4 | */
5 | module.exports = function(grunt){
6 |
7 | grunt.initConfig({
8 | lint: {
9 | files: ['grunt.js', 'src/*.js']
10 | },
11 | coffee: {
12 | compile: {
13 | options: {
14 | bare: true
15 | },
16 | files: {
17 | 'src/sidetap_loader.js': 'src/coffee/sidetap_loader.coffee',
18 | 'src/sidetap_standard.js': 'src/coffee/sidetap_standard.coffee',
19 | 'src/sidetap_ios.js': 'src/coffee/sidetap_ios.coffee',
20 | 'src/sidetap.js': ['src/coffee/sidetap_standard.coffee','src/coffee/sidetap_ios.coffee','src/coffee/sidetap_loader.coffee']
21 | }
22 | }
23 | },
24 | less: {
25 | compile: {
26 | files: {
27 | 'src/sidetap.css': 'src/less/sidetap.less',
28 | 'src/theme/default/default.css': 'src/theme/default/default.less'
29 | }
30 | }
31 | },
32 | watch: {
33 | dist1: {
34 | files: 'src/coffee/*',
35 | tasks: 'coffee min'
36 | },
37 | dist2: {
38 | files: 'src/less/*',
39 | tasks: 'less'
40 | },
41 | dist3: {
42 | files: 'src/theme/default/*.less',
43 | tasks: 'less'
44 | }
45 | },
46 | min: {
47 | dist: {
48 | src: ['src/sidetap.js'],
49 | dest: 'src/sidetap.min.js'
50 | }
51 | }
52 | });
53 |
54 | grunt.loadNpmTasks('grunt-contrib');
55 | grunt.registerTask('build', 'coffee less min');
56 | grunt.registerTask('default', 'coffee less min');
57 |
58 | };
--------------------------------------------------------------------------------
/src/skeleton.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Sidetap HTML Skeleton
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Header Text
34 |
35 |
36 |
37 |
38 | Content goes here.
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/coffee/sidetap_standard.coffee:
--------------------------------------------------------------------------------
1 | class this.SidetapStandard
2 |
3 | @ios_5 = false
4 |
5 | constructor: () ->
6 | @stp = @detect_primary_element("sidetap")
7 | @stp_nav = @detect_primary_element("stp-nav")
8 | @stp_content = @detect_primary_element("stp-content")
9 | @full_heights = $(".stp-full-height")
10 |
11 | @set_up_observers()
12 |
13 | detect_primary_element: (css_class) ->
14 | el = $(".#{css_class}")
15 | console?.warn("Sidetap: too many elements of class \"#{css_class}\". There must be only one.") if el.length > 1
16 | el.addClass("stp-full-height")
17 | el.first()
18 |
19 | getScrollTop: ->
20 | scrollTop = window.pageYOffset || document.compatMode is "CSS1Compat" && document.documentElement.scrollTop || document.body.scrollTop || 0
21 |
22 | set_up_observers: ->
23 | @set_window_size()
24 | $(window).resize @set_window_size
25 |
26 | $(".nav-toggle").click (evt) => @toggle_nav(evt)
27 |
28 | set_window_size: =>
29 | @full_heights.css("minHeight", window.innerHeight)
30 | if @stp.hasClass("nav-showing") then @set_nav_showing() else @set_nav_hiding()
31 |
32 | toggle_nav: (e) =>
33 | e?.preventDefault()
34 | @stp_content.on "webkitAnimationEnd", @nav_toggle_complete
35 |
36 | if(@stp.hasClass("nav-showing"))
37 | @stp_content.removeClass("showing-nav").addClass("hide-nav")
38 | @set_nav_hiding()
39 | else
40 | @stp_nav.show()
41 | @stp_content.removeClass("hide-nav").addClass("showing-nav")
42 | @set_nav_showing()
43 | @stp.toggleClass("nav-showing")
44 |
45 | if @ios_5
46 | @set_window_size() if @address_bar_showing
47 | window.scrollTo(0, 1)
48 |
49 | nav_toggle_complete: =>
50 | @stp_content.off "webkitAnimationEnd", @nav_toggle_complete
51 | @stp_nav.hide() unless @stp_content.hasClass("showing-nav")
52 |
53 | set_nav_showing: ->
54 | @stp_nav.css("maxHeight", "none")
55 | @stp_content.css("maxHeight", @stp_nav.height())
56 |
57 | set_nav_hiding: ->
58 | @stp_content.css("maxHeight", "none")
59 | @stp_nav.css("maxHeight", @stp_content.height())
60 |
61 | scroll_to: (element) ->
62 | $("body").scrollTop(element.offset().top - 10)
63 |
64 | show_section: (element, options = {}) ->
65 | @stp_content.find(".stp-content-panel").not(".hidden").addClass("hidden")
66 | element.removeClass("hidden").show()
67 | options.callback.apply() if options.callback?
68 |
--------------------------------------------------------------------------------
/demo/stonehenge/assets/coffee/stonehenge.coffee:
--------------------------------------------------------------------------------
1 | $(document).ready () ->
2 |
3 | bigger_badder_squares = () ->
4 |
5 | for category, list of images
6 | for image, i in list
7 | image.url_s = image.url_s.replace /_s\.jpg$/, '_q.jpg'
8 | images[category][i] = image
9 |
10 | # use high-res thumbnail images on devices with higher pixel density
11 | Harvey.attach 'only screen and (min-width: 420px)', setup: bigger_badder_squares
12 | Harvey.attach 'only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5)',
13 | setup: bigger_badder_squares
14 |
15 |
16 | st = sidetap()
17 |
18 | # content panels
19 | gallery = $('#gallery')
20 | thumbnails = gallery.find('.thumbnails')
21 |
22 | detail = $('#detail')
23 | photo = detail.find('figure')
24 |
25 | about = $('#about')
26 |
27 | # navigation structure
28 | $('header .menu').click st.toggle_nav
29 |
30 | $('header .info' ).click () -> st.show_section(about, {animation: 'upfrombottom'})
31 | $('#about a.cancel').click () -> st.show_section(gallery, {animation: 'downfromtop'})
32 | $('#detail a.back' ).click () -> st.show_section(gallery, {animation: 'infromleft'})
33 |
34 |
35 |
36 | show_thumbnails = (section, images) ->
37 | thumbnails.empty().addClass('loading')
38 | gallery.find('h1').text(section)
39 |
40 | thumbs = []
41 |
42 | total = images[section].length
43 | loaded = 0
44 |
45 | # preload tumbnails
46 | thumbs.push $(" ").load(() ->
47 | loaded++
48 | render_thumbnails(images[section]) if loaded is total
49 | ) for img, i in images[section]
50 |
51 |
52 | render_thumbnails = (images) ->
53 | thumbnails.removeClass('loading').hide()
54 |
55 | thumbnails.append $("""
56 |
57 |
58 | """
59 | ) for img, i in images
60 |
61 | thumbnails.fadeIn('fast')
62 |
63 | thumbnails.find('a').click () ->
64 | show_image(images[$(this).find('img').prop('alt')])
65 | no
66 |
67 |
68 | show_image = (img) =>
69 | st.show_section(detail, {animation: 'infromright'})
70 |
71 | photo.addClass('loading')
72 |
73 | $(" ").load(() ->
74 | photo.removeClass('loading').hide()
75 |
76 | photo.find('img').replaceWith(this)
77 |
78 | photo.fadeIn('fast')
79 | )
80 |
81 | # show meta info for the current image
82 | photo.find('cite').html(img.title)
83 | photo.find('[rel="author"]')
84 | .prop('href', "http://flickr.com/photos/#{img.owner}/#{img.id}")
85 | .html(img.ownername)
86 |
87 |
88 | # show the default section
89 | show_thumbnails(st.stp_nav.find('a.selected').text(), images)
90 |
91 | st.stp_nav.find('nav a').click () ->
92 | $(this).addClass('selected').siblings().removeClass('selected')
93 | st.toggle_nav()
94 |
95 | show_thumbnails($(this).text(), images)
96 | no
97 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #Sidetap
2 |
3 | We built Sidetap to be an easy-to-use implementation of the side navigation pattern popularized by apps like Sparrow and Facebook. It solves many common mobile development problems right out of the box. Here are some of the specific things we like about it:
4 |
5 | - **Lightweight**: Sidetap only weighs 2k when minifyied and gzipped!
6 | - **Device Support**: Sidetap aims to always deliver the best possible experience for all devices by starting with a basic experience and progressively enhancing it for more capable devices.
7 | - **Less Decisions to Make**: By embracing convention over configuration, Sidetap let’s you start building your mobile interfaces right away.
8 | - **Simple**: Sidetap provides a flexible foundation for navigating between content panels on mobile devices using an easy-to-use syntax.
9 |
10 | [See it in action](http://harvesthq.github.com/Sidetap/demo/stonehenge/index.html).
11 |
12 | ##How to Use Sidetap
13 |
14 | 1. **Build the HTML Structure**
15 |
16 | Sidetap uses a very specific HTML structure which can be found in the [skelton.html](https://github.com/harvesthq/Sidetap/blob/master/src/skeleton.html) file
17 |
18 | 2. **Instantiate Sidetap**
19 |
20 | Create a reference to Sidetap from within your app.
21 |
22 | ``var my_sidetap = new sidetap();``
23 |
24 | 3. **Call Animations**
25 |
26 | Any time you want to show a new section, you just tell Sidetap which content element to animate. Sidetap will take care of clearing the stage using whatever animation is appropriate for the situation.
27 |
28 | ```javascript
29 | my_sidetap.show_section(element, options);
30 | ```
31 |
32 | **show_section options:**
33 | ``callback``: a function to fire when the switch is complete
34 | ``animation``: an animation style to use (ios 5+ only). Current animations are upfrombottom, downfromtop, infromright, infromleft
35 |
36 | ##Dependency
37 |
38 | Requires jQuery (only tested with 1.7.2) or Zepto.js.
39 |
40 | ##Building Files Using Grunt
41 |
42 | Sidetap's javascript and css are written using coffeescript and less respectively. Each of these file types must be compiled before they can be used by the browser. To do this easily, we're using the excellent [grunt build system](https://github.com/cowboy/grunt). To use the build system, you must first install [node](http://nodejs.org/) and [npm](http://npmjs.org/).
43 |
44 | 1. Install grunt: ``npm install -g grunt``
45 | 2. Install grunt-contrib: ``npm install grunt-contrib``
46 | 3. That's it.
47 |
48 | There are a few available commands.
49 |
50 | - ``grunt`` or ``grunt build``: build the css & js files
51 | - ``grunt watch``: build the css & js files whenever the less or coffee files change
52 |
53 | ##Reporting Issues & Contributing
54 |
55 | We welcome your input, but strongly encourage you to read Nicolas Gallagher's excellent [issue guidelines](https://github.com/necolas/issue-guidelines/blob/master/README.md) before filing an issue or opening a pull request. While these are guidelines are his projects specifically, they would serve as an excellent guide for contributing to any open source project.
56 |
57 | ##Development Roadmap
58 |
59 | As with any software project, there's always room for improvement. These are some of the things we'd like to get added to Sidetap in the future.
60 |
61 | - More iOS-like header animations
62 | - Better touch support
63 | - Leaving side navigation open on larger screen devices (hello, iPad)
64 | - Bringing polished version to more devices.
65 |
66 |
67 | ##Sidetap Credits
68 |
69 | Built by @pfiller, @mlharvest, @kimku and @jkintscher for [Harvest](http://www.getharvest.com/). Want to work on projects like this? [We’re hiring](http://www.getharvest.com/careers)!
70 |
--------------------------------------------------------------------------------
/demo/stonehenge/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Stonehenge
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
48 |
49 |
50 |
51 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | by
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | What's This?
75 |
76 |
77 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/src/coffee/sidetap_ios.coffee:
--------------------------------------------------------------------------------
1 | class this.SidetapIos extends SidetapStandard
2 | constructor: () ->
3 | $("body").addClass("ios")
4 | @ios_5 = true
5 | super()
6 |
7 | set_up_observers: ->
8 | @set_window_size()
9 | $("header h1").click (evt) => @show_address_bar(evt)
10 | $(window).on "orientationchange", (evt) => @set_window_size(evt)
11 |
12 | $(".nav-toggle").click (evt) => @toggle_nav(evt)
13 | $("#stp-overlay").click (evt) => @toggle_nav(evt)
14 |
15 | show_address_bar: (evt) ->
16 | @address_bar_showing = true
17 | @full_heights.css("minHeight", 160)
18 | setTimeout(@set_window_size_2, 1)
19 |
20 | set_window_size: ->
21 | @address_bar_showing = false
22 | $("body").css("paddingBottom","5000px")
23 | window.scrollTo(0, 1)
24 | setTimeout(@set_window_size_2,50)
25 |
26 | set_window_size_2: =>
27 | @full_heights.css("minHeight", window.innerHeight)
28 | $("body").css("paddingBottom","0")
29 | if @stp.hasClass("nav-showing") then @set_nav_showing() else @set_nav_hiding()
30 |
31 | scroll_to: (element) ->
32 | parent = element.parents(".stp-content-body").first()
33 | oldscrolltop = parent.scrollTop()
34 |
35 | # get the correct offset based on top scroll
36 | parent.scrollTop(0)
37 | offset = element.offset().top - 98
38 | parent.scrollTop(oldscrolltop)
39 |
40 | parent.stop().animate({scrollTop: offset}, "slow")
41 |
42 | show_section: (element, options = {}) ->
43 | animation = if options.animation? then options.animation else "default"
44 | @pending_callback = options.callback if options.callback?
45 |
46 | if animation is "upfrombottom"
47 | @up_from_bottom(element)
48 | else if animation is "downfromtop"
49 | @down_from_top(element)
50 | else if animation is "infromright"
51 | @in_from_right(element)
52 | else if animation is "infromleft"
53 | @in_from_left(element)
54 | else
55 | @stp_content.find(".stp-content-panel").not(".hidden").addClass("hidden")
56 | element.removeClass("hidden").show()
57 | @animation_callback()
58 |
59 | up_from_bottom: (element) ->
60 | element.on("webkitAnimationEnd", @up_from_bottom_complete).removeClass("hidden").addClass("up-from-bottom")
61 |
62 | up_from_bottom_complete: =>
63 | @slide_up_previous = $(".stp-content-panel").not(".up-from-bottom").addClass("hidden")
64 | $(".up-from-bottom").off("webkitAnimationEnd", @up_from_bottom_complete).removeClass("up-from-bottom")
65 | @animation_callback()
66 |
67 | down_from_top: (element) ->
68 | slide_down = @stp_content.find(".stp-content-panel").not(".hidden")
69 | element.removeClass("hidden")
70 | slide_down.on("webkitAnimationEnd", @down_from_top_complete).addClass("down-to-bottom")
71 |
72 | down_from_top_complete: =>
73 | slide_down = $(".down-to-bottom")
74 | slide_down.off("webkitAnimationEnd", @down_from_top_complete).removeClass("down-to-bottom").hide()
75 | slide_down.addClass("hidden").show()
76 | @animation_callback()
77 |
78 | in_from_right: (element) ->
79 | $(".stp-content-panel").not(".hidden").addClass("slide-out-to-left")
80 | element.on("webkitAnimationEnd", @in_from_right_complete).removeClass("hidden").addClass("slide-in-from-right")
81 |
82 | in_from_right_complete: =>
83 | $(".slide-out-to-left").addClass("hidden").removeClass("slide-out-to-left")
84 | $(".slide-in-from-right").off("webkitAnimationEnd", @in_from_right_complete).removeClass("slide-in-from-right")
85 | @animation_callback()
86 |
87 | in_from_left: (element) ->
88 | $(".stp-content-panel").not(".hidden").addClass("slide-out-to-right")
89 | element.on("webkitAnimationEnd", @in_from_left_complete).removeClass("hidden").addClass("slide-in-from-left")
90 |
91 | in_from_left_complete: =>
92 | $(".slide-out-to-right").removeClass("slide-out-to-right").addClass("hidden")
93 | $(".slide-in-from-left").off("webkitAnimationEnd", @in_from_left_complete).removeClass("slide-in-from-left")
94 | @animation_callback()
95 |
96 | animation_callback: ->
97 | if @pending_callback
98 | @pending_callback.call()
99 | @pending_callback = null
--------------------------------------------------------------------------------
/demo/stonehenge/assets/js/stonehenge.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
3 | $(document).ready(function() {
4 | var about, bigger_badder_squares, detail, gallery, photo, render_thumbnails, show_image, show_thumbnails, st, thumbnails;
5 | bigger_badder_squares = function() {
6 | var category, i, image, list, _results;
7 | _results = [];
8 | for (category in images) {
9 | list = images[category];
10 | _results.push((function() {
11 | var _len, _results2;
12 | _results2 = [];
13 | for (i = 0, _len = list.length; i < _len; i++) {
14 | image = list[i];
15 | image.url_s = image.url_s.replace(/_s\.jpg$/, '_q.jpg');
16 | _results2.push(images[category][i] = image);
17 | }
18 | return _results2;
19 | })());
20 | }
21 | return _results;
22 | };
23 | Harvey.attach('only screen and (min-width: 420px)', {
24 | setup: bigger_badder_squares
25 | });
26 | Harvey.attach('only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5)', {
27 | setup: bigger_badder_squares
28 | });
29 | st = sidetap();
30 | gallery = $('#gallery');
31 | thumbnails = gallery.find('.thumbnails');
32 | detail = $('#detail');
33 | photo = detail.find('figure');
34 | about = $('#about');
35 | $('header .menu').click(st.toggle_nav);
36 | $('header .info').click(function() {
37 | return st.show_section(about, {
38 | animation: 'upfrombottom'
39 | });
40 | });
41 | $('#about a.cancel').click(function() {
42 | return st.show_section(gallery, {
43 | animation: 'downfromtop'
44 | });
45 | });
46 | $('#detail a.back').click(function() {
47 | return st.show_section(gallery, {
48 | animation: 'infromleft'
49 | });
50 | });
51 | show_thumbnails = function(section, images) {
52 | var i, img, loaded, thumbs, total, _len, _ref, _results;
53 | thumbnails.empty().addClass('loading');
54 | gallery.find('h1').text(section);
55 | thumbs = [];
56 | total = images[section].length;
57 | loaded = 0;
58 | _ref = images[section];
59 | _results = [];
60 | for (i = 0, _len = _ref.length; i < _len; i++) {
61 | img = _ref[i];
62 | _results.push(thumbs.push($(" ").load(function() {
63 | loaded++;
64 | if (loaded === total) {
65 | return render_thumbnails(images[section]);
66 | }
67 | })));
68 | }
69 | return _results;
70 | };
71 | render_thumbnails = function(images) {
72 | var i, img, _len;
73 | thumbnails.removeClass('loading').hide();
74 | for (i = 0, _len = images.length; i < _len; i++) {
75 | img = images[i];
76 | thumbnails.append($("\n \n "));
77 | }
78 | thumbnails.fadeIn('fast');
79 | return thumbnails.find('a').click(function() {
80 | show_image(images[$(this).find('img').prop('alt')]);
81 | return false;
82 | });
83 | };
84 | show_image = __bind(function(img) {
85 | st.show_section(detail, {
86 | animation: 'infromright'
87 | });
88 | photo.addClass('loading');
89 | $(" ").load(function() {
90 | photo.removeClass('loading').hide();
91 | photo.find('img').replaceWith(this);
92 | return photo.fadeIn('fast');
93 | });
94 | photo.find('cite').html(img.title);
95 | return photo.find('[rel="author"]').prop('href', "http://flickr.com/photos/" + img.owner + "/" + img.id).html(img.ownername);
96 | }, this);
97 | show_thumbnails(st.stp_nav.find('a.selected').text(), images);
98 | return st.stp_nav.find('nav a').click(function() {
99 | $(this).addClass('selected').siblings().removeClass('selected');
100 | st.toggle_nav();
101 | show_thumbnails($(this).text(), images);
102 | return false;
103 | });
104 | });
105 | }).call(this);
106 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | This is Sidetap - a mobile framework.
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | Built by Harvest
24 |
25 |
26 |
27 |
28 |
29 |
30 | This is Sidetap
31 | Sidetap is a simple framework that allows you to quickly build platform-independent mobile web interfaces.
32 |
33 |
34 | Sidetap was not optimized for your browser:
35 | Though Sidetap works on many devices and browsers, it delivers the best experience to iOS5+, Chrome & Safari. Check them out to get the true Sidetap experience.™
36 |
37 |
38 |
39 |
42 |
43 |
Ugh, another mobile framework?
44 |
45 |
We built Sidetap to be an easy-to-use implementation of the side navigation pattern popularized by apps like Sparrow and Facebook. It solves many common mobile development problems right out of the box. Here are some of the specific things we like about it:
46 |
47 |
48 | Lightweight
49 | Sidetap only weighs 2k when minifyied and gzipped!
50 |
51 | Device Support
52 | Sidetap aims to always deliver the best possible experience for all devices by starting with a basic experience and progressively enhancing it for more capable devices.
53 |
54 | Less Decisions to Make
55 | By embracing convention over configuration, Sidetap lets you start building your mobile interfaces right away.
56 |
57 | Simple
58 | Sidetap provides a flexible foundation for navigating between content panels on mobile devices using an easy-to-use syntax.
59 |
60 |
61 |
62 |
How to Use Sidetap
63 |
64 |
65 |
66 | Build the HTML Structure
67 | Sidetap uses a very specific HTML structure which can be found in the skeleton.html file
68 |
69 |
70 |
71 | Instantiate Sidetap
72 | Create a reference to Sidetap from within your app.
73 |
74 | var my_sidetap = new sidetap();
75 |
76 |
77 |
78 | Call Animations
79 | Any time you want to show a new section, you just tell Sidetap which content element to animate. Sidetap will take care of clearing the stage using whatever animation is appropriate for the situation.
80 |
81 | my_sidetap.show_section(element, options);
82 |
83 | show_section options:
84 |
85 | callback: a function to fire when the switch is complete
86 | animation: an animation style to use (iOS 5+ only). Current animations are upfrombottom, downfromtop, infromright, infromleft
87 |
88 |
89 |
90 |
91 |
Dependency
92 |
93 |
Requires jQuery (only tested with 1.7.2) or Zepto.js.
94 |
95 |
Development Roadmap
96 |
97 |
As with any software project, there’s always room for improvement. These are some of the things we’d like to get added to Sidetap in the future.
98 |
99 |
100 | More iOS-like header animations
101 | Better touch support
102 | Leaving side navigation open on larger screen devices (hello, iPad)
103 | Bringing polished version to more devices.
104 |
105 |
106 |
107 |
Where can I get it
108 |
109 |
On Github, of course.
110 |
111 |
Credits
112 |
113 |
120 |
121 |
122 |
123 |
124 |
145 |
146 |
152 |
153 |
154 |
--------------------------------------------------------------------------------
/src/sidetap.css:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | padding: 0;
4 | margin: 0;
5 | background: #E8E8E8;
6 | }
7 | .sidetap {
8 | position: relative;
9 | width: 100%;
10 | overflow: hidden;
11 | }
12 | .stp-nav {
13 | background: black;
14 | color: white;
15 | display: none;
16 | left: 0;
17 | position: absolute;
18 | top: 0;
19 | width: 272px;
20 | z-index: 5;
21 | }
22 | .stp-content {
23 | background: white;
24 | margin-left: 0;
25 | width: 100%;
26 | z-index: 10;
27 | position: relative;
28 | }
29 | .stp-overlay {
30 | background: blue;
31 | display: none;
32 | height: 100%;
33 | left: 0;
34 | opacity: .0;
35 | position: absolute;
36 | top: 0;
37 | width: 100%;
38 | }
39 | .stp-content-body > * > *:first-child {
40 | margin-top: 0;
41 | }
42 | .stp-content-body > * > *:last-child {
43 | margin-bottom: 0;
44 | }
45 | .sidetap.nav-showing .stp-content {
46 | overflow: hidden;
47 | position: absolute;
48 | top: 0;
49 | left: 0;
50 | box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.9);
51 | -webkit-box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.9);
52 | -moz-box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.9);
53 | }
54 | .sidetap.nav-showing .stp-overlay {
55 | display: block;
56 | z-index: 100;
57 | }
58 | .stp-content-panel,
59 | .stp-nav-panel {
60 | position: relative;
61 | height: 100%;
62 | }
63 | .stp-content-panel {
64 | background: white;
65 | }
66 | .stp-content-panel.hidden {
67 | display: none;
68 | }
69 | .stp-fake-header {
70 | position: absolute;
71 | top: 0;
72 | left: 0;
73 | z-index: 0;
74 | }
75 | .ios .sidetap {
76 | overflow-x: hidden;
77 | }
78 | .ios .stp-content-panel,
79 | .ios .stp-nav-panel {
80 | height: 100%;
81 | left: 0;
82 | position: absolute;
83 | top: 0;
84 | width: 100%;
85 | }
86 | .ios .stp-content-panel.hidden {
87 | display: block;
88 | left: -9999px;
89 | }
90 | .ios .stp-content-frame {
91 | height: 100%;
92 | overflow: auto;
93 | -webkit-overflow-scrolling: touch;
94 | position: relative;
95 | }
96 | .ios .stp-content-body {
97 | -webkit-transform: translatez(0);
98 | position: absolute;
99 | left: 0;
100 | top: 0;
101 | height: 100%;
102 | -webkit-box-sizing: border-box;
103 | overflow: auto;
104 | -webkit-overflow-scrolling: touch;
105 | width: 100%;
106 | }
107 | .ios .nav-showing .stp-content .stp-content-body {
108 | overflow: hidden;
109 | }
110 | /*
111 | Show Navigation Animation
112 | */
113 | .showing-nav {
114 | -webkit-transform: translatex(272px);
115 | -moz-transform: translatex(272px);
116 | -webkit-animation-name: slidefornav;
117 | -moz-animation-name: slidefornav;
118 | -webkit-animation-timing-function: ease-out;
119 | -moz-animation-timing-function: ease-out;
120 | animation-timing-function: ease-out;
121 | -webkit-animation-duration: 175ms;
122 | -moz-animation-duration: 175ms;
123 | animation-duration: 175ms;
124 | }
125 | @-webkit-keyframes slidefornav {
126 | from {
127 | -webkit-transform: translatex(0);
128 | }
129 | to {
130 | -webkit-transform: translatex(272px);
131 | }
132 | }
133 | @-moz-keyframes slidefornav {
134 | from {
135 | -moz-transform: translatex(0);
136 | }
137 | to {
138 | -moz-transform: translatex(272px);
139 | }
140 | }
141 | /*
142 | Hide Navigation Animation
143 | */
144 | .hide-nav {
145 | -webkit-transform: translatex(0);
146 | -moz-transform: translatex(0);
147 | -webkit-animation-name: slideovernav;
148 | -moz-animation-name: slideovernav;
149 | -webkit-animation-timing-function: ease-out;
150 | -moz-animation-timing-function: ease-out;
151 | animation-timing-function: ease-out;
152 | -webkit-animation-duration: 175ms;
153 | -moz-animation-duration: 175ms;
154 | animation-duration: 175ms;
155 | }
156 | @-webkit-keyframes slideovernav {
157 | from {
158 | -webkit-transform: translatex(272px);
159 | }
160 | to {
161 | -webkit-transform: translatex(0);
162 | }
163 | }
164 | @-moz-keyframes slideovernav {
165 | from {
166 | -moz-transform: translatex(272px);
167 | }
168 | to {
169 | -moz-transform: translatex(0);
170 | }
171 | }
172 | /* Slide up or Down animation */
173 | .up-from-bottom {
174 | -webkit-transform: translatey(0);
175 | -moz-transform: translatey(0);
176 | -webkit-animation-name: upfrombottom;
177 | -moz-animation-name: upfrombottom;
178 | -webkit-animation-timing-function: ease-out;
179 | -moz-animation-timing-function: ease-out;
180 | -webkit-animation-duration: 250ms;
181 | -moz-animation-duration: 250ms;
182 | z-index: 5;
183 | }
184 | .down-to-bottom {
185 | -webkit-transform: translatey(100%);
186 | -moz-transform: translatey(100%);
187 | -webkit-animation-name: downtobottom;
188 | -moz-animation-name: downtobottom;
189 | -webkit-animation-timing-function: ease-out;
190 | -moz-animation-timing-function: ease-out;
191 | -webkit-animation-duration: 250ms;
192 | -moz-animation-duration: 250ms;
193 | z-index: 5;
194 | }
195 | @-webkit-keyframes upfrombottom {
196 | from {
197 | -webkit-transform: translatey(100%);
198 | }
199 | to {
200 | -webkit-transform: translatey(0);
201 | }
202 | }
203 | @-webkit-keyframes downtobottom {
204 | from {
205 | -webkit-transform: translatey(0);
206 | }
207 | to {
208 | -webkit-transform: translatey(100%);
209 | }
210 | }
211 | /*
212 | Sliding animations
213 | */
214 | .slide-out-to-left {
215 | -webkit-transform: translatex(-100%);
216 | -webkit-animation-name: slideouttoleft;
217 | }
218 | .slide-in-from-right {
219 | -webkit-transform: translatex(0);
220 | -webkit-animation-name: slideinfromright;
221 | }
222 | .slide-out-to-right {
223 | -webkit-transform: translatex(100%);
224 | -webkit-animation-name: slideouttoright;
225 | }
226 | .slide-in-from-left {
227 | -webkit-transform: translatex(0);
228 | -webkit-animation-name: slideinfromleft;
229 | }
230 | .slide-in-from-left,
231 | .slide-out-to-right,
232 | .slide-in-from-right,
233 | .slide-out-to-left {
234 | -webkit-animation-timing-function: ease-out;
235 | -webkit-animation-duration: 200ms;
236 | }
237 | @-webkit-keyframes slideinfromright {
238 | from {
239 | -webkit-transform: translatex(100%);
240 | }
241 | to {
242 | -webkit-transform: translatex(0);
243 | }
244 | }
245 | @-webkit-keyframes slideinfromleft {
246 | from {
247 | -webkit-transform: translatex(-100%);
248 | }
249 | to {
250 | -webkit-transform: translatex(0);
251 | }
252 | }
253 | @-webkit-keyframes slideouttoleft {
254 | from {
255 | -webkit-transform: translatex(0);
256 | }
257 | to {
258 | -webkit-transform: translatex(-100%);
259 | }
260 | }
261 | @-webkit-keyframes slideouttoright {
262 | from {
263 | -webkit-transform: translatex(0);
264 | }
265 | to {
266 | -webkit-transform: translatex(100%);
267 | }
268 | }
269 |
--------------------------------------------------------------------------------
/src/sidetap.min.js:
--------------------------------------------------------------------------------
1 | var __bind=function(a,b){return function(){return a.apply(b,arguments)}};this.SidetapStandard=function(){function a(){this.nav_toggle_complete=__bind(this.nav_toggle_complete,this),this.toggle_nav=__bind(this.toggle_nav,this),this.set_window_size=__bind(this.set_window_size,this),this.stp=this.detect_primary_element("sidetap"),this.stp_nav=this.detect_primary_element("stp-nav"),this.stp_content=this.detect_primary_element("stp-content"),this.full_heights=$(".stp-full-height"),this.set_up_observers()}return a.name="SidetapStandard",a.ios_5=!1,a.prototype.detect_primary_element=function(a){var b;return b=$("."+a),b.length>1&&typeof console!="undefined"&&console!==null&&console.warn('Sidetap: too many elements of class "'+a+'". There must be only one.'),b.addClass("stp-full-height"),b.first()},a.prototype.getScrollTop=function(){var a;return a=window.pageYOffset||document.compatMode==="CSS1Compat"&&document.documentElement.scrollTop||document.body.scrollTop||0},a.prototype.set_up_observers=function(){var a=this;return this.set_window_size(),$(window).resize(this.set_window_size),$(".nav-toggle").click(function(b){return a.toggle_nav(b)})},a.prototype.set_window_size=function(){return this.full_heights.css("minHeight",window.innerHeight),this.stp.hasClass("nav-showing")?this.set_nav_showing():this.set_nav_hiding()},a.prototype.toggle_nav=function(a){a!=null&&a.preventDefault(),this.stp_content.on("webkitAnimationEnd",this.nav_toggle_complete),this.stp.hasClass("nav-showing")?(this.stp_content.removeClass("showing-nav").addClass("hide-nav"),this.set_nav_hiding()):(this.stp_nav.show(),this.stp_content.removeClass("hide-nav").addClass("showing-nav"),this.set_nav_showing()),this.stp.toggleClass("nav-showing");if(this.ios_5)return this.address_bar_showing&&this.set_window_size(),window.scrollTo(0,1)},a.prototype.nav_toggle_complete=function(){this.stp_content.off("webkitAnimationEnd",this.nav_toggle_complete);if(!this.stp_content.hasClass("showing-nav"))return this.stp_nav.hide()},a.prototype.set_nav_showing=function(){return this.stp_nav.css("maxHeight","none"),this.stp_content.css("maxHeight",this.stp_nav.height())},a.prototype.set_nav_hiding=function(){return this.stp_content.css("maxHeight","none"),this.stp_nav.css("maxHeight",this.stp_content.height())},a.prototype.scroll_to=function(a){return $("body").scrollTop(a.offset().top-10)},a.prototype.show_section=function(a,b){b==null&&(b={}),this.stp_content.find(".stp-content-panel").not(".hidden").addClass("hidden"),a.removeClass("hidden").show();if(b.callback!=null)return b.callback.apply()},a}();var __bind=function(a,b){return function(){return a.apply(b,arguments)}},__hasProp={}.hasOwnProperty,__extends=function(a,b){function d(){this.constructor=a}for(var c in b)__hasProp.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};this.SidetapIos=function(a){function b(){this.in_from_left_complete=__bind(this.in_from_left_complete,this),this.in_from_right_complete=__bind(this.in_from_right_complete,this),this.down_from_top_complete=__bind(this.down_from_top_complete,this),this.up_from_bottom_complete=__bind(this.up_from_bottom_complete,this),this.set_window_size_2=__bind(this.set_window_size_2,this),$("body").addClass("ios"),this.ios_5=!0,b.__super__.constructor.call(this)}return __extends(b,a),b.name="SidetapIos",b.prototype.set_up_observers=function(){var a=this;return this.set_window_size(),$("header h1").click(function(b){return a.show_address_bar(b)}),$(window).on("orientationchange",function(b){return a.set_window_size(b)}),$(".nav-toggle").click(function(b){return a.toggle_nav(b)}),$("#stp-overlay").click(function(b){return a.toggle_nav(b)})},b.prototype.show_address_bar=function(a){return this.address_bar_showing=!0,this.full_heights.css("minHeight",160),setTimeout(this.set_window_size_2,1)},b.prototype.set_window_size=function(){return this.address_bar_showing=!1,$("body").css("paddingBottom","5000px"),window.scrollTo(0,1),setTimeout(this.set_window_size_2,50)},b.prototype.set_window_size_2=function(){return this.full_heights.css("minHeight",window.innerHeight),$("body").css("paddingBottom","0"),this.stp.hasClass("nav-showing")?this.set_nav_showing():this.set_nav_hiding()},b.prototype.scroll_to=function(a){var b,c,d;return d=a.parents(".stp-content-body").first(),c=d.scrollTop(),d.scrollTop(0),b=a.offset().top-98,d.scrollTop(c),d.stop().animate({scrollTop:b},"slow")},b.prototype.show_section=function(a,b){var c;return b==null&&(b={}),c=b.animation!=null?b.animation:"default",b.callback!=null&&(this.pending_callback=b.callback),c==="upfrombottom"?this.up_from_bottom(a):c==="downfromtop"?this.down_from_top(a):c==="infromright"?this.in_from_right(a):c==="infromleft"?this.in_from_left(a):(this.stp_content.find(".stp-content-panel").not(".hidden").addClass("hidden"),a.removeClass("hidden").show(),this.animation_callback())},b.prototype.up_from_bottom=function(a){return a.on("webkitAnimationEnd",this.up_from_bottom_complete).removeClass("hidden").addClass("up-from-bottom")},b.prototype.up_from_bottom_complete=function(){return this.slide_up_previous=$(".stp-content-panel").not(".up-from-bottom").addClass("hidden"),$(".up-from-bottom").off("webkitAnimationEnd",this.up_from_bottom_complete).removeClass("up-from-bottom"),this.animation_callback()},b.prototype.down_from_top=function(a){var b;return b=this.stp_content.find(".stp-content-panel").not(".hidden"),a.removeClass("hidden"),b.on("webkitAnimationEnd",this.down_from_top_complete).addClass("down-to-bottom")},b.prototype.down_from_top_complete=function(){var a;return a=$(".down-to-bottom"),a.off("webkitAnimationEnd",this.down_from_top_complete).removeClass("down-to-bottom").hide(),a.addClass("hidden").show(),this.animation_callback()},b.prototype.in_from_right=function(a){return $(".stp-content-panel").not(".hidden").addClass("slide-out-to-left"),a.on("webkitAnimationEnd",this.in_from_right_complete).removeClass("hidden").addClass("slide-in-from-right")},b.prototype.in_from_right_complete=function(){return $(".slide-out-to-left").addClass("hidden").removeClass("slide-out-to-left"),$(".slide-in-from-right").off("webkitAnimationEnd",this.in_from_right_complete).removeClass("slide-in-from-right"),this.animation_callback()},b.prototype.in_from_left=function(a){return $(".stp-content-panel").not(".hidden").addClass("slide-out-to-right"),a.on("webkitAnimationEnd",this.in_from_left_complete).removeClass("hidden").addClass("slide-in-from-left")},b.prototype.in_from_left_complete=function(){return $(".slide-out-to-right").removeClass("slide-out-to-right").addClass("hidden"),$(".slide-in-from-left").off("webkitAnimationEnd",this.in_from_left_complete).removeClass("slide-in-from-left"),this.animation_callback()},b.prototype.animation_callback=function(){return this.pending_callback&&this.pending_callback.call(),this.pending_callback=null},b}(SidetapStandard),this.sidetap=function(){var a;return a=window.SharedWorker&&navigator.userAgent.match(/^((?!android).)*webkit.*$/i),a?new SidetapIos:new SidetapStandard};
--------------------------------------------------------------------------------
/src/less/sidetap.less:
--------------------------------------------------------------------------------
1 | @nav_width: 272px;
2 |
3 | html, body {
4 | padding: 0;
5 | margin: 0;
6 | background: #E8E8E8;
7 | }
8 |
9 | .sidetap {
10 | position: relative;
11 | width: 100%;
12 | overflow: hidden;
13 | }
14 |
15 | .stp-nav {
16 | background: black;
17 | color: white;
18 | display: none;
19 | left: 0;
20 | position: absolute;
21 | top: 0;
22 | width: @nav_width;
23 | z-index: 5;
24 | }
25 |
26 | .stp-content {
27 | background: white;
28 | margin-left: 0;
29 | width: 100%;
30 | z-index: 10;
31 | position: relative;
32 | }
33 |
34 | .stp-overlay {
35 | background: blue;
36 | display: none;
37 | height: 100%;
38 | left: 0;
39 | opacity: .0;
40 | position: absolute;
41 | top: 0;
42 | width: 100%;
43 | }
44 |
45 | .stp-content-body > * > *:first-child {
46 | margin-top: 0;
47 | }
48 | .stp-content-body > * > *:last-child {
49 | margin-bottom: 0;
50 | }
51 |
52 | .sidetap.nav-showing .stp-content {
53 | overflow: hidden;
54 | position: absolute;
55 | top: 0;
56 | left: 0;
57 | box-shadow: 0px 0px 15px rgba(0,0,0,0.9);
58 | -webkit-box-shadow: 0px 0px 15px rgba(0,0,0,0.9);
59 | -moz-box-shadow: 0px 0px 15px rgba(0,0,0,0.9);
60 | }
61 | .sidetap.nav-showing .stp-overlay {
62 | display: block;
63 | z-index: 100;
64 | }
65 |
66 | .stp-content-panel, .stp-nav-panel {
67 | position: relative;
68 | height: 100%;
69 | }
70 | .stp-content-panel {
71 | background: white;
72 | }
73 | .stp-content-panel.hidden {
74 | display: none;
75 | }
76 |
77 | .stp-fake-header {
78 | position: absolute;
79 | top: 0;
80 | left: 0;
81 | z-index: 0;
82 | }
83 |
84 | .ios .sidetap {
85 | overflow-x: hidden;
86 | }
87 | .ios .stp-content-panel, .ios .stp-nav-panel {
88 | height: 100%;
89 | left: 0;
90 | position: absolute;
91 | top: 0;
92 | width: 100%;
93 | }
94 | .ios .stp-content-panel.hidden {
95 | display: block;
96 | left: -9999px;
97 | }
98 |
99 | .ios .stp-content-frame {
100 | height: 100%;
101 | overflow: auto;
102 | -webkit-overflow-scrolling: touch;
103 | position: relative;
104 | }
105 |
106 | .ios .stp-content-body {
107 | -webkit-transform: translateZ(0);
108 | position: absolute;
109 | left: 0;
110 | top: 0;
111 | height: 100%;
112 | -webkit-box-sizing: border-box;
113 | overflow: auto;
114 | -webkit-overflow-scrolling: touch;
115 | width: 100%;
116 | }
117 |
118 | .ios .nav-showing .stp-content .stp-content-body {
119 | overflow: hidden;
120 | }
121 |
122 | /*
123 | Show Navigation Animation
124 | */
125 | .showing-nav {
126 | -webkit-transform: translateX(@nav_width);
127 | -moz-transform: translateX(@nav_width);
128 | -webkit-animation-name: slidefornav;
129 | -moz-animation-name: slidefornav;
130 | -webkit-animation-timing-function: ease-out;
131 | -moz-animation-timing-function: ease-out;
132 | animation-timing-function: ease-out;
133 | -webkit-animation-duration: 175ms;
134 | -moz-animation-duration: 175ms;
135 | animation-duration: 175ms;
136 | }
137 |
138 | @-webkit-keyframes slidefornav {
139 | from {
140 | -webkit-transform: translateX(0);
141 | }
142 | to {
143 | -webkit-transform: translateX(@nav_width);
144 | }
145 | }
146 | @-moz-keyframes slidefornav {
147 | from {
148 | -moz-transform: translateX(0);
149 | }
150 | to {
151 | -moz-transform: translateX(@nav_width);
152 | }
153 | }
154 |
155 | /*
156 | Hide Navigation Animation
157 | */
158 | .hide-nav {
159 | -webkit-transform: translateX(0);
160 | -moz-transform: translateX(0);
161 | -webkit-animation-name: slideovernav;
162 | -moz-animation-name: slideovernav;
163 | -webkit-animation-timing-function: ease-out;
164 | -moz-animation-timing-function: ease-out;
165 | animation-timing-function: ease-out;
166 | -webkit-animation-duration: 175ms;
167 | -moz-animation-duration: 175ms;
168 | animation-duration: 175ms;
169 | }
170 |
171 | @-webkit-keyframes slideovernav {
172 | from {
173 | -webkit-transform: translateX(@nav_width);
174 | }
175 | to {
176 | -webkit-transform: translateX(0);
177 | }
178 | }
179 | @-moz-keyframes slideovernav {
180 | from {
181 | -moz-transform: translateX(@nav_width);
182 | }
183 | to {
184 | -moz-transform: translateX(0);
185 | }
186 | }
187 |
188 |
189 | /* Slide up or Down animation */
190 | .up-from-bottom {
191 | -webkit-transform: translateY(0);
192 | -moz-transform: translateY(0);
193 | -webkit-animation-name: upfrombottom;
194 | -moz-animation-name: upfrombottom;
195 | -webkit-animation-timing-function: ease-out;
196 | -moz-animation-timing-function: ease-out;
197 | -webkit-animation-duration: 250ms;
198 | -moz-animation-duration: 250ms;
199 | z-index: 5;
200 | }
201 | .down-to-bottom {
202 | -webkit-transform: translateY(100%);
203 | -moz-transform: translateY(100%);
204 | -webkit-animation-name: downtobottom;
205 | -moz-animation-name: downtobottom;
206 | -webkit-animation-timing-function: ease-out;
207 | -moz-animation-timing-function: ease-out;
208 | -webkit-animation-duration: 250ms;
209 | -moz-animation-duration: 250ms;
210 | z-index: 5;
211 | }
212 |
213 | @-webkit-keyframes upfrombottom {
214 | from {
215 | -webkit-transform: translateY(100%);
216 | }
217 | to {
218 | -webkit-transform: translateY(0);
219 | }
220 | }
221 | @-webkit-keyframes downtobottom {
222 | from {
223 | -webkit-transform: translateY(0);
224 | }
225 | to {
226 | -webkit-transform: translateY(100%);
227 | }
228 | }
229 |
230 | /*
231 | Sliding animations
232 | */
233 | .slide-out-to-left {
234 | -webkit-transform: translateX(-100%);
235 | -webkit-animation-name: slideouttoleft;
236 | }
237 |
238 | .slide-in-from-right {
239 | -webkit-transform: translateX(0);
240 | -webkit-animation-name: slideinfromright;
241 | }
242 |
243 | .slide-out-to-right {
244 | -webkit-transform: translateX(100%);
245 | -webkit-animation-name: slideouttoright;
246 | }
247 |
248 | .slide-in-from-left {
249 | -webkit-transform: translateX(0);
250 | -webkit-animation-name: slideinfromleft;
251 | }
252 | .slide-in-from-left, .slide-out-to-right, .slide-in-from-right, .slide-out-to-left {
253 | -webkit-animation-timing-function: ease-out;
254 | -webkit-animation-duration: 200ms;
255 | }
256 | @-webkit-keyframes slideinfromright {
257 | from { -webkit-transform: translateX(100%); }
258 | to { -webkit-transform: translateX(0); }
259 | }
260 |
261 | @-webkit-keyframes slideinfromleft {
262 | from { -webkit-transform: translateX(-100%); }
263 | to { -webkit-transform: translateX(0); }
264 | }
265 |
266 | @-webkit-keyframes slideouttoleft {
267 | from { -webkit-transform: translateX(0); }
268 | to { -webkit-transform: translateX(-100%); }
269 | }
270 |
271 | @-webkit-keyframes slideouttoright {
272 | from { -webkit-transform: translateX(0); }
273 | to { -webkit-transform: translateX(100%); }
274 | }
275 |
--------------------------------------------------------------------------------
/docs/style.css:
--------------------------------------------------------------------------------
1 | html, body, div, span, applet, object, iframe,
2 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3 | a, abbr, acronym, address, big, cite, code,
4 | del, dfn, em, img, ins, kbd, q, s, samp,
5 | small, strike, strong, sub, sup, tt, var,
6 | b, u, i, center,
7 | dl, dt, dd, ol, ul, li,
8 | fieldset, form, label, legend,
9 | table, caption, tbody, tfoot, thead, tr, th, td,
10 | article, aside, canvas, details, embed,
11 | figure, figcaption, footer, header, hgroup,
12 | menu, nav, output, ruby, section, summary,
13 | time, mark, audio, video {
14 | margin: 0;
15 | padding: 0;
16 | border: 0;
17 | font-size: 100%;
18 | font: inherit;
19 | vertical-align: baseline;
20 | }
21 |
22 | /* HTML5 display-role reset for older browsers */
23 | article, aside, details, figcaption, figure,
24 | footer, header, hgroup, menu, nav, section {
25 | display: block;
26 | }
27 | body {
28 | line-height: 1;
29 | }
30 | ol, ul {
31 | list-style: none;
32 | }
33 | blockquote, q {
34 | quotes: none;
35 | }
36 | blockquote:before, blockquote:after,
37 | q:before, q:after {
38 | content: '';
39 | content: none;
40 | }
41 | table {
42 | border-collapse: collapse;
43 | border-spacing: 0;
44 | }
45 |
46 |
47 | * {
48 | -moz-box-sizing: border-box;
49 | -webkit-box-sizing: border-box;
50 | -ms-box-sizing: border-box;
51 | box-sizing: border-box;
52 | }
53 |
54 | body {
55 | position: relative;
56 | width: 980px;
57 | padding: 50px 0 100px;
58 | margin: 0 auto;
59 |
60 | color: #bbb;
61 | font-size: 0.95em;
62 | font-family: Helvetica, Arial, sans-serif;
63 | line-height: 1.5em;
64 | text-shadow: 0 -2px 1px black;
65 | background: black url(black_bg.png) repeat;
66 | }
67 |
68 | a {
69 | color: #fff;
70 | border-bottom: 1px solid #fff;
71 | text-decoration: none;
72 | }
73 |
74 | a:hover, a:active, a:visited {
75 | color: #fff;
76 | text-decoration: none;
77 | border-bottom: none;
78 | }
79 |
80 | p {
81 | margin: 5px 0;
82 | }
83 |
84 | code {
85 | display: block;
86 | padding: 10px;
87 | margin: 10px 0 20px;
88 |
89 | -webkit-box-shadow: 0 0 1px rgba(255,255,255,0.3), inset 0 0 5px rgba(0,0,0,1.0);
90 | -moz-box-shadow: 0 0 1px rgba(255,255,255,0.3), inset 0 0 5px rgba(0,0,0,1.0);
91 | box-shadow: 0 0 1px rgba(255,255,255,0.3), inset 0 0 5px rgba(0,0,0,1.0);
92 | font-family: monospace;
93 |
94 | color: #faefff;
95 | background: rgb(41,44,64);
96 | background: rgba(255,255,255,0.15);
97 | }
98 |
99 | #demo {
100 | background: url(iphone.png) no-repeat;
101 | width: 410px;
102 | height: 782px;
103 | margin-left: -30px;
104 | padding: 149px 0 0 45px;
105 | position: absolute;
106 | top: 50px;
107 | right: 0;
108 | }
109 |
110 | header { padding-top: 10px; }
111 |
112 | h1 {
113 | overflow: hidden;
114 | height: 240px;
115 | margin: 0 auto 20px;
116 | width: 100%;
117 | max-width: 340px;
118 | text-indent: -999em;
119 | background: url(sidetap-logo.png) no-repeat;
120 | background-size: 100% auto;
121 | -moz-background-size: 100% auto;
122 | -o-background-size: 100% auto;
123 | -webkit-background-size: 100% auto;
124 | background-size: 100% auto;
125 | }
126 |
127 | .intro {
128 | font-size: 1.25em;
129 | line-height: 1.5em;
130 | color: #faefff;
131 | }
132 |
133 |
134 | h2 {
135 | border-top: 1px solid #333;
136 | font-size: 1.75em;
137 | margin: 30px 0 20px;
138 | padding: 30px 0 0 0;
139 | color: #cd7ef8;
140 | font-weight: bold;
141 | }
142 |
143 | h3 {
144 | color: #faefff;
145 | font-weight: bold;
146 | }
147 |
148 | dl {
149 | overflow: auto;
150 | margin-top: 1.5em;
151 | }
152 | dd {
153 | margin-bottom: 15px;
154 | }
155 | dt {
156 | clear: left;
157 | float: left;
158 | margin-right: 0.35em;
159 | color: #faefff;
160 | font-weight: bold;
161 | }
162 | dt::after {
163 | margin-left: 0.35em;
164 | content: '—';
165 | color: #888;
166 | }
167 |
168 | ol {
169 | list-style-type: decimal;
170 | }
171 |
172 | ol li {
173 | margin-bottom: 1em;
174 | }
175 |
176 | ol li li{
177 | margin-bottom: 0.25em;
178 | }
179 |
180 | ul {
181 | margin-top: 1em;
182 | list-style-type: circle;
183 | }
184 | ul li {
185 | margin-bottom: 1em;
186 | }
187 | b { font-weight: bold; }
188 |
189 | #sidetap-support-warning {
190 | border-top: 1px solid #333;
191 | margin: 30px 0 20px;
192 | padding-top: 30px;
193 | color: #FF0;
194 | }
195 | #sidetap-support-warning b { display: block; }
196 | .hidden {
197 | display: none;
198 | }
199 |
200 |
201 | #opening, #opening + h2 {
202 | width: 520px;
203 | }
204 |
205 | #sidetap_facts {
206 | list-style-type: none;
207 | }
208 |
209 | .built-by-harvest {
210 | margin: 135px 0 0 110px;
211 | font-size: .85em;
212 | }
213 |
214 | .button {
215 | background: #743f8d;
216 | color: #fff;
217 | display: block;
218 | margin: 35px 10px 0;
219 | padding: 15px;
220 | text-decoration: none;
221 | text-shadow: none;
222 | border-radius: 5px;
223 | text-align: center;
224 | border-bottom: 0;
225 | font-size: 1.1em;
226 | }
227 |
228 | #ipad_demo {
229 | background: url('ipad-demo-bg.png') no-repeat;
230 | width:320px;
231 | height: 482px;
232 | position: relative;
233 | padding-top: 180px;
234 | }
235 | #ipad_demo div {
236 | background: black;
237 | opacity: .7;
238 | width: 100%;
239 | height: 100%;
240 | position: absolute;
241 | top: 0; left: 0;
242 | z-index: 1;
243 | }
244 | #ipad_demo a {
245 | position: relative;
246 | z-index: 2;
247 | }
248 |
249 | /* Tweak navbar brand link to be super sleek
250 | -------------------------------------------------- */
251 | .oss-bar {
252 | top: 0;
253 | right: 20px;
254 | position: fixed;
255 | z-index: 1030;
256 | }
257 | .oss-bar ul {
258 | float: right;
259 | margin: 0;
260 | list-style: none;
261 | }
262 | .oss-bar ul li {
263 | float: left;
264 | line-height: 0;
265 | }
266 | .oss-bar ul li a {
267 | border: 0;
268 | margin-top: -10px;
269 | display: block;
270 | height: 58px;
271 | background: #F36C00 url(oss-credit.png) no-repeat 20px 22px;
272 | padding: 22px 20px 12px 20px;
273 | text-indent: 120%; /* stupid padding */
274 | white-space: nowrap;
275 | overflow: hidden;
276 | -webkit-transition: all 0.10s ease-in-out;
277 | -moz-transition: all 0.10s ease-in-out;
278 | transition: all 0.15s ease-in-out;
279 | }
280 | .oss-bar ul li a:hover {
281 | margin-top: 0px;
282 | }
283 | .oss-bar a.harvest {
284 | width: 196px;
285 | background-color: #F36C00;
286 | background-position: -142px 22px;
287 | padding-right: 22px; /* optical illusion */
288 | }
289 | .oss-bar a.fork {
290 | width: 162px;
291 | background-color: #333333;
292 | }
293 |
294 | @media screen and (min-width: 700px) {
295 | .sidetap-mobile-link {
296 | display: none;
297 | }
298 | }
299 |
300 | @media screen and (min-width: 700px) and (max-width: 970px) {
301 | .oss-bar { right: 0; }
302 | }
303 | @media screen and (max-width: 700px) {
304 | #demo { display: none; }
305 | #opening, #opening + h2 { width: 100%; }
306 | body { width: 100%; padding: 0 25px 25px; }
307 | h2 { line-height: 1.25em; margin: 30px 0 10px;}
308 | .oss-bar { display: none; }
309 | }
310 | @media screen and (max-width: 340px) {
311 | h1 { height: 190px; }
312 | }
313 |
--------------------------------------------------------------------------------
/src/theme/default/default.less:
--------------------------------------------------------------------------------
1 | /* Reset */
2 | html, body, div, span, applet, object, iframe,
3 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
4 | a, abbr, acronym, address, big, cite, code,
5 | del, dfn, em, img, ins, kbd, q, s, samp,
6 | small, strike, strong, sub, sup, tt, var,
7 | b, u, i, center,
8 | dl, dt, dd, ol, ul, li,
9 | fieldset, form, label, legend, input, textarea, button,
10 | table, caption, tbody, tfoot, thead, tr, th, td,
11 | article, aside, canvas, details, embed,
12 | figure, figcaption, footer, header, hgroup,
13 | menu, nav, output, ruby, section, summary,
14 | time, mark, audio, video {
15 | border: 0;
16 | font-size: 100%;
17 | font-family: inherit;
18 | margin: 0;
19 | padding: 0;
20 | }
21 | article, aside, details, figcaption, figure,
22 | footer, header, hgroup, menu, nav, section {
23 | display: block;
24 | }
25 | ol, ul {
26 | list-style: none;
27 | }
28 | blockquote, q {
29 | quotes: none;
30 | }
31 | blockquote:before, blockquote:after,
32 | q:before, q:after {
33 | content: "";
34 | content: none;
35 | }
36 | table {
37 | border-collapse: collapse;
38 | border-spacing: 0;
39 | }
40 |
41 |
42 |
43 | @bg-color: #171a21;
44 |
45 |
46 | /*
47 | Sidetap Default Theme
48 | Demo app: Stonehenge
49 | */
50 | body {
51 | background: @bg-color;
52 | color: #fff;
53 | font-family: 'Helvetica Neue', 'Helvetica-Neue', 'HelveticaNeue', Helvetica, Arial, sans-serif;
54 | font-size: 1em;
55 | font-weight: normal;
56 | text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
57 | word-wrap: break-word;
58 | -webkit-text-size-adjust: none;
59 | }
60 |
61 | h1 {
62 | color: white;
63 | font-size: 20px;
64 | font-weight: bold;
65 | line-height: 42px;
66 | }
67 |
68 | a {
69 | color: #9e6ab7;
70 | }
71 | .button {
72 | background: #743f8d;
73 | color: #fff;
74 | display: block;
75 | margin: 0 10px;
76 | padding: 15px;
77 | text-decoration: none;
78 | text-shadow: none;
79 | -webkit-border-radius: 5px;
80 | -moz-border-radius: 5px;
81 | -o-border-radius: 5px;
82 | border-radius: 5px;
83 | }
84 |
85 | img {
86 | max-width: 100%;
87 | }
88 |
89 |
90 |
91 | .stp-nav {
92 | background: #101318;
93 | border-right: 1px solid black;
94 | width: 272px;
95 | }
96 | nav {
97 | display: block;
98 | > a {
99 | border-bottom: 1px solid rgba(255, 255, 255, 0.05);
100 | color: rgba(255, 255, 255, 0.8);
101 | display: block;
102 | font-size: 17px;
103 | font-weight: bold;
104 | height: 42px;
105 | line-height: 40px;
106 | margin: 0;
107 | padding: 0 0 0 10px;
108 | position: relative;
109 | text-decoration: none;
110 | &:after {
111 | background: transparent url('img/arrow-right-white.png') no-repeat left center;
112 | content: ' ';
113 | display: block;
114 | height: 41px;
115 | opacity: 0.3;
116 | position: absolute;
117 | -webkit-transform: translateZ(0);
118 | -moz-transform: translateZ(0);
119 | -o-transform: translateZ(0);
120 | transform: translateZ(0);
121 | right: 0;
122 | top: 0;
123 | width: 19px;
124 | -webkit-background-size: 19px 14px;
125 | -moz-background-size: 19px 14px;
126 | -o-background-size: 19px 14px;
127 | background-size: 19px 14px;
128 | }
129 | &.selected {
130 | background: rgba(255,255,255,0.1);
131 | border-bottom: 1px solid rgba(255, 255, 255, 0);
132 | color: white;
133 | &:after {
134 | opacity: 1;
135 | }
136 | }
137 | }
138 | }
139 |
140 |
141 |
142 | header {
143 | background: #532667;
144 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #743f8d), color-stop(100%, #532667));
145 | background: -webkit-linear-gradient(top, #743f8d, #532667);
146 | background: -moz-linear-gradient(top, #743f8d, #532667);
147 | background: -o-linear-gradient(top, #743f8d, #532667);
148 | background: linear-gradient(top, #743f8d, #532667);
149 | border-bottom: 1px solid #281730;
150 | color: white;
151 | display: block;
152 | height: 43px;
153 | position: absolute;
154 | -webkit-transform: translateZ(0);
155 | -moz-transform: translateZ(0);
156 | -o-transform: translateZ(0);
157 | transform: translateZ(0);
158 | text-align: center;
159 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
160 | width: 100%;
161 | z-index: 1;
162 | -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.2), 0px 1px 5px rgba(0, 0, 0, 0.75);
163 | -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.2), 0px 1px 5px rgba(0, 0, 0, 0.75);
164 | -o-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.2), 0px 1px 5px rgba(0, 0, 0, 0.75);
165 | box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.2), 0px 1px 5px rgba(0, 0, 0, 0.75);
166 | .header-button {
167 | background: #472457;
168 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #66337c), color-stop(100%, #472457));
169 | background: -webkit-linear-gradient(top, #66337c, #472457);
170 | background: -moz-linear-gradient(top, #66337c, #472457);
171 | background: -o-linear-gradient(top, #66337c, #472457);
172 | background: linear-gradient(top, #66337c, #472457);
173 | border: 1px solid #32163d;
174 | color: white;
175 | font-size: 13px;
176 | font-weight: bold;
177 | height: 28px;
178 | left: 5px;
179 | line-height: 26px;
180 | padding: 0 8px;
181 | position: absolute;
182 | -webkit-transform: translateZ(0);
183 | -moz-transform: translateZ(0);
184 | -o-transform: translateZ(0);
185 | transform: translateZ(0);
186 | text-decoration: none;
187 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
188 | top: 7px;
189 | -webkit-border-radius: 5px;
190 | -moz-border-radius: 5px;
191 | -o-border-radius: 5px;
192 | border-radius: 5px;
193 | -webkit-box-shadow: inset 0 2px 2px rgba(0,0,0,0.15), 0 1px 0 rgba(255, 255, 255, 0.15);
194 | -moz-box-shadow: inset 0 2px 2px rgba(0,0,0,0.15), 0 1px 0 rgba(255, 255, 255, 0.15);
195 | -o-box-shadow: inset 0 2px 2px rgba(0,0,0,0.15), 0 1px 0 rgba(255, 255, 255, 0.15);
196 | box-shadow: inset 0 2px 2px rgba(0,0,0,0.15), 0 1px 0 rgba(255, 255, 255, 0.15);
197 | &.right {
198 | left: auto;
199 | right: 5px;
200 | }
201 | &.icon span {
202 | display: inline-block;
203 | text-indent: -9999px;
204 | }
205 | &.menu span {
206 | background: transparent url('img/menu.png') no-repeat;
207 | height: 15px;
208 | margin: 6px 2px 0;
209 | width: 17px;
210 | -webkit-background-size: 17px 15px;
211 | -moz-background-size: 17px 15px;
212 | -o-background-size: 17px 15px;
213 | background-size: 17px 15px;
214 | }
215 | &.info span {
216 | background: transparent url('img/info.png') no-repeat;
217 | height: 17px;
218 | margin: 5px 5px 0;
219 | width: 8px;
220 | -webkit-background-size: 8px 17px;
221 | -moz-background-size: 8px 17px;
222 | -o-background-size: 8px 17px;
223 | background-size: 8px 17px;
224 | }
225 | }
226 | }
227 |
228 |
229 |
230 | .stp-content {
231 | background: @bg-color;
232 | -webkit-box-sizing: border-box;
233 | -moz-box-sizing: border-box;
234 | -o-box-sizing: border-box;
235 | box-sizing: border-box;
236 | }
237 | .stp-content-panel {
238 | background: @bg-color;
239 | }
240 | .container {
241 | padding: 54px 10px 10px;
242 | }
--------------------------------------------------------------------------------
/src/theme/default/default.css:
--------------------------------------------------------------------------------
1 | /* Reset */
2 | html,
3 | body,
4 | div,
5 | span,
6 | applet,
7 | object,
8 | iframe,
9 | h1,
10 | h2,
11 | h3,
12 | h4,
13 | h5,
14 | h6,
15 | p,
16 | blockquote,
17 | pre,
18 | a,
19 | abbr,
20 | acronym,
21 | address,
22 | big,
23 | cite,
24 | code,
25 | del,
26 | dfn,
27 | em,
28 | img,
29 | ins,
30 | kbd,
31 | q,
32 | s,
33 | samp,
34 | small,
35 | strike,
36 | strong,
37 | sub,
38 | sup,
39 | tt,
40 | var,
41 | b,
42 | u,
43 | i,
44 | center,
45 | dl,
46 | dt,
47 | dd,
48 | ol,
49 | ul,
50 | li,
51 | fieldset,
52 | form,
53 | label,
54 | legend,
55 | input,
56 | textarea,
57 | button,
58 | table,
59 | caption,
60 | tbody,
61 | tfoot,
62 | thead,
63 | tr,
64 | th,
65 | td,
66 | article,
67 | aside,
68 | canvas,
69 | details,
70 | embed,
71 | figure,
72 | figcaption,
73 | footer,
74 | header,
75 | hgroup,
76 | menu,
77 | nav,
78 | output,
79 | ruby,
80 | section,
81 | summary,
82 | time,
83 | mark,
84 | audio,
85 | video {
86 | border: 0;
87 | font-size: 100%;
88 | font-family: inherit;
89 | margin: 0;
90 | padding: 0;
91 | }
92 | article,
93 | aside,
94 | details,
95 | figcaption,
96 | figure,
97 | footer,
98 | header,
99 | hgroup,
100 | menu,
101 | nav,
102 | section {
103 | display: block;
104 | }
105 | ol,
106 | ul {
107 | list-style: none;
108 | }
109 | blockquote,
110 | q {
111 | quotes: none;
112 | }
113 | blockquote:before,
114 | blockquote:after,
115 | q:before,
116 | q:after {
117 | content: "";
118 | content: none;
119 | }
120 | table {
121 | border-collapse: collapse;
122 | border-spacing: 0;
123 | }
124 | /*
125 | Sidetap Default Theme
126 | Demo app: Stonehenge
127 | */
128 | body {
129 | background: #171a21;
130 | color: #fff;
131 | font-family: 'Helvetica Neue', 'Helvetica-Neue', 'HelveticaNeue', Helvetica, Arial, sans-serif;
132 | font-size: 1em;
133 | font-weight: normal;
134 | text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
135 | word-wrap: break-word;
136 | -webkit-text-size-adjust: none;
137 | }
138 | h1 {
139 | color: white;
140 | font-size: 20px;
141 | font-weight: bold;
142 | line-height: 42px;
143 | }
144 | a {
145 | color: #9e6ab7;
146 | }
147 | .button {
148 | background: #743f8d;
149 | color: #fff;
150 | display: block;
151 | margin: 0 10px;
152 | padding: 15px;
153 | text-decoration: none;
154 | text-shadow: none;
155 | -webkit-border-radius: 5px;
156 | -moz-border-radius: 5px;
157 | -o-border-radius: 5px;
158 | border-radius: 5px;
159 | }
160 | img {
161 | max-width: 100%;
162 | }
163 | .stp-nav {
164 | background: #101318;
165 | border-right: 1px solid black;
166 | width: 272px;
167 | }
168 | nav {
169 | display: block;
170 | }
171 | nav > a {
172 | border-bottom: 1px solid rgba(255, 255, 255, 0.05);
173 | color: rgba(255, 255, 255, 0.8);
174 | display: block;
175 | font-size: 17px;
176 | font-weight: bold;
177 | height: 42px;
178 | line-height: 40px;
179 | margin: 0;
180 | padding: 0 0 0 10px;
181 | position: relative;
182 | text-decoration: none;
183 | }
184 | nav > a:after {
185 | background: transparent url('img/arrow-right-white.png') no-repeat left center;
186 | content: ' ';
187 | display: block;
188 | height: 41px;
189 | opacity: 0.3;
190 | position: absolute;
191 | -webkit-transform: translatez(0);
192 | -moz-transform: translatez(0);
193 | -o-transform: translatez(0);
194 | transform: translatez(0);
195 | right: 0;
196 | top: 0;
197 | width: 19px;
198 | -webkit-background-size: 19px 14px;
199 | -moz-background-size: 19px 14px;
200 | -o-background-size: 19px 14px;
201 | background-size: 19px 14px;
202 | }
203 | nav > a.selected {
204 | background: rgba(255, 255, 255, 0.1);
205 | border-bottom: 1px solid rgba(255, 255, 255, 0);
206 | color: white;
207 | }
208 | nav > a.selected:after {
209 | opacity: 1;
210 | }
211 | header {
212 | background: #532667;
213 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #743f8d), color-stop(100%, #532667));
214 | background: -webkit-linear-gradient(top, #743f8d, #532667);
215 | background: -moz-linear-gradient(top, #743f8d, #532667);
216 | background: -o-linear-gradient(top, #743f8d, #532667);
217 | background: linear-gradient(top, #743f8d, #532667);
218 | border-bottom: 1px solid #281730;
219 | color: white;
220 | display: block;
221 | height: 43px;
222 | position: absolute;
223 | -webkit-transform: translatez(0);
224 | -moz-transform: translatez(0);
225 | -o-transform: translatez(0);
226 | transform: translatez(0);
227 | text-align: center;
228 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
229 | width: 100%;
230 | z-index: 1;
231 | -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.2), 0px 1px 5px rgba(0, 0, 0, 0.75);
232 | -moz-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.2), 0px 1px 5px rgba(0, 0, 0, 0.75);
233 | -o-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.2), 0px 1px 5px rgba(0, 0, 0, 0.75);
234 | box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.2), 0px 1px 5px rgba(0, 0, 0, 0.75);
235 | }
236 | header .header-button {
237 | background: #472457;
238 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #66337c), color-stop(100%, #472457));
239 | background: -webkit-linear-gradient(top, #66337c, #472457);
240 | background: -moz-linear-gradient(top, #66337c, #472457);
241 | background: -o-linear-gradient(top, #66337c, #472457);
242 | background: linear-gradient(top, #66337c, #472457);
243 | border: 1px solid #32163d;
244 | color: white;
245 | font-size: 13px;
246 | font-weight: bold;
247 | height: 28px;
248 | left: 5px;
249 | line-height: 26px;
250 | padding: 0 8px;
251 | position: absolute;
252 | -webkit-transform: translatez(0);
253 | -moz-transform: translatez(0);
254 | -o-transform: translatez(0);
255 | transform: translatez(0);
256 | text-decoration: none;
257 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
258 | top: 7px;
259 | -webkit-border-radius: 5px;
260 | -moz-border-radius: 5px;
261 | -o-border-radius: 5px;
262 | border-radius: 5px;
263 | -webkit-box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.15);
264 | -moz-box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.15);
265 | -o-box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.15);
266 | box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.15), 0 1px 0 rgba(255, 255, 255, 0.15);
267 | }
268 | header .header-button.right {
269 | left: auto;
270 | right: 5px;
271 | }
272 | header .header-button.icon span {
273 | display: inline-block;
274 | text-indent: -9999px;
275 | }
276 | header .header-button.menu span {
277 | background: transparent url('img/menu.png') no-repeat;
278 | height: 15px;
279 | margin: 6px 2px 0;
280 | width: 17px;
281 | -webkit-background-size: 17px 15px;
282 | -moz-background-size: 17px 15px;
283 | -o-background-size: 17px 15px;
284 | background-size: 17px 15px;
285 | }
286 | header .header-button.info span {
287 | background: transparent url('img/info.png') no-repeat;
288 | height: 17px;
289 | margin: 5px 5px 0;
290 | width: 8px;
291 | -webkit-background-size: 8px 17px;
292 | -moz-background-size: 8px 17px;
293 | -o-background-size: 8px 17px;
294 | background-size: 8px 17px;
295 | }
296 | .stp-content {
297 | background: #171a21;
298 | -webkit-box-sizing: border-box;
299 | -moz-box-sizing: border-box;
300 | -o-box-sizing: border-box;
301 | box-sizing: border-box;
302 | }
303 | .stp-content-panel {
304 | background: #171a21;
305 | }
306 | .container {
307 | padding: 54px 10px 10px;
308 | }
309 |
--------------------------------------------------------------------------------
/src/sidetap.js:
--------------------------------------------------------------------------------
1 | var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
2 |
3 | this.SidetapStandard = (function() {
4 |
5 | SidetapStandard.name = 'SidetapStandard';
6 |
7 | SidetapStandard.ios_5 = false;
8 |
9 | function SidetapStandard() {
10 | this.nav_toggle_complete = __bind(this.nav_toggle_complete, this);
11 |
12 | this.toggle_nav = __bind(this.toggle_nav, this);
13 |
14 | this.set_window_size = __bind(this.set_window_size, this);
15 | this.stp = this.detect_primary_element("sidetap");
16 | this.stp_nav = this.detect_primary_element("stp-nav");
17 | this.stp_content = this.detect_primary_element("stp-content");
18 | this.full_heights = $(".stp-full-height");
19 | this.set_up_observers();
20 | }
21 |
22 | SidetapStandard.prototype.detect_primary_element = function(css_class) {
23 | var el;
24 | el = $("." + css_class);
25 | if (el.length > 1) {
26 | if (typeof console !== "undefined" && console !== null) {
27 | console.warn("Sidetap: too many elements of class \"" + css_class + "\". There must be only one.");
28 | }
29 | }
30 | el.addClass("stp-full-height");
31 | return el.first();
32 | };
33 |
34 | SidetapStandard.prototype.getScrollTop = function() {
35 | var scrollTop;
36 | return scrollTop = window.pageYOffset || document.compatMode === "CSS1Compat" && document.documentElement.scrollTop || document.body.scrollTop || 0;
37 | };
38 |
39 | SidetapStandard.prototype.set_up_observers = function() {
40 | var _this = this;
41 | this.set_window_size();
42 | $(window).resize(this.set_window_size);
43 | return $(".nav-toggle").click(function(evt) {
44 | return _this.toggle_nav(evt);
45 | });
46 | };
47 |
48 | SidetapStandard.prototype.set_window_size = function() {
49 | this.full_heights.css("minHeight", window.innerHeight);
50 | if (this.stp.hasClass("nav-showing")) {
51 | return this.set_nav_showing();
52 | } else {
53 | return this.set_nav_hiding();
54 | }
55 | };
56 |
57 | SidetapStandard.prototype.toggle_nav = function(e) {
58 | if (e != null) {
59 | e.preventDefault();
60 | }
61 | this.stp_content.on("webkitAnimationEnd", this.nav_toggle_complete);
62 | if (this.stp.hasClass("nav-showing")) {
63 | this.stp_content.removeClass("showing-nav").addClass("hide-nav");
64 | this.set_nav_hiding();
65 | } else {
66 | this.stp_nav.show();
67 | this.stp_content.removeClass("hide-nav").addClass("showing-nav");
68 | this.set_nav_showing();
69 | }
70 | this.stp.toggleClass("nav-showing");
71 | if (this.ios_5) {
72 | if (this.address_bar_showing) {
73 | this.set_window_size();
74 | }
75 | return window.scrollTo(0, 1);
76 | }
77 | };
78 |
79 | SidetapStandard.prototype.nav_toggle_complete = function() {
80 | this.stp_content.off("webkitAnimationEnd", this.nav_toggle_complete);
81 | if (!this.stp_content.hasClass("showing-nav")) {
82 | return this.stp_nav.hide();
83 | }
84 | };
85 |
86 | SidetapStandard.prototype.set_nav_showing = function() {
87 | this.stp_nav.css("maxHeight", "none");
88 | return this.stp_content.css("maxHeight", this.stp_nav.height());
89 | };
90 |
91 | SidetapStandard.prototype.set_nav_hiding = function() {
92 | this.stp_content.css("maxHeight", "none");
93 | return this.stp_nav.css("maxHeight", this.stp_content.height());
94 | };
95 |
96 | SidetapStandard.prototype.scroll_to = function(element) {
97 | return $("body").scrollTop(element.offset().top - 10);
98 | };
99 |
100 | SidetapStandard.prototype.show_section = function(element, options) {
101 | if (options == null) {
102 | options = {};
103 | }
104 | this.stp_content.find(".stp-content-panel").not(".hidden").addClass("hidden");
105 | element.removeClass("hidden").show();
106 | if (options.callback != null) {
107 | return options.callback.apply();
108 | }
109 | };
110 |
111 | return SidetapStandard;
112 |
113 | })();
114 |
115 | var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
116 | __hasProp = {}.hasOwnProperty,
117 | __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
118 |
119 | this.SidetapIos = (function(_super) {
120 |
121 | __extends(SidetapIos, _super);
122 |
123 | SidetapIos.name = 'SidetapIos';
124 |
125 | function SidetapIos() {
126 | this.in_from_left_complete = __bind(this.in_from_left_complete, this);
127 |
128 | this.in_from_right_complete = __bind(this.in_from_right_complete, this);
129 |
130 | this.down_from_top_complete = __bind(this.down_from_top_complete, this);
131 |
132 | this.up_from_bottom_complete = __bind(this.up_from_bottom_complete, this);
133 |
134 | this.set_window_size_2 = __bind(this.set_window_size_2, this);
135 | $("body").addClass("ios");
136 | this.ios_5 = true;
137 | SidetapIos.__super__.constructor.call(this);
138 | }
139 |
140 | SidetapIos.prototype.set_up_observers = function() {
141 | var _this = this;
142 | this.set_window_size();
143 | $("header h1").click(function(evt) {
144 | return _this.show_address_bar(evt);
145 | });
146 | $(window).on("orientationchange", function(evt) {
147 | return _this.set_window_size(evt);
148 | });
149 | $(".nav-toggle").click(function(evt) {
150 | return _this.toggle_nav(evt);
151 | });
152 | return $("#stp-overlay").click(function(evt) {
153 | return _this.toggle_nav(evt);
154 | });
155 | };
156 |
157 | SidetapIos.prototype.show_address_bar = function(evt) {
158 | this.address_bar_showing = true;
159 | this.full_heights.css("minHeight", 160);
160 | return setTimeout(this.set_window_size_2, 1);
161 | };
162 |
163 | SidetapIos.prototype.set_window_size = function() {
164 | this.address_bar_showing = false;
165 | $("body").css("paddingBottom", "5000px");
166 | window.scrollTo(0, 1);
167 | return setTimeout(this.set_window_size_2, 50);
168 | };
169 |
170 | SidetapIos.prototype.set_window_size_2 = function() {
171 | this.full_heights.css("minHeight", window.innerHeight);
172 | $("body").css("paddingBottom", "0");
173 | if (this.stp.hasClass("nav-showing")) {
174 | return this.set_nav_showing();
175 | } else {
176 | return this.set_nav_hiding();
177 | }
178 | };
179 |
180 | SidetapIos.prototype.scroll_to = function(element) {
181 | var offset, oldscrolltop, parent;
182 | parent = element.parents(".stp-content-body").first();
183 | oldscrolltop = parent.scrollTop();
184 | parent.scrollTop(0);
185 | offset = element.offset().top - 98;
186 | parent.scrollTop(oldscrolltop);
187 | return parent.stop().animate({
188 | scrollTop: offset
189 | }, "slow");
190 | };
191 |
192 | SidetapIos.prototype.show_section = function(element, options) {
193 | var animation;
194 | if (options == null) {
195 | options = {};
196 | }
197 | animation = options.animation != null ? options.animation : "default";
198 | if (options.callback != null) {
199 | this.pending_callback = options.callback;
200 | }
201 | if (animation === "upfrombottom") {
202 | return this.up_from_bottom(element);
203 | } else if (animation === "downfromtop") {
204 | return this.down_from_top(element);
205 | } else if (animation === "infromright") {
206 | return this.in_from_right(element);
207 | } else if (animation === "infromleft") {
208 | return this.in_from_left(element);
209 | } else {
210 | this.stp_content.find(".stp-content-panel").not(".hidden").addClass("hidden");
211 | element.removeClass("hidden").show();
212 | return this.animation_callback();
213 | }
214 | };
215 |
216 | SidetapIos.prototype.up_from_bottom = function(element) {
217 | return element.on("webkitAnimationEnd", this.up_from_bottom_complete).removeClass("hidden").addClass("up-from-bottom");
218 | };
219 |
220 | SidetapIos.prototype.up_from_bottom_complete = function() {
221 | this.slide_up_previous = $(".stp-content-panel").not(".up-from-bottom").addClass("hidden");
222 | $(".up-from-bottom").off("webkitAnimationEnd", this.up_from_bottom_complete).removeClass("up-from-bottom");
223 | return this.animation_callback();
224 | };
225 |
226 | SidetapIos.prototype.down_from_top = function(element) {
227 | var slide_down;
228 | slide_down = this.stp_content.find(".stp-content-panel").not(".hidden");
229 | element.removeClass("hidden");
230 | return slide_down.on("webkitAnimationEnd", this.down_from_top_complete).addClass("down-to-bottom");
231 | };
232 |
233 | SidetapIos.prototype.down_from_top_complete = function() {
234 | var slide_down;
235 | slide_down = $(".down-to-bottom");
236 | slide_down.off("webkitAnimationEnd", this.down_from_top_complete).removeClass("down-to-bottom").hide();
237 | slide_down.addClass("hidden").show();
238 | return this.animation_callback();
239 | };
240 |
241 | SidetapIos.prototype.in_from_right = function(element) {
242 | $(".stp-content-panel").not(".hidden").addClass("slide-out-to-left");
243 | return element.on("webkitAnimationEnd", this.in_from_right_complete).removeClass("hidden").addClass("slide-in-from-right");
244 | };
245 |
246 | SidetapIos.prototype.in_from_right_complete = function() {
247 | $(".slide-out-to-left").addClass("hidden").removeClass("slide-out-to-left");
248 | $(".slide-in-from-right").off("webkitAnimationEnd", this.in_from_right_complete).removeClass("slide-in-from-right");
249 | return this.animation_callback();
250 | };
251 |
252 | SidetapIos.prototype.in_from_left = function(element) {
253 | $(".stp-content-panel").not(".hidden").addClass("slide-out-to-right");
254 | return element.on("webkitAnimationEnd", this.in_from_left_complete).removeClass("hidden").addClass("slide-in-from-left");
255 | };
256 |
257 | SidetapIos.prototype.in_from_left_complete = function() {
258 | $(".slide-out-to-right").removeClass("slide-out-to-right").addClass("hidden");
259 | $(".slide-in-from-left").off("webkitAnimationEnd", this.in_from_left_complete).removeClass("slide-in-from-left");
260 | return this.animation_callback();
261 | };
262 |
263 | SidetapIos.prototype.animation_callback = function() {
264 | if (this.pending_callback) {
265 | this.pending_callback.call();
266 | }
267 | return this.pending_callback = null;
268 | };
269 |
270 | return SidetapIos;
271 |
272 | })(SidetapStandard);
273 |
274 | /*
275 | Constructor function for Sidetap
276 | */
277 |
278 | this.sidetap = function() {
279 | var ios5;
280 | ios5 = window.SharedWorker && navigator.userAgent.match(/^((?!android).)*webkit.*$/i);
281 | if (ios5) {
282 | return new SidetapIos();
283 | } else {
284 | return new SidetapStandard();
285 | }
286 | };
287 |
--------------------------------------------------------------------------------
/lib/harvey.js:
--------------------------------------------------------------------------------
1 | // Generated by CoffeeScript 1.3.1
2 |
3 | /*
4 |
5 | Harvey stateManager — Copyright (c) 2012 Joschka Kintscher
6 | */
7 |
8 |
9 | (function() {
10 | var State, _mediaQueryList,
11 | __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
12 |
13 | this.Harvey = (function() {
14 |
15 | Harvey.name = 'Harvey';
16 |
17 | function Harvey() {}
18 |
19 | Harvey.states = {};
20 |
21 | Harvey.queries = [];
22 |
23 | /*
24 | Creates a new State object for the given media query using the passed hash
25 | of callbacks and stores it in @states. The passed hash may contain up to
26 | three callbacks. See documentation of the State class for more information.
27 | */
28 |
29 |
30 | Harvey.attach = function(mediaQuery, callbacks) {
31 | var state;
32 | if (!this.states.hasOwnProperty(mediaQuery)) {
33 | this.states[mediaQuery] = [];
34 | this._add_css_for(mediaQuery);
35 | }
36 | state = new State(mediaQuery, callbacks != null ? callbacks.setup : void 0, callbacks != null ? callbacks.on : void 0, callbacks != null ? callbacks.off : void 0);
37 | this.states[mediaQuery].push(state);
38 | if (__indexOf.call(this.queries, mediaQuery) < 0) {
39 | this._watch_query(mediaQuery);
40 | }
41 | if (this._window_matchmedia(mediaQuery).matches) {
42 | this._update_states([state], true);
43 | }
44 | return state;
45 | };
46 |
47 | /*
48 | Removes a given State object from the @states hash.
49 |
50 | @param object state A valid state object
51 | */
52 |
53 |
54 | Harvey.detach = function(state) {
55 | var i, s, _i, _len, _ref, _results;
56 | _ref = this.states[state.condition];
57 | _results = [];
58 | for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
59 | s = _ref[i];
60 | if (state === s) {
61 | _results.push(this.states[s.condition][i] = void 0);
62 | } else {
63 | _results.push(void 0);
64 | }
65 | }
66 | return _results;
67 | };
68 |
69 | /*
70 | Create a new matchMediaListener for the passed media query.
71 |
72 | @param string mediaQuery A valid CSS media query to watch
73 | */
74 |
75 |
76 | Harvey._watch_query = function(mediaQuery) {
77 | var _this = this;
78 | this.queries.push(mediaQuery);
79 | return this._window_matchmedia(mediaQuery).addListener(function(mql) {
80 | return _this._update_states(_this.states[mediaQuery], mql.matches);
81 | });
82 | };
83 |
84 | /*
85 | Activates/Deactivates every State object in the passed list.
86 |
87 | @param array states A list of State objects to update
88 | @param boolean active Whether to activate or deactivate the given states
89 | */
90 |
91 |
92 | Harvey._update_states = function(states, active) {
93 | var state, _i, _len, _results;
94 | _results = [];
95 | for (_i = 0, _len = states.length; _i < _len; _i++) {
96 | state = states[_i];
97 | if (active) {
98 | _results.push(state.activate());
99 | } else {
100 | _results.push(state.deactivate());
101 | }
102 | }
103 | return _results;
104 | };
105 |
106 | /*
107 | BEWARE: You're at the edge of the map, mate. Here there be monsters!
108 |
109 | ------------------------------------------------------------------------------------
110 |
111 | Private methods to fix and polyfill the matchMedia interface for several engines
112 |
113 | * Inspired by Nicholas C. Zakas' article on the different problems with matchMedia
114 | http://www.nczonline.net/blog/2012/01/19/css-media-queries-in-javascript-part-2/
115 |
116 | * Implementing a modified coffeescript version of Paul Irish's matchMedia.js polyfill
117 | https://github.com/paulirish/matchMedia.js
118 | */
119 |
120 |
121 | /*
122 | [FIX] for Firefox/Gecko browsers that lose reference to the
123 | MediaQueryList object unless it's being stored for runtime.
124 | */
125 |
126 |
127 | Harvey._mediaList = {};
128 |
129 | /*
130 | @param string mediaQuery A valid CSS media query to monitor for updates
131 | @Return object MediaQueryList Depending on the browser and matchMedia support either a native
132 | mediaQueryList object or an instance of _mediaQueryList
133 | */
134 |
135 |
136 | Harvey._window_matchmedia = function(mediaQuery) {
137 | if (window.matchMedia) {
138 | if (!(mediaQuery in this._mediaList)) {
139 | this._mediaList[mediaQuery] = window.matchMedia(mediaQuery);
140 | }
141 | return this._mediaList[mediaQuery];
142 | }
143 | /*
144 | [POLYFILL] for all browsers that don't support matchMedia() at all (CSS media query support
145 | is still mandatory though).
146 | */
147 |
148 | if (!this._listening) {
149 | this._listen();
150 | }
151 | if (!(mediaQuery in this._mediaList)) {
152 | this._mediaList[mediaQuery] = new _mediaQueryList(mediaQuery);
153 | }
154 | return this._mediaList[mediaQuery];
155 | };
156 |
157 | /*
158 | Add resize and orientationChange event listeners to the window element
159 | to monitor updates to the viewport
160 | */
161 |
162 |
163 | Harvey._listen = function() {
164 | var evt,
165 | _this = this;
166 | evt = window.addEventListener || window.attachEvent;
167 | evt('resize', function() {
168 | var mediaList, mediaQuery, _ref, _results;
169 | _ref = _this._mediaList;
170 | _results = [];
171 | for (mediaQuery in _ref) {
172 | mediaList = _ref[mediaQuery];
173 | _results.push(mediaList._process());
174 | }
175 | return _results;
176 | });
177 | evt('orientationChange', function() {
178 | var mediaList, mediaQuery, _ref, _results;
179 | _ref = _this._mediaList;
180 | _results = [];
181 | for (mediaQuery in _ref) {
182 | mediaList = _ref[mediaQuery];
183 | _results.push(mediaList._process());
184 | }
185 | return _results;
186 | });
187 | return this._listening = true;
188 | };
189 |
190 | /*
191 | [FIX] for Webkit engines that only trigger the MediaQueryListListener
192 | when there is at least one CSS selector for the respective media query
193 |
194 | @param string MediaQuery The media query to inject CSS for
195 | */
196 |
197 |
198 | Harvey._add_css_for = function(mediaQuery) {
199 | if (!this.style) {
200 | this.style = document.createElement('style');
201 | document.getElementsByTagName('head')[0].appendChild(this.style);
202 | }
203 | return this.style.appendChild(document.createTextNode("@media " + mediaQuery + " {.harvey-test{}}"));
204 | };
205 |
206 | return Harvey;
207 |
208 | })();
209 |
210 | /*
211 | A State allows to execute a set of callbacks for the given valid CSS media query.
212 |
213 | Callbacks are executed in the context of their state object to allow access to the
214 | corresponding media query of the State.
215 |
216 | States are not exposed to the global namespace. They can be used by calling the
217 | static Harvey.attach() and Harvey.detach() methods.
218 | */
219 |
220 |
221 | State = (function() {
222 |
223 | State.name = 'State';
224 |
225 | State.prototype.active = false;
226 |
227 | State.prototype.is_setup = false;
228 |
229 | /*
230 | Creates a new State object
231 |
232 | @param string condition The media query to check for
233 | @param function setup Called the first time `condition` becomes valid
234 | @param function on Called every time `condition` becomes valid
235 | @param function off Called every time `condition` becomes invalid
236 | */
237 |
238 |
239 | function State(condition, setup, on, off) {
240 | this.condition = condition;
241 | this.setup = setup;
242 | this.on = on;
243 | this.off = off;
244 | }
245 |
246 | /*
247 | Activate this State object if it is currently deactivated. Also perform all
248 | set up tasks if this is the first time the State is activated
249 | */
250 |
251 |
252 | State.prototype.activate = function() {
253 | if (this.active) {
254 | return;
255 | }
256 | if (!this.is_setup) {
257 | if (typeof this.setup === "function") {
258 | this.setup();
259 | }
260 | this.is_setup = true;
261 | }
262 | if (typeof this.on === "function") {
263 | this.on();
264 | }
265 | return this.active = true;
266 | };
267 |
268 | /*
269 | Deactive this State object if it is currently active
270 | */
271 |
272 |
273 | State.prototype.deactivate = function() {
274 | if (!this.active) {
275 | return;
276 | }
277 | if (typeof this.off === "function") {
278 | this.off();
279 | }
280 | return this.active = false;
281 | };
282 |
283 | return State;
284 |
285 | })();
286 |
287 | /*
288 | [FIX] simple implemenation of the matchMedia interface to mimic the native
289 | matchMedia interface behaviour to work as a polyfill for Harvey
290 | */
291 |
292 |
293 | _mediaQueryList = (function() {
294 |
295 | _mediaQueryList.name = '_mediaQueryList';
296 |
297 | /*
298 | Creates a new _mediaQueryList object
299 |
300 | @param string media A valid CSS media query
301 | */
302 |
303 |
304 | function _mediaQueryList(media) {
305 | this.media = media;
306 | this._listeners = [];
307 | this.matches = this._matches();
308 | }
309 |
310 | /*
311 | Add a new listener to this mediaQueryList that will be called every time
312 | the media query becomes valid
313 | */
314 |
315 |
316 | _mediaQueryList.prototype.addListener = function(listener) {
317 | this._listeners.push(listener);
318 | return;
319 | };
320 |
321 | /*
322 | Evaluate the media query of this mediaQueryList object and notify
323 | all registered listeners if the state has changed
324 | */
325 |
326 |
327 | _mediaQueryList.prototype._process = function() {
328 | var callback, current, _i, _len, _ref, _results;
329 | current = this._matches();
330 | if (this.matches === current) {
331 | return;
332 | }
333 | this.matches = current;
334 | _ref = this._listeners;
335 | _results = [];
336 | for (_i = 0, _len = _ref.length; _i < _len; _i++) {
337 | callback = _ref[_i];
338 | _results.push(callback(this));
339 | }
340 | return _results;
341 | };
342 |
343 | /*
344 | Check whether the media query is currently valid
345 | */
346 |
347 |
348 | _mediaQueryList.prototype._matches = function() {
349 | if (!this._tester) {
350 | this._get_tester();
351 | }
352 | this._tester.innerHTML = '';
353 | this._tester.removeChild(this._tester.firstChild);
354 | return this._tester.offsetWidth === 42;
355 | };
356 |
357 | /*
358 | Retrieve the element to test the media query on from the DOM or create
359 | it if it has not been injected into the page yet
360 | */
361 |
362 |
363 | _mediaQueryList.prototype._get_tester = function() {
364 | this._tester = document.getElementById('harvey-mq-test');
365 | if (!this._tester) {
366 | return this._build_tester();
367 | }
368 | };
369 |
370 | /*
371 | Create a new div with a unique id, move it outsite of the viewport and inject it into the DOM.
372 | This element will be used to check whether the registered media query is currently valid.
373 | */
374 |
375 |
376 | _mediaQueryList.prototype._build_tester = function() {
377 | this._tester = document.createElement('div');
378 | this._tester.id = 'harvey-mq-test';
379 | this._tester.style.cssText = 'position:absolute;top:-100em';
380 | return document.body.insertBefore(this._tester, document.body.firstChild);
381 | };
382 |
383 | return _mediaQueryList;
384 |
385 | })();
386 |
387 | }).call(this);
--------------------------------------------------------------------------------
/demo/stonehenge/assets/js/images.js:
--------------------------------------------------------------------------------
1 | images = {
2 | "On Stage": [
3 | { "id": "4172377589", "owner": "65279339@N00", "title": "Steve Morse of Deep Purple in Concert in Oslo, Norway", "ownername": "trondjs", "url_s": "http:\/\/farm3.staticflickr.com\/2492\/4172377589_0d80cea942_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2492\/4172377589_0d80cea942_z.jpg" },
4 | { "id": "5164712933", "owner": "33062170@N08", "title": "iPod Shuffle - The Rocker", "ownername": "Hotpix [LRPS]", "url_s": "http:\/\/farm5.staticflickr.com\/4103\/5164712933_2092d773d4_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4103\/5164712933_2092d773d4_z.jpg" },
5 | { "id": "2920005317", "owner": "87919923@N00", "title": "She Rokks!", "ownername": "danorbit.", "url_s": "http:\/\/farm4.staticflickr.com\/3061\/2920005317_4d29ec9e3e_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3061\/2920005317_4d29ec9e3e_z.jpg" },
6 | { "id": "275872814", "owner": "84904577@N00", "title": "Obsolete", "ownername": "Luke Sharrett", "url_s": "http:\/\/farm1.staticflickr.com\/79\/275872814_6b28a651ba_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/79\/275872814_6b28a651ba_z.jpg" },
7 | { "id": "4156434172", "owner": "65279339@N00", "title": "Deep Purple on Stage in Oslo, Norway", "ownername": "trondjs", "url_s": "http:\/\/farm3.staticflickr.com\/2777\/4156434172_9beb648202_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2777\/4156434172_9beb648202_z.jpg" },
8 | { "id": "2200831532", "owner": "18219153@N03", "title": "Cello in the dome", "ownername": "Katka S.", "url_s": "http:\/\/farm3.staticflickr.com\/2275\/2200831532_db4eda2136_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2275\/2200831532_db4eda2136_z.jpg" },
9 | { "id": "2043963036", "owner": "16761280@N00", "title": "Band in silhouette", "ownername": "Matthew Field", "url_s": "http:\/\/farm3.staticflickr.com\/2062\/2043963036_d2a33b401d_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2062\/2043963036_d2a33b401d_z.jpg" },
10 | { "id": "201065805", "owner": "13908767@N00", "title": "Ian Gillan from Deep Purple", "ownername": "guenterleitenbauer", "url_s": "http:\/\/farm1.staticflickr.com\/40\/201065805_65f93c7e8c_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/40\/201065805_65f93c7e8c_z.jpg" },
11 | { "id": "131976647", "owner": "63258132@N00", "title": "Theatre of Tragedy - Nell Sigland", "ownername": "Jeronimo's Eye", "url_s": "http:\/\/farm1.staticflickr.com\/52\/131976647_b82d691910_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/52\/131976647_b82d691910_z.jpg" },
12 | { "id": "2922995315", "owner": "91614180@N00", "title": "The Kooks @ the Pageant -- 2008.10.07", "ownername": "Todd | ishootshows.com", "url_s": "http:\/\/farm4.staticflickr.com\/3220\/2922995315_b4c86bebc4_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3220\/2922995315_b4c86bebc4_z.jpg" },
13 | { "id": "2557394070", "owner": "26289027@N05", "title": "Steve Morse - Deep Purple", "ownername": "Rogerio Stella", "url_s": "http:\/\/farm4.staticflickr.com\/3099\/2557394070_af0d2d792c_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3099\/2557394070_af0d2d792c_z.jpg" },
14 | { "id": "5035236584", "owner": "48031716@N03", "title": "no dream is small <3", "ownername": "Misconception Photography", "url_s": "http:\/\/farm5.staticflickr.com\/4127\/5035236584_2380bf67da_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4127\/5035236584_2380bf67da_z.jpg" },
15 | { "id": "201072654", "owner": "13908767@N00", "title": "Steve Morse", "ownername": "guenterleitenbauer", "url_s": "http:\/\/farm1.staticflickr.com\/64\/201072654_035a581e9e_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/64\/201072654_035a581e9e_z.jpg" },
16 | { "id": "200836918", "owner": "13908767@N00", "title": "Steve Morse from Deep Purple", "ownername": "guenterleitenbauer", "url_s": "http:\/\/farm1.staticflickr.com\/77\/200836918_32abc9ac33_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/77\/200836918_32abc9ac33_z.jpg" },
17 | { "id": "2556583503", "owner": "26289027@N05", "title": "Ian Paice - Deep Purple", "ownername": "Rogerio Stella", "url_s": "http:\/\/farm4.staticflickr.com\/3025\/2556583503_212fa8c9a3_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3025\/2556583503_212fa8c9a3_z.jpg" },
18 | { "id": "2556569309", "owner": "26289027@N05", "title": "Roger Glover & Steve Morse - Deep Purple", "ownername": "Rogerio Stella", "url_s": "http:\/\/farm4.staticflickr.com\/3093\/2556569309_8580261abc_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3093\/2556569309_8580261abc_z.jpg" },
19 | { "id": "5369873180", "owner": "37239976@N03", "title": "Accept @ Elysée Montmartre, Paris 18-01-2011", "ownername": "Hugues-Oc", "url_s": "http:\/\/farm6.staticflickr.com\/5204\/5369873180_985252ccc4_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5204\/5369873180_985252ccc4_z.jpg" },
20 | { "id": "6707916993", "owner": "41253971@N04", "title": "dementia", "ownername": "eXeperience photography", "url_s": "http:\/\/farm8.staticflickr.com\/7156\/6707916993_51c212309e_s.jpg", "url_z": "http:\/\/farm8.staticflickr.com\/7156\/6707916993_51c212309e_z.jpg" },
21 | { "id": "2756441079", "owner": "32329639@N00", "title": "Dave Matthews, Mile High Music Festival", "ownername": "Alias Rex", "url_s": "http:\/\/farm4.staticflickr.com\/3045\/2756441079_9ff7ce5b38_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3045\/2756441079_9ff7ce5b38_z.jpg" },
22 | { "id": "134949570", "owner": "63258132@N00", "title": "Theatre of Tragedy - nell sigland", "ownername": "Jeronimo's Eye", "url_s": "http:\/\/farm1.staticflickr.com\/53\/134949570_e13b38e0de_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/53\/134949570_e13b38e0de_z.jpg" },
23 | { "id": "2557391472", "owner": "26289027@N05", "title": "Roger Glover - Deep Purple", "ownername": "Rogerio Stella", "url_s": "http:\/\/farm4.staticflickr.com\/3147\/2557391472_1bfdb9b0db_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3147\/2557391472_1bfdb9b0db_z.jpg" },
24 | { "id": "201072659", "owner": "13908767@N00", "title": "Steve Morse", "ownername": "guenterleitenbauer", "url_s": "http:\/\/farm1.staticflickr.com\/76\/201072659_c4c4228cc5_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/76\/201072659_c4c4228cc5_z.jpg" },
25 | { "id": "201065804", "owner": "13908767@N00", "title": "Deep Purple in Wiesen 2006", "ownername": "guenterleitenbauer", "url_s": "http:\/\/farm1.staticflickr.com\/60\/201065804_515d3e60df_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/60\/201065804_515d3e60df_z.jpg" },
26 | { "id": "4631403479", "owner": "65279339@N00", "title": "Glenn Hughes live in Trondheim, Norway", "ownername": "trondjs", "url_s": "http:\/\/farm5.staticflickr.com\/4032\/4631403479_350d0fa831_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4032\/4631403479_350d0fa831_z.jpg" },
27 | { "id": "500726645", "owner": "33335685@N00", "title": "Paul Gilbert and his band", "ownername": "buschenhenke", "url_s": "http:\/\/farm1.staticflickr.com\/228\/500726645_3061e681ca_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/228\/500726645_3061e681ca_z.jpg" },
28 | { "id": "5369871222", "owner": "37239976@N03", "title": "Accept @ Elysée Montmartre, Paris 18-01-2011", "ownername": "Hugues-Oc", "url_s": "http:\/\/farm6.staticflickr.com\/5084\/5369871222_74e0c35eed_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5084\/5369871222_74e0c35eed_z.jpg" },
29 | { "id": "5824090553", "owner": "7209528@N03", "title": "DEEP PURPLE Live in CYPRUS", "ownername": "mpalis", "url_s": "http:\/\/farm3.staticflickr.com\/2450\/5824090553_8b7d7ccf96_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2450\/5824090553_8b7d7ccf96_z.jpg" },
30 | { "id": "2773956846", "owner": "23766778@N00", "title": "Róisín's Purple Hat", "ownername": "Amici del giovedì (e della topa)", "url_s": "http:\/\/farm4.staticflickr.com\/3286\/2773956846_247cf0c2b3_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3286\/2773956846_247cf0c2b3_z.jpg" },
31 | { "id": "5369873498", "owner": "37239976@N03", "title": "Accept @ Elysée Montmartre, Paris 18-01-2011", "ownername": "Hugues-Oc", "url_s": "http:\/\/farm6.staticflickr.com\/5084\/5369873498_8aedf9ff1c_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5084\/5369873498_8aedf9ff1c_z.jpg" },
32 | { "id": "4618824327", "owner": "26544582@N02", "title": "• Mastodon • San Diego, CA • May 5th 2010", "ownername": "FalkPhotoDesign", "url_s": "http:\/\/farm4.staticflickr.com\/3325\/4618824327_3930554f59_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3325\/4618824327_3930554f59_z.jpg" },
33 | { "id": "3933217709", "owner": "68629006@N00", "title": "", "ownername": "beesquare", "url_s": "http:\/\/farm3.staticflickr.com\/2577\/3933217709_882e5382a4_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2577\/3933217709_882e5382a4_z.jpg" },
34 | { "id": "6419173839", "owner": "48311841@N08", "title": "The stage, Deep Purple", "ownername": "stumbler71", "url_s": "http:\/\/farm8.staticflickr.com\/7142\/6419173839_e63db2f8ff_s.jpg", "url_z": "http:\/\/farm8.staticflickr.com\/7142\/6419173839_e63db2f8ff_z.jpg" }
35 | ],
36 | "Goes to 11": [
37 | { "id": "453669135", "owner": "7716944@N02", "title": "my fender guitar amp", "ownername": "tigrshark105", "url_s": "http:\/\/farm1.staticflickr.com\/230\/453669135_f46afe7db9_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/230\/453669135_f46afe7db9_z.jpg" },
38 | { "id": "3554002238", "owner": "49766127@N00", "title": "guitar & amp pr0n", "ownername": "Marco Raaphorst", "url_s": "http:\/\/farm4.staticflickr.com\/3335\/3554002238_2d26bf4ee8_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3335\/3554002238_2d26bf4ee8_z.jpg" },
39 | { "id": "2066521416", "owner": "87169328@N00", "title": "Guitar Amp", "ownername": "Akira Ohgaki", "url_s": "http:\/\/farm3.staticflickr.com\/2204\/2066521416_7df2f6cc7c_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2204\/2066521416_7df2f6cc7c_z.jpg" },
40 | { "id": "5000169345", "owner": "28807741@N02", "title": "Guitar & amp", "ownername": "frenchkriss", "url_s": "http:\/\/farm5.staticflickr.com\/4151\/5000169345_ef89f6eab2_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4151\/5000169345_ef89f6eab2_z.jpg" },
41 | { "id": "4961270956", "owner": "53653425@N04", "title": "Guitar Amp", "ownername": "aguycalledalan", "url_s": "http:\/\/farm5.staticflickr.com\/4113\/4961270956_bdca410c6f_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4113\/4961270956_bdca410c6f_z.jpg" },
42 | { "id": "5097296093", "owner": "52183187@N05", "title": "Fender Guitar Amp", "ownername": "petece.", "url_s": "http:\/\/farm5.staticflickr.com\/4090\/5097296093_06da31a84c_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4090\/5097296093_06da31a84c_z.jpg" },
43 | { "id": "3300476299", "owner": "33309260@N08", "title": "Guitar amp", "ownername": "Johannah G", "url_s": "http:\/\/farm4.staticflickr.com\/3207\/3300476299_7a4b81fd79_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3207\/3300476299_7a4b81fd79_z.jpg" },
44 | { "id": "2820821687", "owner": "28201168@N06", "title": "Guitar Amp", "ownername": "rockmixer", "url_s": "http:\/\/farm4.staticflickr.com\/3200\/2820821687_806a50d436_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3200\/2820821687_806a50d436_z.jpg" },
45 | { "id": "6813378949", "owner": "74307891@N02", "title": "Guitar Amp", "ownername": "Thiago LR Lopes", "url_s": "http:\/\/farm8.staticflickr.com\/7020\/6813378949_295c04fdf1_s.jpg", "url_z": "http:\/\/farm8.staticflickr.com\/7020\/6813378949_295c04fdf1_z.jpg" },
46 | { "id": "1528220826", "owner": "35987294@N00", "title": "Chico Bear, Fender Telecaster guitar & Amp", "ownername": "Jpl3k - JonathanL25", "url_s": "http:\/\/farm3.staticflickr.com\/2263\/1528220826_0009ff2ea2_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2263\/1528220826_0009ff2ea2_z.jpg" },
47 | { "id": "4546416325", "owner": "86955657@N00", "title": "Guitar & Amp", "ownername": "Christopher Craig", "url_s": "http:\/\/farm5.staticflickr.com\/4046\/4546416325_8b5b8cc8bb_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4046\/4546416325_8b5b8cc8bb_z.jpg" },
48 | { "id": "186777184", "owner": "73525491@N00", "title": "guitar and amp", "ownername": "black_crimson", "url_s": "http:\/\/farm1.staticflickr.com\/78\/186777184_3cd76a1afc_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/78\/186777184_3cd76a1afc_z.jpg" },
49 | { "id": "464287185", "owner": "10297020@N00", "title": "My Guitar", "ownername": "Rawli", "url_s": "http:\/\/farm1.staticflickr.com\/222\/464287185_efbe0274fd_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/222\/464287185_efbe0274fd_z.jpg" },
50 | { "id": "4435201921", "owner": "11407696@N06", "title": "Amp", "ownername": "Sebastian B-B", "url_s": "http:\/\/farm5.staticflickr.com\/4004\/4435201921_891343f93e_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4004\/4435201921_891343f93e_z.jpg" },
51 | { "id": "310974547", "owner": "38589608@N00", "title": "Marshall Guitar Amp", "ownername": "..Stimpson", "url_s": "http:\/\/farm1.staticflickr.com\/119\/310974547_3cde437a8f_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/119\/310974547_3cde437a8f_z.jpg" },
52 | { "id": "404988808", "owner": "88402779@N00", "title": "converse, guitar, amp combo", "ownername": "edswain", "url_s": "http:\/\/farm1.staticflickr.com\/173\/404988808_6bb2d2359a_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/173\/404988808_6bb2d2359a_z.jpg" },
53 | { "id": "5185486120", "owner": "55182004@N04", "title": "Amp", "ownername": "karsten1605", "url_s": "http:\/\/farm2.staticflickr.com\/1039\/5185486120_1cfcff0fc3_s.jpg", "url_z": "http:\/\/farm2.staticflickr.com\/1039\/5185486120_1cfcff0fc3_z.jpg" },
54 | { "id": "6750496621", "owner": "73872777@N03", "title": "Preamp Tubes of Carvin V3 (Guitar Amp)", "ownername": "devkoDE", "url_s": "http:\/\/farm8.staticflickr.com\/7008\/6750496621_0d397a925a_s.jpg", "url_z": "http:\/\/farm8.staticflickr.com\/7008\/6750496621_0d397a925a_z.jpg" },
55 | { "id": "5185692624", "owner": "55182004@N04", "title": "Amp 2", "ownername": "karsten1605", "url_s": "http:\/\/farm2.staticflickr.com\/1005\/5185692624_0aaacbe6b6_s.jpg", "url_z": "http:\/\/farm2.staticflickr.com\/1005\/5185692624_0aaacbe6b6_z.jpg" },
56 | { "id": "2466449340", "owner": "29965134@N00", "title": "Guitar and Amp", "ownername": "Jabzg", "url_s": "http:\/\/farm3.staticflickr.com\/2401\/2466449340_ecea7b760e_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2401\/2466449340_ecea7b760e_z.jpg" },
57 | { "id": "4002355054", "owner": "80384851@N00", "title": "hughes kettner guitar amp", "ownername": "loop_oh", "url_s": "http:\/\/farm3.staticflickr.com\/2422\/4002355054_092ba971b8_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2422\/4002355054_092ba971b8_z.jpg" },
58 | { "id": "5543695594", "owner": "86613970@N00", "title": "Guitar and amp", "ownername": "Tim G (catching up)", "url_s": "http:\/\/farm6.staticflickr.com\/5295\/5543695594_52aeb75ea7_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5295\/5543695594_52aeb75ea7_z.jpg" },
59 | { "id": "3371929776", "owner": "72248790@N00", "title": "Firefly Tube Amp", "ownername": "Tim Patterson", "url_s": "http:\/\/farm4.staticflickr.com\/3571\/3371929776_b857156d85_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3571\/3371929776_b857156d85_z.jpg" },
60 | { "id": "3371111143", "owner": "72248790@N00", "title": "Firefly Tube Amp", "ownername": "Tim Patterson", "url_s": "http:\/\/farm4.staticflickr.com\/3556\/3371111143_c03f60f24b_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3556\/3371111143_c03f60f24b_z.jpg" },
61 | { "id": "3263916059", "owner": "17106526@N00", "title": "Guitar Store", "ownername": "hey mr glen", "url_s": "http:\/\/farm1.staticflickr.com\/248\/3263916059_8f1a7187d0_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/248\/3263916059_8f1a7187d0_z.jpg" },
62 | { "id": "5490123047", "owner": "57717242@N07", "title": "Project 365:60 \"My Kat's Amp\"", "ownername": "Oscar Camejo (Oscar Spearman Photography)", "url_s": "http:\/\/farm6.staticflickr.com\/5260\/5490123047_70049e8c23_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5260\/5490123047_70049e8c23_z.jpg" },
63 | { "id": "2425036321", "owner": "14671651@N06", "title": "marshall amp", "ownername": "alana_hodgson", "url_s": "http:\/\/farm4.staticflickr.com\/3245\/2425036321_0fbb71bdfa_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3245\/2425036321_0fbb71bdfa_z.jpg" },
64 | { "id": "4178349424", "owner": "41831207@N02", "title": "fender guitar & amp", "ownername": "lynn.h.armstrong", "url_s": "http:\/\/farm3.staticflickr.com\/2524\/4178349424_c42bbda287_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2524\/4178349424_c42bbda287_z.jpg" },
65 | { "id": "5753382292", "owner": "51076543@N04", "title": "guitar.", "ownername": "ashlee hutchinson", "url_s": "http:\/\/farm6.staticflickr.com\/5225\/5753382292_d8c42c443c_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5225\/5753382292_d8c42c443c_z.jpg" },
66 | { "id": "4178349752", "owner": "41831207@N02", "title": "fender guitar & amp", "ownername": "lynn.h.armstrong", "url_s": "http:\/\/farm3.staticflickr.com\/2642\/4178349752_7504c838d3_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2642\/4178349752_7504c838d3_z.jpg" },
67 | { "id": "4354035536", "owner": "46328300@N04", "title": "music", "ownername": "heartbroken_raindrops", "url_s": "http:\/\/farm5.staticflickr.com\/4048\/4354035536_874ee6f9c6_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4048\/4354035536_874ee6f9c6_z.jpg" },
68 | { "id": "6098133910", "owner": "47821015@N00", "title": "D'artagnan Junior Vibrochief guitar amp", "ownername": "johnnyh", "url_s": "http:\/\/farm7.staticflickr.com\/6088\/6098133910_f820b326e3_s.jpg", "url_z": "http:\/\/farm7.staticflickr.com\/6088\/6098133910_f820b326e3_z.jpg" }
69 | ],
70 | "Drum Sets": [
71 | { "id": "5788086816", "owner": "53218809@N04", "title": "Jericho siren", "ownername": "rectangulART", "url_s": "http:\/\/farm4.staticflickr.com\/3653\/5788086816_f11787c8cf_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3653\/5788086816_f11787c8cf_z.jpg" },
72 | { "id": "5788275724", "owner": "53218809@N04", "title": "Destiny", "ownername": "rectangulART", "url_s": "http:\/\/farm3.staticflickr.com\/2366\/5788275724_225108e990_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2366\/5788275724_225108e990_z.jpg" },
73 | { "id": "3647809386", "owner": "39648894@N05", "title": "Mapex Orion 8-Piece Drum Set Batterie - Mega Drums Deal - $5,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3397\/3647809386_04f4af0f65_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3397\/3647809386_04f4af0f65_z.jpg" },
74 | { "id": "3647806678", "owner": "39648894@N05", "title": "Mapex Orion 8-Piece Drum Set Batterie - Mega Drums Deal - $5,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3390\/3647806678_6d8844857e_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3390\/3647806678_6d8844857e_z.jpg" },
75 | { "id": "5965288630", "owner": "53218809@N04", "title": "Heavy metal thunder", "ownername": "rectangulART", "url_s": "http:\/\/farm7.staticflickr.com\/6133\/5965288630_3494c3a72c_s.jpg", "url_z": "http:\/\/farm7.staticflickr.com\/6133\/5965288630_3494c3a72c_z.jpg" },
76 | { "id": "3647808754", "owner": "39648894@N05", "title": "Mapex Orion 8-Piece Drum Set Batterie - Mega Drums Deal - $5,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3633\/3647808754_0bec0f9546_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3633\/3647808754_0bec0f9546_z.jpg" },
77 | { "id": "5809329741", "owner": "53218809@N04", "title": "Duallist", "ownername": "rectangulART", "url_s": "http:\/\/farm6.staticflickr.com\/5182\/5809329741_fa2b8f8eb9_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5182\/5809329741_fa2b8f8eb9_z.jpg" },
78 | { "id": "3647000857", "owner": "39648894@N05", "title": "Mapex Orion 8-Piece Drum Set Batterie - Mega Drums Deal - $5,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3394\/3647000857_ec9242e1ed_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3394\/3647000857_ec9242e1ed_z.jpg" },
79 | { "id": "3647808496", "owner": "39648894@N05", "title": "Mapex Orion 8-Piece Drum Set Batterie - Mega Drums Deal - $5,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3335\/3647808496_015e752831_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3335\/3647808496_015e752831_z.jpg" },
80 | { "id": "859983195", "owner": "50811886@N00", "title": "All set for launch", "ownername": "warrenski", "url_s": "http:\/\/farm2.staticflickr.com\/1247\/859983195_228498ced8_s.jpg", "url_z": "http:\/\/farm2.staticflickr.com\/1247\/859983195_228498ced8_z.jpg" },
81 | { "id": "3647810934", "owner": "39648894@N05", "title": "Mapex Orion 4-Piece Rock-style Drum Set Batterie - $3,000", "ownername": "think_drums", "url_s": "http:\/\/farm3.staticflickr.com\/2438\/3647810934_cac8b7140e_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2438\/3647810934_cac8b7140e_z.jpg" },
82 | { "id": "3760057756", "owner": "38259292@N05", "title": "My Girlfriend....", "ownername": "Jesse Danger", "url_s": "http:\/\/farm3.staticflickr.com\/2629\/3760057756_8fed8017e7_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2629\/3760057756_8fed8017e7_z.jpg" },
83 | { "id": "3647006999", "owner": "39648894@N05", "title": "Mapex Orion 4-Piece Rock-style Drum Set Batterie - $3,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3649\/3647006999_5e3150e715_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3649\/3647006999_5e3150e715_z.jpg" },
84 | { "id": "3647006643", "owner": "39648894@N05", "title": "Mapex Orion 4-Piece Rock-style Drum Set Batterie - $3,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3370\/3647006643_babe3e194d_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3370\/3647006643_babe3e194d_z.jpg" },
85 | { "id": "5333922526", "owner": "53218809@N04", "title": "Battle cry", "ownername": "rectangulART", "url_s": "http:\/\/farm6.staticflickr.com\/5207\/5333922526_16cbf6c257_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5207\/5333922526_16cbf6c257_z.jpg" },
86 | { "id": "3647007201", "owner": "39648894@N05", "title": "Mapex Orion 4-Piece Rock-style Drum Set Batterie - $3,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3364\/3647007201_1ec96405c8_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3364\/3647007201_1ec96405c8_z.jpg" },
87 | { "id": "1819558842", "owner": "94527539@N00", "title": "Drum Set", "ownername": "WHOATEMYBLOG", "url_s": "http:\/\/farm3.staticflickr.com\/2031\/1819558842_170cd80eaf_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2031\/1819558842_170cd80eaf_z.jpg" },
88 | { "id": "468506009", "owner": "7356573@N08", "title": "Pearl Export DB", "ownername": "hnlgoldman", "url_s": "http:\/\/farm1.staticflickr.com\/210\/468506009_a1eda08193_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/210\/468506009_a1eda08193_z.jpg" },
89 | { "id": "3647006149", "owner": "39648894@N05", "title": "Mapex Orion 4-Piece Jazz-style Drum Set Batterie - NEW - $2,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3636\/3647006149_8628263d59_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3636\/3647006149_8628263d59_z.jpg" },
90 | { "id": "3647006309", "owner": "39648894@N05", "title": "Mapex Orion 4-Piece Jazz-style Drum Set Batterie - NEW - $2,000", "ownername": "think_drums", "url_s": "http:\/\/farm4.staticflickr.com\/3619\/3647006309_92569f14aa_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3619\/3647006309_92569f14aa_z.jpg" },
91 | { "id": "4503746580", "owner": "34084339@N00", "title": "Music and wine", "ownername": "paolg2002", "url_s": "http:\/\/farm3.staticflickr.com\/2703\/4503746580_611754187f_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2703\/4503746580_611754187f_z.jpg" },
92 | { "id": "4503747418", "owner": "34084339@N00", "title": "Ready for the music", "ownername": "paolg2002", "url_s": "http:\/\/farm5.staticflickr.com\/4027\/4503747418_f5f45c5e7e_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4027\/4503747418_f5f45c5e7e_z.jpg" },
93 | { "id": "4503748374", "owner": "34084339@N00", "title": "Trumpet", "ownername": "paolg2002", "url_s": "http:\/\/farm5.staticflickr.com\/4015\/4503748374_6a75264a4a_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4015\/4503748374_6a75264a4a_z.jpg" },
94 | { "id": "3423050559", "owner": "37262844@N08", "title": "double-bass-drum-set.jpg", "ownername": "songinth8", "url_s": "http:\/\/farm4.staticflickr.com\/3573\/3423050559_f560d36d65_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3573\/3423050559_f560d36d65_z.jpg" },
95 | { "id": "5918509930", "owner": "53218809@N04", "title": "Altar of the gods", "ownername": "rectangulART", "url_s": "http:\/\/farm7.staticflickr.com\/6006\/5918509930_a5d60e8f1e_s.jpg", "url_z": "http:\/\/farm7.staticflickr.com\/6006\/5918509930_a5d60e8f1e_z.jpg" },
96 | { "id": "5671858140", "owner": "18713525@N00", "title": "119\/365 - 29\/04\/11", "ownername": "oana-emilia", "url_s": "http:\/\/farm6.staticflickr.com\/5304\/5671858140_32472c51f8_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5304\/5671858140_32472c51f8_z.jpg" },
97 | { "id": "5439966734", "owner": "13684459@N00", "title": "My Drums", "ownername": "bengagnon", "url_s": "http:\/\/farm5.staticflickr.com\/4150\/5439966734_4d7ce48e8f_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4150\/5439966734_4d7ce48e8f_z.jpg" },
98 | { "id": "5190472063", "owner": "53218809@N04", "title": "Krakatoa", "ownername": "rectangulART", "url_s": "http:\/\/farm5.staticflickr.com\/4107\/5190472063_0ae373c34f_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4107\/5190472063_0ae373c34f_z.jpg" },
99 | { "id": "5167357856", "owner": "35209168@N05", "title": "Gibraltar 6000 series hardware", "ownername": "Gibraltar Hardware", "url_s": "http:\/\/farm5.staticflickr.com\/4037\/5167357856_c50e6af076_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4037\/5167357856_c50e6af076_z.jpg" },
100 | { "id": "3352146664", "owner": "60804783@N00", "title": "12\/03\/09 Julie Edwards and Kevin Dearden", "ownername": "Quilted\/", "url_s": "http:\/\/farm4.staticflickr.com\/3615\/3352146664_ff8ceb430e_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3615\/3352146664_ff8ceb430e_z.jpg" },
101 | { "id": "6174727790", "owner": "52996072@N04", "title": "Klezmer in the Park (2011) 33 - She'koyokh", "ownername": "KM's Live Music shots", "url_s": "http:\/\/farm7.staticflickr.com\/6163\/6174727790_164c0d9518_s.jpg", "url_z": "http:\/\/farm7.staticflickr.com\/6163\/6174727790_164c0d9518_z.jpg" },
102 | { "id": "122684708", "owner": "51035719258@N01", "title": "Flower of Sound", "ownername": "nazhamid", "url_s": "http:\/\/farm1.staticflickr.com\/43\/122684708_a83e1525e5_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/43\/122684708_a83e1525e5_z.jpg" }
103 | ],
104 | "Guitars": [
105 | { "id": "5648025315", "owner": "30895430@N04", "title": "Electric\/Guitar. (Y70)", "ownername": "Abdulaziz ALKaNDaRi | Photographer", "url_s": "http:\/\/farm6.staticflickr.com\/5063\/5648025315_e0ede6f76f_s.jpg", "url_z": "http:\/\/farm6.staticflickr.com\/5063\/5648025315_e0ede6f76f_z.jpg" },
106 | { "id": "4941304511", "owner": "49392213@N00", "title": "Electric Guitar", "ownername": "DaveOnFlickr", "url_s": "http:\/\/farm5.staticflickr.com\/4118\/4941304511_6133f26705_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4118\/4941304511_6133f26705_z.jpg" },
107 | { "id": "4941303161", "owner": "49392213@N00", "title": "Electric Guitar", "ownername": "DaveOnFlickr", "url_s": "http:\/\/farm5.staticflickr.com\/4142\/4941303161_cf8fffb96e_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4142\/4941303161_cf8fffb96e_z.jpg" },
108 | { "id": "4941302075", "owner": "49392213@N00", "title": "Electric Guitar", "ownername": "DaveOnFlickr", "url_s": "http:\/\/farm5.staticflickr.com\/4100\/4941302075_dffa0990fe_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4100\/4941302075_dffa0990fe_z.jpg" },
109 | { "id": "4941300543", "owner": "49392213@N00", "title": "Electric Guitar", "ownername": "DaveOnFlickr", "url_s": "http:\/\/farm5.staticflickr.com\/4082\/4941300543_a937d89a58_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4082\/4941300543_a937d89a58_z.jpg" },
110 | { "id": "80205119", "owner": "75362229@N00", "title": "Electric guitar", "ownername": "♫axime", "url_s": "http:\/\/farm1.staticflickr.com\/37\/80205119_253a09e7cf_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/37\/80205119_253a09e7cf_z.jpg" },
111 | { "id": "4520106581", "owner": "79946508@N00", "title": "Electric guitar", "ownername": "Frigno", "url_s": "http:\/\/farm5.staticflickr.com\/4016\/4520106581_6bf9d34704_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4016\/4520106581_6bf9d34704_z.jpg" },
112 | { "id": "2380368562", "owner": "13073759@N04", "title": "Electric guitar", "ownername": "Jainbow", "url_s": "http:\/\/farm4.staticflickr.com\/3018\/2380368562_ba052f3bf0_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3018\/2380368562_ba052f3bf0_z.jpg" },
113 | { "id": "2467308300", "owner": "61181002@N00", "title": "Electric guitar", "ownername": "nzgabriel", "url_s": "http:\/\/farm3.staticflickr.com\/2232\/2467308300_2883464413_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2232\/2467308300_2883464413_z.jpg" },
114 | { "id": "5939182553", "owner": "54966739@N00", "title": "Electric guitar", "ownername": "blaahhi", "url_s": "http:\/\/farm7.staticflickr.com\/6121\/5939182553_d909372ab9_s.jpg", "url_z": "http:\/\/farm7.staticflickr.com\/6121\/5939182553_d909372ab9_z.jpg" },
115 | { "id": "7159341498", "owner": "54571750@N03", "title": "Minarik Goddess Electric Guitar", "ownername": "Yorkville Film Productions", "url_s": "http:\/\/farm8.staticflickr.com\/7235\/7159341498_3373b5feef_s.jpg", "url_z": "http:\/\/farm8.staticflickr.com\/7235\/7159341498_3373b5feef_z.jpg" },
116 | { "id": "2896228969", "owner": "26358098@N07", "title": "Handmade Electric Guitar - 131\/365", "ownername": "lesley zellers", "url_s": "http:\/\/farm4.staticflickr.com\/3241\/2896228969_2a1bc18f1f_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3241\/2896228969_2a1bc18f1f_z.jpg" },
117 | { "id": "1400738870", "owner": "13379117@N04", "title": "1952 Gibson ES 295 electric guitar", "ownername": "vintageguitarz", "url_s": "http:\/\/farm2.staticflickr.com\/1272\/1400738870_79f5480d64_s.jpg", "url_z": "http:\/\/farm2.staticflickr.com\/1272\/1400738870_79f5480d64_z.jpg" },
118 | { "id": "3218954877", "owner": "61181002@N00", "title": "Playing the electric guitar", "ownername": "nzgabriel", "url_s": "http:\/\/farm4.staticflickr.com\/3474\/3218954877_1acb91eeb7_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3474\/3218954877_1acb91eeb7_z.jpg" },
119 | { "id": "261777915", "owner": "40015912@N00", "title": "2004 Hagstrom F200P Cream Electric Guitar", "ownername": "Splendor78", "url_s": "http:\/\/farm1.staticflickr.com\/117\/261777915_52dae8eab0_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/117\/261777915_52dae8eab0_z.jpg" },
120 | { "id": "261777410", "owner": "40015912@N00", "title": "2004 Hagstrom F200P Cream Electric Guitar", "ownername": "Splendor78", "url_s": "http:\/\/farm1.staticflickr.com\/122\/261777410_4c7600463e_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/122\/261777410_4c7600463e_z.jpg" },
121 | { "id": "261777646", "owner": "40015912@N00", "title": "2004 Hagstrom F200P Cream Electric Guitar", "ownername": "Splendor78", "url_s": "http:\/\/farm1.staticflickr.com\/89\/261777646_2d492304c1_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/89\/261777646_2d492304c1_z.jpg" },
122 | { "id": "2467308286", "owner": "61181002@N00", "title": "Playing an electric guitar", "ownername": "nzgabriel", "url_s": "http:\/\/farm4.staticflickr.com\/3070\/2467308286_16e0f90e1a_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3070\/2467308286_16e0f90e1a_z.jpg" },
123 | { "id": "5153118655", "owner": "16036153@N04", "title": "P1030741 - electric guitar", "ownername": "Ambernectar 13", "url_s": "http:\/\/farm2.staticflickr.com\/1182\/5153118655_9aa6ecce22_s.jpg", "url_z": "http:\/\/farm2.staticflickr.com\/1182\/5153118655_9aa6ecce22_z.jpg" },
124 | { "id": "5030216182", "owner": "41874318@N05", "title": "Epiphone Electric Guitar and Fender Amplifier Bar Mitzvah Cake", "ownername": "Cakes.KeyArtStudio.com", "url_s": "http:\/\/farm5.staticflickr.com\/4074\/5030216182_8f3ac732d9_s.jpg", "url_z": "http:\/\/farm5.staticflickr.com\/4074\/5030216182_8f3ac732d9_z.jpg" },
125 | { "id": "3319300288", "owner": "35132157@N04", "title": "Vintage Egmond electric guitar", "ownername": "alpine64andy", "url_s": "http:\/\/farm4.staticflickr.com\/3434\/3319300288_b0e93a6a80_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3434\/3319300288_b0e93a6a80_z.jpg" },
126 | { "id": "6031790748", "owner": "58475851@N07", "title": "Vintage 1967 Supro Stratford Electric Guitar", "ownername": "benzobrill", "url_s": "http:\/\/farm7.staticflickr.com\/6125\/6031790748_3506a9d419_s.jpg", "url_z": "http:\/\/farm7.staticflickr.com\/6125\/6031790748_3506a9d419_z.jpg" },
127 | { "id": "472848519", "owner": "16804034@N00", "title": "Daisy Rock \"Retro-H\" 12-string electric guitar", "ownername": "kay_wrad", "url_s": "http:\/\/farm1.staticflickr.com\/218\/472848519_991918171c_s.jpg", "url_z": "http:\/\/farm1.staticflickr.com\/218\/472848519_991918171c_z.jpg" },
128 | { "id": "6031231557", "owner": "58475851@N07", "title": "Vintage 1960's Teisco ET-460 Electric Guitar", "ownername": "benzobrill", "url_s": "http:\/\/farm7.staticflickr.com\/6137\/6031231557_5e79440ec9_s.jpg", "url_z": "http:\/\/farm7.staticflickr.com\/6137\/6031231557_5e79440ec9_z.jpg" },
129 | { "id": "2918464109", "owner": "29649713@N08", "title": "Electric Guitar", "ownername": "ogvidius", "url_s": "http:\/\/farm4.staticflickr.com\/3249\/2918464109_15d2af0a12_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3249\/2918464109_15d2af0a12_z.jpg" },
130 | { "id": "6048448940", "owner": "14559934@N04", "title": "Electric Guitar", "ownername": "Rosebud Cakes - 24 Year Anniversary", "url_s": "http:\/\/farm7.staticflickr.com\/6073\/6048448940_bff18bdb28_s.jpg", "url_z": "http:\/\/farm7.staticflickr.com\/6073\/6048448940_bff18bdb28_z.jpg" },
131 | { "id": "563570594", "owner": "20682277@N00", "title": "Electric Guitar", "ownername": "Anabole", "url_s": "http:\/\/farm2.staticflickr.com\/1208\/563570594_1b3e10f618_s.jpg", "url_z": "http:\/\/farm2.staticflickr.com\/1208\/563570594_1b3e10f618_z.jpg" },
132 | { "id": "3862977233", "owner": "41874318@N05", "title": "Electric Guitar Cake", "ownername": "Cakes.KeyArtStudio.com", "url_s": "http:\/\/farm3.staticflickr.com\/2556\/3862977233_7ea39f5757_s.jpg", "url_z": "http:\/\/farm3.staticflickr.com\/2556\/3862977233_7ea39f5757_z.jpg" },
133 | { "id": "6571892665", "owner": "64194289@N04", "title": "Electric guitar", "ownername": "richard_north", "url_s": "http:\/\/farm8.staticflickr.com\/7002\/6571892665_bfcbbc6292_s.jpg", "url_z": "http:\/\/farm8.staticflickr.com\/7002\/6571892665_bfcbbc6292_z.jpg" },
134 | { "id": "2679788686", "owner": "28627905@N03", "title": "electric guitar bridge", "ownername": "Emmanuel_Goldstein", "url_s": "http:\/\/farm4.staticflickr.com\/3179\/2679788686_ba6d70fa8d_s.jpg", "url_z": "http:\/\/farm4.staticflickr.com\/3179\/2679788686_ba6d70fa8d_z.jpg" },
135 | { "id": "917201820", "owner": "27269891@N00", "title": "Electric Guitar", "ownername": "rrdphoto", "url_s": "http:\/\/farm2.staticflickr.com\/1041\/917201820_8fe18b2d3c_s.jpg", "url_z": "http:\/\/farm2.staticflickr.com\/1041\/917201820_8fe18b2d3c_z.jpg" },
136 | { "id": "6844770704", "owner": "67740376@N08", "title": "Electric Guitar", "ownername": "Katie Whalen Photography", "url_s": "http:\/\/farm8.staticflickr.com\/7199\/6844770704_98b39c7706_s.jpg", "url_z": "http:\/\/farm8.staticflickr.com\/7199\/6844770704_98b39c7706_z.jpg" }
137 | ]
138 | };
--------------------------------------------------------------------------------
/lib/jquery.1.7.2.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v1.7.2 jquery.com | jquery.org/license */
2 | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+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(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;ca ",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q=""+"",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
3 | a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c ",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML=" ",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="
";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/ ]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
4 | .clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>$2>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/