diff --git a/.gitignore b/.gitignore
index dff1a3c..927e22e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
_site
-isotope-site.zip
\ No newline at end of file
+isotope-site.zip
+components/
+bower_components/
+node_modules/
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 0000000..0e3157c
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,10 @@
+{
+ "browser": true,
+ "devel": false,
+ "strict": true,
+ "undef": true,
+ "unused": true,
+ "predef": {
+ "define": false
+ }
+}
diff --git a/.tm_properties b/.tm_properties
index bcd980d..e5df628 100644
--- a/.tm_properties
+++ b/.tm_properties
@@ -1,3 +1,3 @@
softTabs = true
tabSize = 2
-excludeInFileChooser = "{$exclude,_site/*}"
+excludeInFileChooser = "{$exclude,_site/*,bower_components,node_modules}"
diff --git a/CONTRIBUTING.mdown b/CONTRIBUTING.mdown
index 5104bd6..2251f72 100644
--- a/CONTRIBUTING.mdown
+++ b/CONTRIBUTING.mdown
@@ -1,23 +1,24 @@
-## Development freeze
+## Submitting issues
-I've got my hands full working on [Packery](http://metafizzy.co/blog/packery-preview) for the next couple months.
+### Reduced test case required
-+ :cry: Development on Isotope is stopped for a while
-+ :sleeping: I won't be snappily responding to new issues
-+ :smile: When development starts back up on Isotope, the gains made building Packery will be ported over to Isotope.
+All bug reports and problem issues require a [**reduced test case**](http://css-tricks.com/reduced-test-cases/). Create one by forking any one of the [CodePen examples](http://codepen.io/desandro/tag/isotope-docs) from [the docs](http://isotope.metafizzy.co).
-## Submitting issues
++ A reduced test case clearly demonstrates the bug or issue.
++ It contains the bare minimum HTML, CSS, and JavaScript required to demonstrate the bug.
++ A link to your production site is **not** a reduced test case.
-### Read the Help page
+Providing a reduced test case is the best way to get your issue addressed. Without a reduced test case, your issue may be closed.
-[The Help page in the docs](http://isotope.metafizzy.co/docs/help.html) covers most issues. Please look it over first before submitting an issue.
+## Support
-### Provide an isolated example with a live URL
++ Having trouble setting up Isotope?
++ Running into a time-consuming problem?
-**A live URL is required** for any bug report or personal support request. Try re-creating the issue in jsFiddle using this template:
+[CodersClan has a dedicated support forum for Isotope](https://www.codersclan.net/?repo_id=1), where you can get personal support from experienced developers.
-+ [jsFiddle jQuery Isotope template](http://jsfiddle.net/desandro/DQydj/)
+#### [Get support on CodersClan](https://www.codersclan.net/?repo_id=1)
-### Look over the Issues Agreement
+## Pull requests
-I wrote an [Issues Agreement](https://github.com/desandro/issues-agreement/#readme) that covers how to submit a good issue.
+Contributions are welcome! Please note: your code may be used as part of a commercial product if merged. Be clear about what license applies to your patch. [The MIT license](http://choosealicense.com/licenses/mit/) or [public domain unlicense](http://choosealicense.com/licenses/unlicense/) are permissive, and allow integration of your patch into Isotope as part of a commercial product.
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..4026fa2
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,87 @@
+/*jshint node: true, strict: false */
+
+// -------------------------- grunt -------------------------- //
+
+module.exports = function( grunt ) {
+
+ var banner = ( function() {
+ var src = grunt.file.read('js/isotope.js');
+ var re = new RegExp('^\\s*(?:\\/\\*[\\s\\S]*?\\*\\/)\\s*');
+ var matches = src.match( re );
+ var banner = matches[0].replace( 'Isotope', 'Isotope PACKAGED' );
+ return banner;
+ })();
+
+ grunt.initConfig({
+ // ----- global settings ----- //
+ namespace: 'isotope',
+ dataDir: 'tasks/data',
+
+ // ----- tasks settings ----- //
+
+ jshint: {
+ docs: [ 'js/**/*.js' ],
+ options: grunt.file.readJSON('.jshintrc')
+ },
+
+ requirejs: {
+ pkgd: {
+ options: {
+ baseUrl: 'bower_components',
+ include: [
+ 'jquery-bridget/jquery.bridget',
+ 'isotope/js/isotope'
+ ],
+ out: 'dist/isotope.pkgd.js',
+ optimize: 'none',
+ paths: {
+ isotope: '../',
+ jquery: 'empty:'
+ },
+ wrap: {
+ start: banner
+ }
+ }
+ }
+ },
+
+ uglify: {
+ pkgd: {
+ files: {
+ 'dist/isotope.pkgd.min.js': [ 'dist/isotope.pkgd.js' ]
+ },
+ options: {
+ banner: banner
+ }
+ }
+ }
+
+ });
+
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-requirejs');
+
+ grunt.registerTask( 'pkgd-edit', function() {
+ var outFile = grunt.config.get('requirejs.pkgd.options.out');
+ var contents = grunt.file.read( outFile );
+ // get requireJS definition code
+ var definitionRE = /define\(\s*'isotope\/js\/isotope'(.|\n)+isotopeDefinition\s*\)/;
+ var definition = contents.match( definitionRE )[0];
+ // remove name module
+ var fixDefinition = definition.replace( "'isotope/js/isotope',", '' )
+ // ./item -> isotope/js/item
+ .replace( /'.\//g, "'isotope/js/" );
+ contents = contents.replace( definition, fixDefinition );
+ grunt.file.write( outFile, contents );
+ grunt.log.writeln( 'Edited ' + outFile );
+ });
+
+ grunt.registerTask( 'default', [
+ 'jshint',
+ 'requirejs',
+ 'pkgd-edit',
+ 'uglify'
+ ]);
+
+};
diff --git a/README.mdown b/README.mdown
index 2dbda34..bd8ed24 100644
--- a/README.mdown
+++ b/README.mdown
@@ -1,64 +1,77 @@
-Isotope
-========
+# Isotope
-**An exquisite jQuery plugin for magical layouts. Enables filtering, sorting, and dynamic layouts.**
+_Filter & sort magical layouts_
-This package has all the documentation and demos to get you started.
+See [isotopejs.com](http://isotopejs.com) for complete docs and demos.
-View this project live at [http://isotope.metafizzy.co](http://isotope.metafizzy.co).
+## Install
-## Licensing
+A packaged source file includes everything you need to use Isotope.
-Isotope may be used in commercial projects and applications with the one-time purchase of a commercial license. If you are paid to do your job, and part of your job is implementing Isotope, a commercial license is required.
++ [isotope.pkgd.js](http://isotope.metafizzy.co/beta/isotope.pkgd.js)
++ [isotope.pkgd.min.js](http://isotope.metafizzy.co/beta/isotope.pkgd.min.js)
-http://isotope.metafizzy.co/docs/license.html
+### Bower
-For non-commercial, personal, or open source projects and applications, you may use Isotope under the terms of the MIT License. You may use Isotope for free.
+If you are cool with the command line, install Isotope as a [Bower](http://bower.io) package:
-## Support
+``` bash
+bower install isotope
+```
-Try the support forum at CodersClan.
+## License
-[](http://codersclan.net/support/step1.php?repo_id=1)
+Isotope may be used in commercial projects and applications with the one-time purchase of a commercial license. If you are paid to do your job, and part of your job is implementing Isotope, a commercial license is required.
-## Viewing this project locally
+http://isotope.metafizzy.co/license.html
-### Via download
+For non-commercial, personal, or open source projects and applications, you may use Isotope under the terms of the [GPL v3 License](http://choosealicense.com/licenses/gpl-v3/). You may use Isotope for free.
-You can download a zip of all the flat HTML files from [http://meta.metafizzy.co/files/isotope-site.zip](http://meta.metafizzy.co/files/isotope-site.zip).
+## Initialize
-### Via Jekyll
+### In JavaScript
-The documentation and demo pages are generated using [Jekyll](http://github.com/mojombo/jekyll/wiki). With Jekyll installed, you can clone this repo and run Jekyll from Terminal:
+``` js
+// jQuery
+$('#container').isotope({
+ // options...
+ itemSelector: '.item',
+ masonry: {
+ columnWidth: 200
+ }
+});
+```
-``` bash
-git clone https://github.com/desandro/isotope.git
-cd isotope/
-jekyll --server --auto
+``` js
+// vanilla JS
+var container = document.querySelector('#container');
+var iso = new Isotope( container, {
+ // options...
+ itemSelector: '.item',
+ masonry: {
+ columnWidth: 200
+ }
+});
```
-Then view the live site at [http://localhost:4000](http://localhost:4000).
+### In HTML
+
+Add a class of `js-isotope` to your element. Options can be set in JSON in `data-isotope-options`.
-## Changelog
+``` html
+
+```
+
+## Support
-View the [commit history](https://github.com/desandro/isotope/commits/master/jquery.isotope.js) for a complete robust list of changes to the script.
+[CodersClan has a dedicated support forum for Isotope](https://www.codersclan.net/?repo_id=1), where you can get personal support from experienced developers.
-+ **v1.5**
- [2011-10-19](https://github.com/desandro/isotope/commit/2c789ecb5ec#jquery.isotope.js)
- - add proper callback support that trigger after animation/transition
-+ **v1.4** [2011-06-29](https://github.com/desandro/isotope/commit/8e2f51612eaf20e3031b81b8c5ff5e322cbb7b4f#jquery.isotope.js)
- - shuffle method added
- - inserting and appending positions items then reveals them
-+ **v1.3** [2011-05-23](https://github.com/desandro/isotope/commit/a7cc0be2a0038c13a2955a889a873f63a39eb6c2#jquery.isotope.js)
- - refactor layout mode API
- - layoutModeResize -> layoutModeResizeChanged, which returns boolean
-+ **v1.2** [2011-05-13](https://github.com/desandro/isotope/commit/b3cf6139d7641f282724a7a541b3bfb10d1bbf54#jquery.isotope.js)
- - add updateOption method, for changing options after initialization
-+ **v1.1** [2011-04-26](https://github.com/desandro/isotope/commit/3c551406ee1e4cd8345cdbe589c2d8d1e164b259#jquery.isotope.js)
- - incremental additions, bug fixes, and refactorings
-+ **v1.0** [2011-02-07](https://github.com/desandro/isotope/commit/78253dfb34808d9a677ae721e97c5afc08aa19b8#jquery.isotope.js)
- - public release
+#### [Get support on CodersClan](https://www.codersclan.net/?repo_id=1)
* * *
-Copyright (c) 2011-2012 David DeSandro / Metafizzy LLC
+By [Metafizzy](http://metafizzy.co)
diff --git a/_config.yml b/_config.yml
deleted file mode 100644
index 46dfeee..0000000
--- a/_config.yml
+++ /dev/null
@@ -1,605 +0,0 @@
-name: Isotope
-permalink: /:categories/:title.html
-pygments: true
-isotope_js: jquery.isotope.min.js
-jquery_js: js/jquery-1.7.1.min.js
-exclude: [ minify.sh ]
-
-random_order: [ 11, 91, 63, 38, 4, 25, 94, 29, 60, 48, 32, 67, 33, 37, 39, 84, 40, 7, 96, 8, 97, 9, 14, 99, 15, 19, 5, 36, 114, 20, 30, 80, 13, 47, 21, 3, 22, 31, 54, 66, 55, 71, 1, 23, 41, 70, 2, 77, 117, 79, 42, 95, 46, 50, 69, 53, 56, 72, 51, 73, 59, 74, 35, 49, 101, 88, 34, 76, 102, 75, 103, 81, 58, 6, 82, 26, 27, 44, 83, 45, 86, 68, 87, 104, 105, 10, 85, 43, 12, 109, 110, 113, 28, 106, 107, 108, 115, 62, 116, 0, 57, 111, 112, 61, 89, 90, 64, 65, 92, 93, 78, 24, 98, 100, 16, 17, 18, 52 ]
-
-best_of_order: [ 79, 51, 82, 47, 19, 74, 80, 50, 26, 70, 17, 36, 6, 92, 88 ]
-
-elements:
- - categories: [ other, nonmetal ]
- number: 1
- symbol: H
- name: Hydrogen
- weight: 1.00794
- - categories: [noble-gas, nonmetal]
- number: 2
- symbol: He
- name: Helium
- weight: 4.002602
- - categories: [alkali, metal]
- number: 3
- symbol: Li
- name: Lithium
- weight: 6.941
- - categories: [alkaline-earth, metal]
- number: 4
- symbol: Be
- name: Beryllium
- weight: 9.012182
- - categories: [metalloid]
- number: 5
- symbol: B
- name: Boron
- weight: 10.811
- - categories: [other, nonmetal]
- number: 6
- symbol: C
- name: Carbon
- weight: 12.0107
- - categories: [other, nonmetal]
- number: 7
- symbol: N
- name: Nitrogen
- weight: 14.0067
- - categories: [other, nonmetal]
- number: 8
- symbol: O
- name: Oxygen
- weight: 15.9994
- - categories: [halogen, nonmetal]
- number: 9
- symbol: F
- name: Fluorine
- weight: 18.9984032
- - categories: [noble-gas, nonmetal]
- number: 10
- symbol: Ne
- name: Neon
- weight: 20.1797
- - categories: [alkali, metal]
- number: 11
- symbol: Na
- name: Sodium
- weight: 22.98976928
- - categories: [alkaline-earth, metal]
- number: 12
- symbol: Mg
- name: Magnesium
- weight: 24.305
- - categories: [post-transition, metal]
- number: 13
- symbol: Al
- name: Aluminium
- weight: 26.9815386
- - categories: [metalloid]
- number: 14
- symbol: Si
- name: Silicon
- weight: 28.0855
- - categories: [other, nonmetal]
- number: 15
- symbol: P
- name: Phosphorus
- weight: 30.973762
- - categories: [other, nonmetal]
- number: 16
- symbol: S
- name: Sulfur
- weight: 32.065
- - categories: [halogen, nonmetal]
- number: 17
- symbol: Cl
- name: Chlorine
- weight: 35.453
- - categories: [noble-gas, nonmetal]
- number: 18
- symbol: Ar
- name: Argon
- weight: 39.948
- - categories: [alkali, metal]
- number: 19
- symbol: K
- name: Potassium
- weight: 39.0983
- - categories: [alkaline-earth, metal]
- number: 20
- symbol: Ca
- name: Calcium
- weight: 40.078
- - categories: [transition, metal]
- number: 21
- symbol: Sc
- name: Scandium
- weight: 44.955912
- - categories: [transition, metal]
- number: 22
- symbol: Ti
- name: Titanium
- weight: 47.867
- - categories: [transition, metal]
- number: 23
- symbol: V
- name: Vanadium
- weight: 50.9415
- - categories: [transition, metal]
- number: 24
- symbol: Cr
- name: Chromium
- weight: 51.9961
- - categories: [transition, metal]
- number: 25
- symbol: Mn
- name: Manganese
- weight: 54.938045
- - categories: [transition, metal]
- number: 26
- symbol: Fe
- name: Iron
- weight: 55.845
- - categories: [transition, metal]
- number: 27
- symbol: Co
- name: Cobalt
- weight: 58.933195
- - categories: [transition, metal]
- number: 28
- symbol: Ni
- name: Nickel
- weight: 58.6934
- - categories: [transition, metal]
- number: 29
- symbol: Cu
- name: Copper
- weight: 63.546
- - categories: [transition, metal]
- number: 30
- symbol: Zn
- name: Zinc
- weight: 65.38
- - categories: [post-transition, metal]
- number: 31
- symbol: Ga
- name: Gallium
- weight: 69.723
- - categories: [metalloid]
- number: 32
- symbol: Ge
- name: Germanium
- weight: 72.64
- - categories: [metalloid]
- number: 33
- symbol: As
- name: Arsenic
- weight: 74.9216
- - categories: [other, nonmetal]
- number: 34
- symbol: Se
- name: Selenium
- weight: 78.96
- - categories: [halogen, nonmetal]
- number: 35
- symbol: Br
- name: Bromine
- weight: 79.904
- - categories: [noble-gas, nonmetal]
- number: 36
- symbol: Kr
- name: Krypton
- weight: 83.798
- - categories: [alkali, metal]
- number: 37
- symbol: Rb
- name: Rubidium
- weight: 85.4678
- - categories: [alkaline-earth, metal]
- number: 38
- symbol: Sr
- name: Strontium
- weight: 87.62
- - categories: [transition, metal]
- number: 39
- symbol: Y
- name: Yttrium
- weight: 88.90585
- - categories: [transition, metal]
- number: 40
- symbol: Zr
- name: Zirconium
- weight: 91.224
- - categories: [transition, metal]
- number: 41
- symbol: Nb
- name: Niobium
- weight: 92.90638
- - categories: [transition, metal]
- number: 42
- symbol: Mo
- name: Molybdenum
- weight: 95.96
- - categories: [transition, metal]
- number: 43
- symbol: Tc
- name: Technetium
- weight: (98)
- - categories: [transition, metal]
- number: 44
- symbol: Ru
- name: Ruthenium
- weight: 101.07
- - categories: [transition, metal]
- number: 45
- symbol: Rh
- name: Rhodium
- weight: 102.9055
- - categories: [transition, metal]
- number: 46
- symbol: Pd
- name: Palladium
- weight: 106.42
- - categories: [transition, metal]
- number: 47
- symbol: Ag
- name: Silver
- weight: 107.8682
- - categories: [transition, metal]
- number: 48
- symbol: Cd
- name: Cadmium
- weight: 112.411
- - categories: [post-transition, metal]
- number: 49
- symbol: In
- name: Indium
- weight: 114.818
- - categories: [post-transition, metal]
- number: 50
- symbol: Sn
- name: Tin
- weight: 118.71
- - categories: [metalloid]
- number: 51
- symbol: Sb
- name: Antimony
- weight: 121.76
- - categories: [metalloid]
- number: 52
- symbol: Te
- name: Tellurium
- weight: 127.6
- - categories: [halogen, nonmetal]
- number: 53
- symbol: I
- name: Iodine
- weight: 126.90447
- - categories: [noble-gas, nonmetal]
- number: 54
- symbol: Xe
- name: Xenon
- weight: 131.293
- - categories: [alkali, metal]
- number: 55
- symbol: Cs
- name: Caesium
- weight: 132.9054519
- - categories: [alkaline-earth, metal]
- number: 56
- symbol: Ba
- name: Barium
- weight: 137.327
- - categories: [lanthanoid, metal, inner-transition]
- number: 57
- symbol: La
- name: Lanthanum
- weight: 138.90547
- - categories: [lanthanoid, metal, inner-transition]
- number: 58
- symbol: Ce
- name: Cerium
- weight: 140.116
- - categories: [lanthanoid, metal, inner-transition]
- number: 59
- symbol: Pr
- name: Praseodymium
- weight: 140.90765
- - categories: [lanthanoid, metal, inner-transition]
- number: 60
- symbol: Nd
- name: Neodymium
- weight: 144.242
- - categories: [lanthanoid, metal, inner-transition]
- number: 61
- symbol: Pm
- name: Promethium
- weight: (145)
- - categories: [lanthanoid, metal, inner-transition]
- number: 62
- symbol: Sm
- name: Samarium
- weight: 150.36
- - categories: [lanthanoid, metal, inner-transition]
- number: 63
- symbol: Eu
- name: Europium
- weight: 151.964
- - categories: [lanthanoid, metal, inner-transition]
- number: 64
- symbol: Gd
- name: Gadolinium
- weight: 157.25
- - categories: [lanthanoid, metal, inner-transition]
- number: 65
- symbol: Tb
- name: Terbium
- weight: 158.92535
- - categories: [lanthanoid, metal, inner-transition]
- number: 66
- symbol: Dy
- name: Dysprosium
- weight: 162.5
- - categories: [lanthanoid, metal, inner-transition]
- number: 67
- symbol: Ho
- name: Holmium
- weight: 164.93032
- - categories: [lanthanoid, metal, inner-transition]
- number: 68
- symbol: Er
- name: Erbium
- weight: 167.259
- - categories: [lanthanoid, metal, inner-transition]
- number: 69
- symbol: Tm
- name: Thulium
- weight: 168.93421
- - categories: [lanthanoid, metal, inner-transition]
- number: 70
- symbol: Yb
- name: Ytterbium
- weight: 173.054
- - categories: [lanthanoid, metal, inner-transition]
- number: 71
- symbol: Lu
- name: Lutetium
- weight: 174.9668
- - categories: [transition, metal]
- number: 72
- symbol: Hf
- name: Hafnium
- weight: 178.49
- - categories: [transition, metal]
- number: 73
- symbol: Ta
- name: Tantalum
- weight: 180.94788
- - categories: [transition, metal]
- number: 74
- symbol: W
- name: Tungsten
- weight: 183.84
- - categories: [transition, metal]
- number: 75
- symbol: Re
- name: Rhenium
- weight: 186.207
- - categories: [transition, metal]
- number: 76
- symbol: Os
- name: Osmium
- weight: 190.23
- - categories: [transition, metal]
- number: 77
- symbol: Ir
- name: Iridium
- weight: 192.217
- - categories: [transition, metal]
- number: 78
- symbol: Pt
- name: Platinum
- weight: 195.084
- - categories: [transition, metal]
- number: 79
- symbol: Au
- name: Gold
- weight: 196.966569
- - categories: [transition, metal]
- number: 80
- symbol: Hg
- name: Mercury
- weight: 200.59
- - categories: [post-transition, metal]
- number: 81
- symbol: Tl
- name: Thallium
- weight: 204.3833
- - categories: [post-transition, metal]
- number: 82
- symbol: Pb
- name: Lead
- weight: 207.2
- - categories: [post-transition, metal]
- number: 83
- symbol: Bi
- name: Bismuth
- weight: 208.9804
- - categories: [metalloid]
- number: 84
- symbol: Po
- name: Polonium
- weight: (209)
- - categories: [halogen, nonmetal]
- number: 85
- symbol: At
- name: Astatine
- weight: (210)
- - categories: [noble-gas, nonmetal]
- number: 86
- symbol: Rn
- name: Radon
- weight: (222)
- - categories: [alkali, metal]
- number: 87
- symbol: Fr
- name: Francium
- weight: (223)
- - categories: [alkaline-earth, metal]
- number: 88
- symbol: Ra
- name: Radium
- weight: (226)
- - categories: [actinoid, metal, inner-transition]
- number: 89
- symbol: Ac
- name: Actinium
- weight: (227)
- - categories: [actinoid, metal, inner-transition]
- number: 90
- symbol: Th
- name: Thorium
- weight: 232.03806
- - categories: [actinoid, metal, inner-transition]
- number: 91
- symbol: Pa
- name: Protactinium
- weight: 231.03588
- - categories: [actinoid, metal, inner-transition]
- number: 92
- symbol: U
- name: Uranium
- weight: 238.02891
- - categories: [actinoid, metal, inner-transition]
- number: 93
- symbol: Np
- name: Neptunium
- weight: (237)
- - categories: [actinoid, metal, inner-transition]
- number: 94
- symbol: Pu
- name: Plutonium
- weight: (244)
- - categories: [actinoid, metal, inner-transition]
- number: 95
- symbol: Am
- name: Americium
- weight: (243)
- - categories: [actinoid, metal, inner-transition]
- number: 96
- symbol: Cm
- name: Curium
- weight: (247)
- - categories: [actinoid, metal, inner-transition]
- number: 97
- symbol: Bk
- name: Berkelium
- weight: (247)
- - categories: [actinoid, metal, inner-transition]
- number: 98
- symbol: Cf
- name: Californium
- weight: (251)
- - categories: [actinoid, metal, inner-transition]
- number: 99
- symbol: Es
- name: Einsteinium
- weight: (252)
- - categories: [actinoid, metal, inner-transition]
- number: 100
- symbol: Fm
- name: Fermium
- weight: (257)
- - categories: [actinoid, metal, inner-transition]
- number: 101
- symbol: Md
- name: Mendelevium
- weight: (258)
- - categories: [actinoid, metal, inner-transition]
- number: 102
- symbol: 'No'
- name: Nobelium
- weight: (259)
- - categories: [actinoid, metal, inner-transition]
- number: 103
- symbol: Lr
- name: Lawrencium
- weight: (262)
- - categories: [transition, metal]
- number: 104
- symbol: Rf
- name: Rutherfordium
- weight: (267)
- - categories: [transition, metal]
- number: 105
- symbol: Db
- name: Dubnium
- weight: (268)
- - categories: [transition, metal]
- number: 106
- symbol: Sg
- name: Seaborgium
- weight: (271)
- - categories: [transition, metal]
- number: 107
- symbol: Bh
- name: Bohrium
- weight: (272)
- - categories: [transition, metal]
- number: 108
- symbol: Hs
- name: Hassium
- weight: (270)
- - categories: [transition, metal]
- number: 109
- symbol: Mt
- name: Meitnerium
- weight: (276)
- - categories: [transition, metal]
- number: 110
- symbol: Ds
- name: Darmstadtium
- weight: (281)
- - categories: [transition, metal]
- number: 111
- symbol: Rg
- name: Roentgenium
- weight: (280)
- - categories: [transition, metal]
- number: 112
- symbol: Cn
- name: Copernicium
- weight: (285)
- - categories: [post-transition, metal]
- number: 113
- symbol: Uut
- name: Ununtrium
- weight: (284)
- - categories: [post-transition, metal]
- number: 114
- symbol: Uuq
- name: Ununquadium
- weight: (289)
- - categories: [post-transition, metal]
- number: 115
- symbol: Uup
- name: Ununpentium
- weight: (288)
- - categories: [post-transition, metal]
- number: 116
- symbol: Uuh
- name: Ununhexium
- weight: (293)
- - categories: [halogen, nonmetal]
- number: 117
- symbol: Uus
- name: Ununseptium
- weight: (294)
- - categories: [noble-gas, nonmetal]
- number: 118
- symbol: Uuo
- name: Ununoctium
- weight: (294)
-
-
-
diff --git a/_includes/add-buttons.js b/_includes/add-buttons.js
deleted file mode 100644
index 699c55e..0000000
--- a/_includes/add-buttons.js
+++ /dev/null
@@ -1,14 +0,0 @@
-
- $('#insert a').click(function(){
- var $newEls = $( fakeElement.getGroup() );
- $container.isotope( 'insert', $newEls );
-
- return false;
- });
-
- $('#append a').click(function(){
- var $newEls = $( fakeElement.getGroup() );
- $container.append( $newEls ).isotope( 'appended', $newEls );
-
- return false;
- });
diff --git a/_includes/change-sizes.js b/_includes/change-sizes.js
deleted file mode 100644
index 2267f3b..0000000
--- a/_includes/change-sizes.js
+++ /dev/null
@@ -1,14 +0,0 @@
-
- // change size of clicked element
- $container.delegate( '.element', 'click', function(){
- $(this).toggleClass('large');
- $container.isotope('reLayout');
- });
-
- // toggle variable sizes of all elements
- $('#toggle-sizes').find('a').click(function(){
- $container
- .toggleClass('variable-sizes')
- .isotope('reLayout');
- return false;
- });
diff --git a/_includes/developer-buy-button.html b/_includes/developer-buy-button.html
deleted file mode 100644
index d9cbc6d..0000000
--- a/_includes/developer-buy-button.html
+++ /dev/null
@@ -1 +0,0 @@
-Buy Developer License - $25.00
diff --git a/_includes/element-partial.html b/_includes/element-partial.html
deleted file mode 100644
index 6ddc790..0000000
--- a/_includes/element-partial.html
+++ /dev/null
@@ -1,7 +0,0 @@
- {% capture classnames %}{% for cat in element.categories %}{{ cat }} {% endfor %} {% if page.infinite_scroll %} width2 height2 {% endif %} {% endcapture %}
-
-
{{ element.number }}
-
{{ element.symbol }}
-
{{ element.name }}
-
{{ element.weight }}
-
\ No newline at end of file
diff --git a/_includes/elements-demo-foot.html b/_includes/elements-demo-foot.html
deleted file mode 100644
index c06d696..0000000
--- a/_includes/elements-demo-foot.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/_includes/elements-demo-head.html b/_includes/elements-demo-head.html
deleted file mode 100644
index 16f527d..0000000
--- a/_includes/elements-demo-head.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
- Isotope’s capabilities are designed to be used together cohesively. You can do it all — filter, sort, change layout modes, add items — and Isotope will handle it with ease.
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- {% include layout-options.html %}
-
- Etc
-
-
-
-
\ No newline at end of file
diff --git a/_includes/filter-buttons.html b/_includes/filter-buttons.html
deleted file mode 100644
index 1e95eb3..0000000
--- a/_includes/filter-buttons.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
- Filters
-
-
diff --git a/_includes/inf-scroll-page.html b/_includes/inf-scroll-page.html
deleted file mode 100644
index c074fc3..0000000
--- a/_includes/inf-scroll-page.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
- {% assign page_position = page.page_position %}
- {% for element in site.elements limit:20 offset:page.page_position %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
\ No newline at end of file
diff --git a/_includes/layout-change.js b/_includes/layout-change.js
deleted file mode 100644
index 4dcf825..0000000
--- a/_includes/layout-change.js
+++ /dev/null
@@ -1,24 +0,0 @@
-
- // change layout
- var isHorizontal = false;
- function changeLayoutMode( $link, options ) {
- var wasHorizontal = isHorizontal;
- isHorizontal = $link.hasClass('horizontal');
-
- if ( wasHorizontal !== isHorizontal ) {
- // orientation change
- // need to do some clean up for transitions and sizes
- var style = isHorizontal ?
- { height: '80%', width: $container.width() } :
- { width: 'auto' };
- // stop any animation on container height / width
- $container.filter(':animated').stop();
- // disable transition, apply revised style
- $container.addClass('no-transition').css( style );
- setTimeout(function(){
- $container.removeClass('no-transition').isotope( options );
- }, 100 )
- } else {
- $container.isotope( options );
- }
- }
diff --git a/_includes/layout-options.html b/_includes/layout-options.html
deleted file mode 100644
index e806a91..0000000
--- a/_includes/layout-options.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
- Layout modes
-
-
diff --git a/_includes/option-set-buttons.js b/_includes/option-set-buttons.js
deleted file mode 100644
index 0b63054..0000000
--- a/_includes/option-set-buttons.js
+++ /dev/null
@@ -1,31 +0,0 @@
-
- var $optionSets = $('#options .option-set'),
- $optionLinks = $optionSets.find('a');
-
- $optionLinks.click(function(){
- var $this = $(this);
- // don't proceed if already selected
- if ( $this.hasClass('selected') ) {
- return false;
- }
- var $optionSet = $this.parents('.option-set');
- $optionSet.find('.selected').removeClass('selected');
- $this.addClass('selected');
-
- // make option object dynamically, i.e. { filter: '.my-filter-class' }
- var options = {},
- key = $optionSet.attr('data-option-key'),
- value = $this.attr('data-option-value');
- // parse 'false' as false boolean
- value = value === 'false' ? false : value;
- options[ key ] = value;
- if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) {
- // changes in layout modes need extra logic
- changeLayoutMode( $this, options )
- } else {
- // otherwise, apply new options
- $container.isotope( options );
- }
-
- return false;
- });
diff --git a/_includes/org-buy-button.html b/_includes/org-buy-button.html
deleted file mode 100644
index 07ca62c..0000000
--- a/_includes/org-buy-button.html
+++ /dev/null
@@ -1 +0,0 @@
-Buy Organization License - $90.00
diff --git a/_includes/random-sizes.js b/_includes/random-sizes.js
deleted file mode 100644
index 82e106e..0000000
--- a/_includes/random-sizes.js
+++ /dev/null
@@ -1,12 +0,0 @@
-
- // add randomish size classes
- $container.find('.element').each(function(){
- var $this = $(this),
- number = parseInt( $this.find('.number').text(), 10 );
- if ( number % 7 % 2 === 1 ) {
- $this.addClass('width2');
- }
- if ( number % 3 === 0 ) {
- $this.addClass('height2');
- }
- });
\ No newline at end of file
diff --git a/_includes/sort-buttons.html b/_includes/sort-buttons.html
deleted file mode 100644
index da9ca6f..0000000
--- a/_includes/sort-buttons.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
- Sort
-
-
-
- Sort direction
-
-
diff --git a/_layouts/default.html b/_layouts/default.html
deleted file mode 100644
index c009599..0000000
--- a/_layouts/default.html
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
- {% if page.category != 'homepage' %}{% assign root_path = '../' %}{% assign link_path = '..' %}{% else %}{% assign link_path = '.' %}{% endif %}
-
- {{ page.title }}{% if page.category != 'homepage' %} · {{ site.name }} {% if page.category == 'docs' %}Docs{% elsif page.category == 'demos' %}Demo{% endif %}{% endif %}
-
-
-
-
-
-
-
-
-
-
-
-
-
- Docs
-
-
- {% for doc in site.categories.docs reversed %}
- {% if page.title == doc.title and page.category == 'docs' %}
- {{ doc.title }}
-
-
- {% else %}
- {{ doc.title }}
- {% endif %}
- {% endfor %}
-
-
- Demos
-
-
- {% for demo in site.categories.demos reversed %}
- {% if page.title == demo.title and page.category == 'demos' %}
- {{ demo.title }}
- {% else %}
- {{ demo.title }}
- {% endif %}
- {% endfor %}
-
-
- Custom layout modes
-
-
- {% for demo in site.categories['custom-layout-modes'] reversed %}
- {% if page.title == demo.title and page.category == 'custom-layout-modes' %}
- {{ demo.title }}
- {% else %}
- {{ demo.title }}
- {% endif %}
- {% endfor %}
-
-
-
-
-
-
-
- {% if page.category != 'homepage' %}
- {{ page.title }}
- {% endif %}
-
- {{ content }}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/custom-layout-modes/2011-05-18-centered-masonry.html b/_posts/custom-layout-modes/2011-05-18-centered-masonry.html
deleted file mode 100644
index c457fb4..0000000
--- a/_posts/custom-layout-modes/2011-05-18-centered-masonry.html
+++ /dev/null
@@ -1,151 +0,0 @@
----
-title: Centered Masonry
-layout: default
-category: custom-layout-modes
----
-
-
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/custom-layout-modes/2011-05-22-category-rows.html b/_posts/custom-layout-modes/2011-05-22-category-rows.html
deleted file mode 100644
index 03e7e0a..0000000
--- a/_posts/custom-layout-modes/2011-05-22-category-rows.html
+++ /dev/null
@@ -1,126 +0,0 @@
----
-title: Category rows
-layout: default
-category: custom-layout-modes
----
-
-
- This demo uses a custom layout mode , categoryRows
that arranges elements into rows based on their category. The layout mode logic relies on sorting to define rows.
-
-
-
-
- {% include filter-buttons.html %}
-
- Etc
-
-
-
-
-
- {% for elem_number in site.random_order | limit:60 %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/custom-layout-modes/2011-07-07-masonry-corner-stamp.html b/_posts/custom-layout-modes/2011-07-07-masonry-corner-stamp.html
deleted file mode 100644
index 7d3d5fb..0000000
--- a/_posts/custom-layout-modes/2011-07-07-masonry-corner-stamp.html
+++ /dev/null
@@ -1,145 +0,0 @@
----
-title: Masonry corner stamp
-layout: default
-category: custom-layout-modes
----
-
-
-
-
- Modified masonry layout mode for corner stamp. An element can be "stamped" in the right top corner.
- Set cornerStampSelector
within masonry
options. itemSelector
needs to be set as well.
-
-{% highlight javascript %}
-
-$('#container').isotope({
- itemSelector: '.item',
- masonry: {
- columnWidth: 120,
- cornerStampSelector: '.corner-stamp'
- }
-});
-
-{% endhighlight %}
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
-
-
-
corner stamp here.
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/custom-layout-modes/2011-07-14-masonry-gutters.html b/_posts/custom-layout-modes/2011-07-14-masonry-gutters.html
deleted file mode 100644
index 45fe110..0000000
--- a/_posts/custom-layout-modes/2011-07-14-masonry-gutters.html
+++ /dev/null
@@ -1,148 +0,0 @@
----
-title: Masonry gutters
-layout: default
-category: custom-layout-modes
----
-
-
-
-
- Modified masonry layout mode for gutterWidth. The items have no padding, so they can be lined-up horizontally adjacent to the container.
- Set gutterWidth
within masonry
options.
-
-{% highlight javascript %}
-
-$('#container').isotope({
- masonry: {
- columnWidth: 110,
- gutterWidth: 10
- }
-});
-
-{% endhighlight %}
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/custom-layout-modes/2011-10-18-spine-align.html b/_posts/custom-layout-modes/2011-10-18-spine-align.html
deleted file mode 100644
index 6389602..0000000
--- a/_posts/custom-layout-modes/2011-10-18-spine-align.html
+++ /dev/null
@@ -1,139 +0,0 @@
----
-title: Spine align
-layout: default
-category: custom-layout-modes
----
-
-
- Custom layout mode that aligns items to the center, placing them either left or right of the spine. gutterWidth
option available.
-
-{% highlight javascript %}
-
-$container.isotope({
- layoutMode: 'spineAlign',
- spineAlign: {
- gutterWidth: 20
- },
- // options...
-});
-
-{% endhighlight %}
-
- To use this layout mode, grab the $.Isotope.prototype
methods from the script at the bottom of this page's source.
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/custom-layout-modes/2011-12-05-big-graph.html b/_posts/custom-layout-modes/2011-12-05-big-graph.html
deleted file mode 100644
index 6d16185..0000000
--- a/_posts/custom-layout-modes/2011-12-05-big-graph.html
+++ /dev/null
@@ -1,196 +0,0 @@
----
-title: BIG Graph
-layout: default
-category: custom-layout-modes
----
-
-
- Custom layout mode to replicate the Flash interface of big.dk . Similiar to Category rows , item elements are grouped by their sorting data into columns.
-
-{% highlight javascript %}
-
-$container.isotope({
- layoutMode: 'bigGraph',
- bigGraph: {
- columnWidth: 45, // size of item
- rowHeight: 45, // size of item
- maxRows: 11, // max number of items vertically
- gutterWidth: { // width of gutter, needs to match getSortData names
- year: 0,
- scale: 60,
- program: 40,
- status: 60,
- title: 0
- }
- },
- // options...
-});
-
-{% endhighlight %}
-
- To use this layout mode, grab the $.Isotope.prototype
methods from the script at the bottom of this page's source.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/_posts/custom-layout-modes/2012-01-03-masonry-column-shift.html b/_posts/custom-layout-modes/2012-01-03-masonry-column-shift.html
deleted file mode 100644
index 1c4ffcd..0000000
--- a/_posts/custom-layout-modes/2012-01-03-masonry-column-shift.html
+++ /dev/null
@@ -1,220 +0,0 @@
----
-title: Masonry Column Shift
-layout: default
-category: custom-layout-modes
----
-
-
-
-
- Custom layout mode masonryColumnShift
. Enabled columns of a Masonry layout to be shifted and not affect other columns. After the size of an item element has changed, you can trigger a special columnShiftOfItem
method that will push the column down. This layout only works with item elements that have the same width
-
-{% highlight javascript %}
-
-var $container = $('#container');
-
-$container.isotope({
- itemSelector: '.shifty-item',
- layoutMode: 'masonryColumnShift'
-});
-
-$container.find('.shifty-item').hover(
- function() {
- $(this).css({ height: "+=100" });
- // note that element is passed in, not jQuery object
- $container.isotope( 'shiftColumnOfItem', this );
- },
- function() {
- $(this).css({ height: "-=100" });
- $container.isotope( 'shiftColumnOfItem', this );
- }
-);
-
-{% endhighlight %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/demos/2010-12-12-basic.html b/_posts/demos/2010-12-12-basic.html
deleted file mode 100644
index 829c2c1..0000000
--- a/_posts/demos/2010-12-12-basic.html
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: Basic
-layout: default
-category: demos
----
-
-
- This is a basic demo of Isotope. Resize the browser window to see the layout animate.
-
-
-
- {% for element in site.elements limit:20 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
diff --git a/_posts/demos/2010-12-13-elements-complete.html b/_posts/demos/2010-12-13-elements-complete.html
deleted file mode 100644
index 9241f8f..0000000
--- a/_posts/demos/2010-12-13-elements-complete.html
+++ /dev/null
@@ -1,16 +0,0 @@
----
-title: Elements Complete
-layout: default
-category: demos
----
-
-{% include elements-demo-head.html %}
-
-
- {% for elem_number in site.random_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-{% include elements-demo-foot.html %}
\ No newline at end of file
diff --git a/_posts/demos/2010-12-16-elements-partial.html b/_posts/demos/2010-12-16-elements-partial.html
deleted file mode 100644
index bbeb6d9..0000000
--- a/_posts/demos/2010-12-16-elements-partial.html
+++ /dev/null
@@ -1,16 +0,0 @@
----
-title: Elements Partial
-layout: default
-category: demos
----
-
-{% include elements-demo-head.html %}
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-{% include elements-demo-foot.html %}
diff --git a/_posts/demos/2010-12-29-layout-modes.html b/_posts/demos/2010-12-29-layout-modes.html
deleted file mode 100644
index 8c71191..0000000
--- a/_posts/demos/2010-12-29-layout-modes.html
+++ /dev/null
@@ -1,59 +0,0 @@
----
-title: Layout modes
-layout: default
-category: demos
----
-
-
- Isotope has a versatile layout engine that can accommodate multiple layout modes. Vertical layouts react to changes in browser width. Horizontal layouts react to browser height.
- See docs on layout modes .
-
-
-
-
- {% include layout-options.html %}
-
-
-
-
- {% for element in site.elements limit:20 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
diff --git a/_posts/demos/2010-12-30-filtering.html b/_posts/demos/2010-12-30-filtering.html
deleted file mode 100644
index b277bf2..0000000
--- a/_posts/demos/2010-12-30-filtering.html
+++ /dev/null
@@ -1,41 +0,0 @@
----
-title: Filtering
-layout: default
-category: demos
----
-
-
-
-
-
-
- {% include filter-buttons.html %}
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
diff --git a/_posts/demos/2010-12-30-sorting.html b/_posts/demos/2010-12-30-sorting.html
deleted file mode 100644
index 137ed65..0000000
--- a/_posts/demos/2010-12-30-sorting.html
+++ /dev/null
@@ -1,56 +0,0 @@
----
-title: Sorting
-layout: default
-category: demos
----
-
-
- Sort item elements based on any data you can extract from them.
- See docs on sorting .
-
-
-
-
- {% include sort-buttons.html %}
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
diff --git a/_posts/demos/2010-12-31-relayout.html b/_posts/demos/2010-12-31-relayout.html
deleted file mode 100644
index 95b9c39..0000000
--- a/_posts/demos/2010-12-31-relayout.html
+++ /dev/null
@@ -1,44 +0,0 @@
----
-title: reLayout
-layout: default
-category: demos
----
-
-
- Use the reLayout
method to easily arrange item elements after a change.
- Click on any item element to change its size.
-
-
-
-
-
- {% for element in site.elements limit:20 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
diff --git a/_posts/demos/2011-01-02-adding-items.html b/_posts/demos/2011-01-02-adding-items.html
deleted file mode 100644
index 6aa9e94..0000000
--- a/_posts/demos/2011-01-02-adding-items.html
+++ /dev/null
@@ -1,61 +0,0 @@
----
-title: Adding items
-layout: default
-category: demos
----
-
-
- The insert
method will append, add items to the widget, filter, sort, and then layout all items
- The appended
method adds items to the widget, and then lays out only the new items.
- The reloadItems
method re-collects all items in their current order in the DOM, which can be useful for prepending items.
- See docs on adding items .
-
-
-
-
-
- {% for elem_number in site.best_of_order :limit 10 %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/demos/2011-01-02-infinite-scroll.html b/_posts/demos/2011-01-02-infinite-scroll.html
deleted file mode 100644
index 882539b..0000000
--- a/_posts/demos/2011-01-02-infinite-scroll.html
+++ /dev/null
@@ -1,51 +0,0 @@
----
-title: Infinite Scroll
-layout: default
-category: demos
-infinite_scroll: true
----
-
-
- Isotope is interoperable with Infinite Scroll by Paul Irish. Use the appended
method to add new items to the Isotope layout. CSS transitions have been disabled on the container element to avoid triggering AJAX call prematurely.
-
-
-
- {% for element in site.elements limit:20 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/demos/2011-01-11-images.html b/_posts/demos/2011-01-11-images.html
deleted file mode 100644
index ffae757..0000000
--- a/_posts/demos/2011-01-11-images.html
+++ /dev/null
@@ -1,44 +0,0 @@
----
-title: Images
-layout: default
-category: demos
-photos:
- -
- -
- -
- -
- -
- -
- -
- -
- -
----
-
-
-
-
- {% for photo in page.photos %}
-
- {{ photo }}
-
- {% endfor %}
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/demos/2011-03-29-combination-filters.html b/_posts/demos/2011-03-29-combination-filters.html
deleted file mode 100644
index 83c08c3..0000000
--- a/_posts/demos/2011-03-29-combination-filters.html
+++ /dev/null
@@ -1,100 +0,0 @@
----
-title: Combination filters
-layout: default
-category: demos
-schema:
- - name: color
- filters: [ red, blue, yellow ]
- - name: size
- filters: [ small, wide, tall, big ]
- - name: shape
- filters : [ round, square ]
----
-
-
- Filters can be combined. In addition to filtering for just .red
or .tall
, you can pass in a filter selector of both: .red.tall
.
-
-
-
-
- Filters
-
- {% for group in page.schema %}
-
- {% endfor %}
-
-
-
-
- {% for size in page.schema[1].filters %}
- {% for shape in page.schema[2].filters %}
- {% for color in page.schema[0].filters %}
-
- {% endfor %}
- {% endfor %}
- {% endfor %}
-
-
- {% for color in page.schema[0].filters %}
- {% for shape in page.schema[2].filters %}
- {% for size in page.schema[1].filters %}
-
- {% endfor %}
- {% endfor %}
- {% endfor %}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/demos/2011-06-13-hash-history.html b/_posts/demos/2011-06-13-hash-history.html
deleted file mode 100644
index 8a06a44..0000000
--- a/_posts/demos/2011-06-13-hash-history.html
+++ /dev/null
@@ -1,185 +0,0 @@
----
-title: Hash history
-layout: default
-category: demos
----
-
-
- jQuery BBQ by Ben Alman allows you to use hash history to save Isotope options. Try clicking a couple options then hitting the back button, or copying the URL and pasting it into a new window.
-
-
-
-
- Filters
-
-
-
- Sort
-
-
-
- Sort direction
-
-
-
- Layout modes
-
-
-
-
-
-
- {% for elem_number in site.random_order | limit:60 %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
diff --git a/_posts/demos/2011-09-30-fluid-responsive.html b/_posts/demos/2011-09-30-fluid-responsive.html
deleted file mode 100644
index bab2543..0000000
--- a/_posts/demos/2011-09-30-fluid-responsive.html
+++ /dev/null
@@ -1,141 +0,0 @@
----
-title: Fluid / responsive
-layout: default
-category: demos
----
-
-
-
-
- This hack allows you to use percentage-based widths for item elements for fluid / responsive layouts.
-
-{% highlight javascript %}
-
-var $container = $('#container')
-// initialize Isotope
-$container.isotope({
- // options...
- resizable: false, // disable normal resizing
- // set columnWidth to a percentage of container width
- masonry: { columnWidth: $container.width() / 5 }
-});
-
-// update columnWidth on window resize
-$(window).smartresize(function(){
- $container.isotope({
- // update columnWidth to a percentage of container width
- masonry: { columnWidth: $container.width() / 5 }
- });
-});
-
-{% endhighlight %}
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/demos/2011-12-22-removing.html b/_posts/demos/2011-12-22-removing.html
deleted file mode 100644
index 30144cc..0000000
--- a/_posts/demos/2011-12-22-removing.html
+++ /dev/null
@@ -1,79 +0,0 @@
----
-title: Removing
-layout: default
-category: demos
----
-
-
- Removing items filters them out then removes them from the page. Click on a button or the item itself to remove them.
-
-
-
-
-
-
- {% for element in site.elements limit:40 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
diff --git a/_posts/docs/2010-12-01-introduction.mdown b/_posts/docs/2010-12-01-introduction.mdown
deleted file mode 100644
index 1e77440..0000000
--- a/_posts/docs/2010-12-01-introduction.mdown
+++ /dev/null
@@ -1,172 +0,0 @@
----
-
-title: Introduction
-category: docs
-layout: default
-toc:
- - { title: Features, anchor: features }
- - { title: Licensing, anchor: licensing }
- - { title: Getting started, anchor: getting_started }
- - { title: Code repository, anchor: code_repository }
- - { title: A word about moderation, anchor: moderation }
- - { title: Acknowledgments, anchor: acknowledgments }
-
-
----
-
-Isotope: An exquisite jQuery plugin for magical layouts
-
-## Features
-
-+ [**Layout modes**](layout-modes.html): Intelligent, dynamic layouts that can't be achieved with CSS alone.
-+ [**Filtering**](filtering.html): Hide and reveal item elements easily with jQuery selectors.
-+ [**Sorting**](sorting.html): Re-order item elements with sorting. Sorting data can be extracted from just about anything.
-+ **Interoperability**: features can be utilized together for a cohesive experience.
-+ **Progressive enhancement**: Isotope's [animation engine](animating.html) takes advantage of the best browser features when available — CSS transitions and transforms, GPU acceleration — but will also fall back to JavaScript animation for lesser browsers.
-
-## Commercial Licensing
-
-Isotope may be used in commercial projects and applications with the one-time purchase of a commercial license. [Read more about Isotope commercial licensing.](license.html)
-
-
-{% include developer-buy-button.html %} {% include org-buy-button.html %}
-
-Purchasing accepts most credit cards and takes seconds. Once purchased, you'll receive a commercial license PDF and you will be all set to use Isotope in your commercial applications.
-
-For non-commercial, personal, or open source projects and applications, you may use Isotope under the terms of the MIT License. You may use Isotope for free.
-
-### Purchase via PayPal
-
-If you're having trouble using a credit card, try purchasing a license via PayPal:
-
-+ [Buy Developer License via PayPal](http://pul.ly/b/13620)
-+ [Buy Organization License via PayPal](http://pul.ly/b/36595)
-
-## Getting started
-
-Isotope requires jQuery 1.4.3 and greater.
-
-### Markup
-
-Isotope works on a container element with a group of similar child items.
-
-{% highlight html %}
-
-
-
...
-
...
-
...
- ...
-
-
-{% endhighlight %}
-
-### Script
-
-{% highlight javascript %}
-
-$('#container').isotope({
- // options
- itemSelector : '.item',
- layoutMode : 'fitRows'
-});
-
-{% endhighlight %}
-
-[**See Demo: Basic**](../demos/basic.html)
-
-There are a number of [options](options.html) you can specify. Within the options is where you can [set the layout mode](layout-modes.html), [filter items](filtering.html), and [sort items](sorting.html).
-
-Additionally you can specify a callback after the options object. This function will be triggered after the animation has completed.
-
-{% highlight javascript %}
-
-$('#container').isotope({ filter: '.my-selector' }, function( $items ) {
- var id = this.attr('id'),
- len = $items.length;
- console.log( 'Isotope has filtered for ' + len + ' items in #' + id );
-});
-
-{% endhighlight %}
-
-Within this callback this
refers to the container, and `$items` refers to the item elements. Both of these are jQuery objects and do _not_ need to be put in jQuery wrappers.
-
-### CSS
-
-Add these styles to your CSS for [filtering](filtering.html), [animation](animating.html) with CSS transitions, and [adding items](adding-items.html).
-
-{% highlight css %}
-
-/**** Isotope Filtering ****/
-
-.isotope-item {
- z-index: 2;
-}
-
-.isotope-hidden.isotope-item {
- pointer-events: none;
- z-index: 1;
-}
-
-/**** Isotope CSS3 transitions ****/
-
-.isotope,
-.isotope .isotope-item {
- -webkit-transition-duration: 0.8s;
- -moz-transition-duration: 0.8s;
- -ms-transition-duration: 0.8s;
- -o-transition-duration: 0.8s;
- transition-duration: 0.8s;
-}
-
-.isotope {
- -webkit-transition-property: height, width;
- -moz-transition-property: height, width;
- -ms-transition-property: height, width;
- -o-transition-property: height, width;
- transition-property: height, width;
-}
-
-.isotope .isotope-item {
- -webkit-transition-property: -webkit-transform, opacity;
- -moz-transition-property: -moz-transform, opacity;
- -ms-transition-property: -ms-transform, opacity;
- -o-transition-property: -o-transform, opacity;
- transition-property: transform, opacity;
-}
-
-/**** disabling Isotope CSS3 transitions ****/
-
-.isotope.no-transition,
-.isotope.no-transition .isotope-item,
-.isotope .isotope-item.no-transition {
- -webkit-transition-duration: 0s;
- -moz-transition-duration: 0s;
- -ms-transition-duration: 0s;
- -o-transition-duration: 0s;
- transition-duration: 0s;
-}
-
-{% endhighlight %}
-
-## Code repository
-
-This project lives on GitHub at [github.com/desandro/isotope](http://github.com/desandro/isotope). There you can grab the latest code and follow development.
-
-## A word about moderation {: #moderation}
-
-Isotope enables a wealth of functionality. But just because you can take advantage of its numerous features together, doesn't mean you necessarily should. For each each feature you implement with Isotope, consider the benefit gained by users, at the cost of another level of complexity to your interface.
-
-## Acknowledgments
-
-+ [**"Cowboy" Ben Alman**](http://benalman.com/) for [jQuery BBQ](http://benalman.com/projects/jquery-bbq-plugin/) (included with docs)
-+ [**Louis-Rémi Babé**](http://twitter.com/Louis_Remi) for [jQuery smartresize](https://github.com/louisremi/jquery-smartresize) (used within Isotope) and for [jQuery transform](https://github.com/louisremi/jquery.transform.js) which clued me in to using jQuery 1.4.3's CSS hooks
-+ [**Jacek Galanciak**](http://razorjack.net/) for [jQuery Quicksand](http://razorjack.net/quicksand/), an early kernel of inspiration
-+ [**Ralph Holzmann**](http://twitter.com/#!/ralphholzmann) for re-writing the [jQuery Plugins/Authoring tutorial](http://docs.jquery.com/Plugins/Authoring) and opened my eyes to [Plugin Methods](http://docs.jquery.com/Plugins/Authoring#Plugin_Methods) pattern
-+ [**Eric Hynds**](http://www.erichynds.com/) for his article [Using $.widget.bridge Outside of the Widget Factory](http://www.erichynds.com/jquery/using-jquery-ui-widget-factory-bridge/) which provided the architecture for Isotope
-+ [**Paul Irish**](http://paul-irish.com) for [Infinite Scroll](http://infinite-scroll.com) (included with docs), the [imagesLoaded plugin](http://gist.github.com/268257) (included with Isotope), and [Debounced resize() plugin](http://paulirish.com/demo/resize) (provided base for smartresize)
-+ The [**jQuery UI Team**](http://jqueryui.com/about) for [$.widget.bridge](https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js#L113-155) (partially used within Isotope)
-+ The Modernizr team for [Modernizr](http://www.modernizr.com/) (partially used within Isotope)
-+ [**Juriy Zaytsev aka "kangax"**](http://perfectionkills.com) for [getStyleProperty](http://perfectionkills.com/feature-testing-css-properties/) (used within Isotope)
-
-
diff --git a/_posts/docs/2010-12-03-options.mdown b/_posts/docs/2010-12-03-options.mdown
deleted file mode 100644
index 984e3ad..0000000
--- a/_posts/docs/2010-12-03-options.mdown
+++ /dev/null
@@ -1,354 +0,0 @@
----
-
-title: Options
-category: docs
-layout: default
-body_class: option-def
-toc:
- - { title: animationEngine, anchor: animationengine }
- - { title: animationOptions, anchor: animationoptions }
- - { title: containerClass, anchor: containerclass }
- - { title: containerStyle, anchor: containerstyle }
- - { title: filter, anchor: filter }
- - { title: getSortData, anchor: getsortdata }
- - { title: hiddenClass, anchor: hiddenclass }
- - { title: hiddenStyle, anchor: hiddenstyle }
- - { title: itemClass, anchor: itemclass }
- - { title: itemPositionDataEnabled, anchor: itempositiondataenabled }
- - { title: itemSelector, anchor: itemselector }
- - { title: layoutMode, anchor: layoutmode }
- - { title: onLayout, anchor: onlayout }
- - { title: resizable, anchor: resizable }
- - { title: resizesContainer, anchor: resizescontainer }
- - { title: sortAscending, anchor: sortascending }
- - { title: sortBy, anchor: sortby }
- - { title: transformsEnabled, anchor: transformsenabled }
- - { title: visibleStyle, anchor: visiblestyle }
- - { title: Layout-specific options, anchor: layoutspecific_options }
-
----
-
-
-
-## animationEngine
-
-
- animationEngine
- String
- 'best-available'
-
-
-Determines the jQuery method to apply styles, `.css()` or `.animate()`. Useful for relying on CSS transitions to handle animation.
-
-### Values {#animationEngine-values}
-
-
-+ `'best-available'`: if browser supports CSS transitions, Isotope uses `.css()`. If not, falls back to using `.animate()`.
-+ `'css'`: Isotope uses `.css()`
-+ `'jquery'`: Isotope uses `.animate()`
-
-## animationOptions
-
-
- animationOptions
- Object
- { queue: false , duration: 800 }
-
-
-When jQuery is the animation engine (see above), these options will be used in .animate()
. See the [jQuery API for animate options](http://api.jquery.com/animate/#animate-properties-options) for details.
-
-### Example
-
-{% highlight javascript %}
-
-$('#container').isotope({
- animationOptions: {
- duration: 750,
- easing: 'linear',
- queue: false
- }
-});
-
-{% endhighlight %}
-
-## containerClass
-
-
- containerClass
- String
- 'isotope'
-
-
-The class applied to the container element.
-
-## containerStyle
-
-
- containerStyle
- Object
- { position: 'relative' , overflow: 'hidden' }
-
-
-CSS styles applied to the container element. Relative positioning enables absolute positioning on child items. Hidden overflow ensures that filtered items that lie outside the container do not interfer with subsequent content.
-
-## filter
-
-
- filter
- Selector
-
-
-Setting a filter with show item elements that match the selector, and hide elements that do not match. See [docs on filering](filtering.html) for more details.
-
-[**See Demo: Filtering**](../demos/filtering.html)
-
-### Values {#filter-values}
-
-
-
- '*'
or ''
(an empty string): Shows all item elements
-
-
-
-## getSortData
-
-
- getSortData
- Object
-
-
-An object containing one or several methods to retrieve data for Sorting. The methods receive one parameter (`$elem` in the example below) which is a jQuery object representing each item element. The methods need to return a value. See [docs on sorting](sorting.html) for more details.
-
-[**See Demo: Sorting**](../demos/sorting.html)
-
-### Example
-
-{% highlight javascript %}
-
-$('#container').isotope({
- getSortData : {
- symbol : function( $elem ) {
- return $elem.attr('data-symbol');
- },
- number : function( $elem ) {
- return parseInt( $elem.find('.number').text(), 10 );
- },
- name : function ( $elem ) {
- return $elem.find('.name').text();
- }
- }
-});
-
-{% endhighlight %}
-
-## hiddenClass
-
-
- hiddenClass
- String
- 'isotope-hidden'
-
-
-The class applied to item elements hidden by Filtering.
-
-## hiddenStyle
-
-
- hiddenStyle
- Object
- { opacity : 0 , scale : 0.001 }
-
-
-The style applied to item elements hidden by Filtering.
-
-## itemClass
-
-
- itemClass
- String
- 'isotope-item'
-
-
-The class applied to item elements.
-
-## itemPositionDataEnabled
-
-
- itemPositionDataEnabled
- Boolean
- false
-
-
-When enabled, the position of item elements will exposed as data, which you can retrieve with jQuery's data method with 'isotope-item-position'
name space. Position is return as an object with `x` and `y`;
-
-### Example
-
-{% highlight javascript %}
-
-$('#container').isotope({
- itemSelector: '.element',
- itemPositionDataEnabled: true
-})
-// log position of each item
-.find('.element').each(function(){
- var position = $(this).data('isotope-item-position');
- console.log('item position is x: ' + position.x + ', y: ' + position.y );
-});
-
-{% endhighlight %}
-
-## itemSelector
-
-
- itemSelector
- Selector
-
-
-Restricts Isotope item elements to selector.
-
-## layoutMode
-
-
- layoutMode
- String
- 'masonry'
-
-
-See also docs on [Layout modes](layout-modes.html).
-
-[**See Demo: Layout modes**](../demos/layout-modes.html)
-
-## onLayout
-
-
- onLayout
- Function
-
-
-Similiar to a callback, `onLayout` is a function that will be triggered after every time an Isotope instance runs through its layout logic.
-
-{% highlight javascript %}
-
-$('#container').isotope({
- onLayout: function( $elems, instance ) {
- // `this` refers to jQuery object of the container element
- console.log( this.height() );
- // callback provides jQuery object of laid-out item elements
- $elems.css({ background: 'blue' });
- // instance is the Isotope instance
- console.log( instance.$filteredAtoms.length );
- }
-});
-
-{% endhighlight %}
-
-## resizable
-
-
- resizable
- Boolean
- true
-
-
-Triggers layout logic when browser window is resized.
-
-## resizesContainer
-
-
- resizesContainer
- Boolean
- true
-
-
-Isotope will set the height (for vertical layout modes) or width (for horizontal layout modes) of the container after layout. If `resizesContainer` is set to false
, be sure to set a size for the container in your CSS, so it doesn't collapse when Isotope is triggered.
-
-## sortAscending
-
-
- sortAscending
- Boolean
- true
-
-
-Used with sorting. If true, items are sorted ascending: "1, 2, 3" or "A, B, C...". If false, items are sorted descending "Z, Y, X" or "9, 8, 7...". See [docs on sorting](sorting.html) for more details.
-
-[**See Demo: Sorting**](../demos/sorting.html)
-
-## sortBy
-
-
- sortBy
- String
-
-
-The property name of the method within the `getSortData` option to sort item elements. See [docs on sorting](sorting.html) for more details.
-
-[**See Demo: Sorting**](../demos/sorting.html)
-
-### Values {#sortBy-values}
-
-+ `'original-order'` Sorts item elements by their original order.
-
-## transformsEnabled
-
-
- transformsEnabled
- Boolean
- true
-
-
-Isotope uses CSS3 transforms to position item elements, when available in the browser. Setting `transformsEnabled` to false
will disable this feature so all browsers use top/left absolute positioning. Useful for [resolving issues with CSS transforms](help.html#css-transforms).
-
-### Additional CSS {#transformsEnabled-css}
-
-If you do disable transforms, but still want to use [CSS transitions](animating.html#css_transitions), you'll need add the following CSS:
-
-{% highlight css %}
-
-.isotope .isotope-item {
- -webkit-transition-property: top, left, opacity;
- -moz-transition-property: top, left, opacity;
- -ms-transition-property: top, left, opacity;
- -o-transition-property: top, left, opacity;
- transition-property: top, left, opacity;
-}
-
-{% endhighlight %}
-
-## visibleStyle
-
-
- visibleStyle
- Object
- { opacity : 1 , scale : 1 }
-
-
-The style applied to item elements made visible by Filtering.
-
-## Layout-specific options
-
-In addition the general options listed above, certain layout modes each have their own options. In order to avoid conflict, these options are set with an option that matches the name of the layout mode.
-
-See docs on [layout modes](layout-modes.html) for each layout mode's available options.
-
-For example, if your layout switched from `masonry` to `cellsByRow`:
-
-{% highlight javascript %}
-
-$('#container').isotope({
- masonry: {
- columnWidth: 120
- },
- cellsByRow: {
- columnWidth: 220,
- rowHeight: 220
- }
-});
-
-{% endhighlight %}
-
-[**See Demo: Layout modes**](../demos/layout-modes.html)
\ No newline at end of file
diff --git a/_posts/docs/2010-12-04-methods.mdown b/_posts/docs/2010-12-04-methods.mdown
deleted file mode 100644
index 0d12cbf..0000000
--- a/_posts/docs/2010-12-04-methods.mdown
+++ /dev/null
@@ -1,159 +0,0 @@
----
-
-title: Methods
-category: docs
-layout: default
-toc:
- - { title: addItems, anchor: additems }
- - { title: appended, anchor: appended }
- - { title: destroy, anchor: destroy }
- - { title: insert, anchor: insert }
- - { title: layout, anchor: layout }
- - { title: option, anchor: option }
- - { title: reLayout, anchor: relayout }
- - { title: reloadItems, anchor: reloaditems }
- - { title: remove, anchor: remove }
- - { title: shuffle, anchor: shuffle }
- - { title: updateSortData, anchor: updatesortdata }
-
----
-
-Isotope offers several methods to extend functionality. Isotope's methods follow the jQuery UI pattern.
-
-{% highlight javascript %}
-
-$('#container').isotope( 'methodName', [optionalParameters] )
-
-{% endhighlight %}
-
-## addItems
-
-{% highlight javascript %}
-
-.isotope( 'addItems', $items, callback )
-
-{% endhighlight %}
-
-Adds item elements to the pool of item elements of the container, but does not sort, filter or layout. See [Adding items](adding-items.html) for more details. The argument within the callback is the group of elements that were added.
-
-[**See Demo: Adding items**](../demos/adding-items.html)
-
-## appended
-
-{% highlight javascript %}
-
-.isotope( 'appended', $items, callback )
-
-{% endhighlight %}
-
-Adds item elements via `addItems` method, then triggers `layout` just for those new elements. Useful for Infinite Scroll. See [Adding items](adding-items.html) for more details.
-
-[**See Demo: Adding items**](../demos/adding-items.html)
-
-## destroy
-
-{% highlight javascript %}
-
-.isotope( 'destroy' )
-
-{% endhighlight %}
-
-Removes Isotope functionality completely. Returns element back to pre-init state.
-
-## insert
-
-{% highlight javascript %}
-
-.isotope( 'insert', $items, callback )
-
-{% endhighlight %}
-
-Appends items elements to container, adds items to via `addItems` method, and then triggers `reLayout` method so new elements are properly filtered, sorted and laid-out. See [Adding items](adding-items.html) for more details.
-
-[**See Demo: Adding items**](../demos/adding-items.html).
-
-## layout
-
-{% highlight javascript %}
-
-.isotope( 'layout', $items, callback )
-
-{% endhighlight %}
-
-Positions specified item elements in layout.
-
-`layout` will only position specified elements, and those elements will be positioned at the end of layout. Whereas `reLayout` will position all elements in the Isotope widget.
-
-## option
-
-{% highlight javascript %}
-
-.isotope( 'option', options )
-
-{% endhighlight %}
-
-Sets options for plugin instance. Unlike passing options through `.isotope()`, using the `option` method will not trigger layout.
-
-{% highlight javascript %}
-
-// sets multiple options
-.isotope( 'option', { layoutMode: 'fitRows', filter: '.my-filter' } )
-
-{% endhighlight %}
-
-
-## reLayout
-
-{% highlight javascript %}
-
-.isotope( 'reLayout', callback )
-
-{% endhighlight %}
-
-Resets layout properties and lays-out every item element.
-
-[**See Demo: reLayout**](../demos/relayout.html)
-
-## reloadItems
-
-{% highlight javascript %}
-
-.isotope( 'reloadItems' )
-
-{% endhighlight %}
-
-Re-collects all item elements in their current order in the DOM. Useful for prepending.
-
-[**See Demo: Adding items**](../demos/adding-items.html).
-
-## remove
-
-{% highlight javascript %}
-
-.isotope( 'remove', $items, callback )
-
-{% endhighlight %}
-
-Removes specified item elements from Isotope widget and the DOM.
-
-[**See Demo: Removing**](../demos/removing.html).
-
-## shuffle
-
-{% highlight javascript %}
-
-.isotope( 'shuffle', callback )
-
-{% endhighlight %}
-
-Shuffles order of items. Sets [`sortBy` option](options.html#sortby) to [`'random'`](sorting.html#sortby_option).
-
-## updateSortData
-
-{% highlight javascript %}
-
-.isotope( 'updateSortData', $items )
-
-{% endhighlight %}
-
-Updates the sorting data on specified item elements. This method is useful if the data within an item is changed dynamically after Isotope has been initialized.
diff --git a/_posts/docs/2010-12-05-layout-modes.mdown b/_posts/docs/2010-12-05-layout-modes.mdown
deleted file mode 100644
index d0de3db..0000000
--- a/_posts/docs/2010-12-05-layout-modes.mdown
+++ /dev/null
@@ -1,191 +0,0 @@
----
-
-title: Layout modes
-category: docs
-layout: default
-body_class: option-def
-toc:
- - { title: Horizontal layouts, anchor: horizontal_layouts }
- - { title: cellsByColumn, anchor: cellsbycolumn }
- - { title: cellsByRow, anchor: cellsbyrow }
- - { title: fitColumns, anchor: fitcolumns }
- - { title: fitRows, anchor: fitrows }
- - { title: masonry, anchor: masonry }
- - { title: masonryHorizontal, anchor: masonryhorizontal }
- - { title: straightAcross, anchor: straightacross }
- - { title: straightDown, anchor: straightdown }
- - { title: Modified layout modes, anchor: modified_layout_modes }
-
----
-
-Isotope has a versatile layout engine that can accommodate multiple layout modes. You can set and change the layout mode via the `layoutMode` option.
-
-[**See Demo: Layout modes**](../demos/layout-modes.html)
-
-### Example
-
-{% highlight javascript %}
-
-$('#container').isotope({ layoutMode : 'fitRows' });
-
-{% endhighlight %}
-
-Several layout modes are built into Isotope.
-
-### Horizontal layouts
-
-Horizontal layout modes (masonryHorizontal, fitColumns, cellsByColumn, and straightAcross) need a container that has a height value. Be sure that your CSS has height set.
-
-{% highlight css %}
-
-#container {
- /* either of these will work for horizontal Isotope layouts */
- height: 80%;
- height: 480px;
-}
-
-{% endhighlight %}
-
-## cellsByColumn
-
-A **horizontal** grid layout where items are centered inside each cell. The grid is defined by two options, `columnWidth` and `rowHeight`. The horizontal equivalent of cellsByRow.
-
-### Options {#cellsByColumn-options}
-
-
- columnWidth
- Integer
-
-
- rowHeight
- Integer
-
-
-### Example {#cellsByColumn-example}
-
-{% highlight javascript %}
-
-$('#container').isotope({
- layoutMode: 'cellsByColumn',
- cellsByColumn: {
- columnWidth: 240,
- rowHeight: 360
- }
-});
-
-{% endhighlight %}
-
-
-## cellsByRow
-
-A **vertical** grid layout where items are centered inside each cell. The grid is defined by two options, `columnWidth` and `rowHeight`.
-
-### Options {#cellsByRow-options}
-
-
- columnWidth
- Integer
-
-
- rowHeight
- Integer
-
-
-### Example {#cellsByRow-example}
-
-{% highlight javascript %}
-
-$('#container').isotope({
- layoutMode: 'cellsByRow',
- cellsByRow: {
- columnWidth: 240,
- rowHeight: 360
- }
-});
-
-{% endhighlight %}
-
-## fitColumns
-
-Item elements are arranged into columns. Columns progress **horizontally** from left to right. Items within those columns are arranged top-to-bottom. The horizontal equivalent of fitRows.
-
-## fitRows
-
-Item elements are arranged into rows. Rows progress **vertically** top to bottom. Similar to what you would expect from a layout that uses `float: left`.
-
-## masonry
-
-Masonry is the default layout mode for Isotope. Item elements are arranged intelligently within a **vertical** grid. For each item element, the script calculates the next best fit for the item within the grid.
-
-### Options {#masonry-options}
-
-
- columnWidth
- Integer
-
-
-The width of one column in the grid. If no value is set for `columnWidth`, default is the width of the first item element.
-
-### Example {#masonry-example}
-
-{% highlight javascript %}
-
-$('#container').isotope({
- masonry: {
- columnWidth: 240
- }
-});
-
-{% endhighlight %}
-
-
-## masonryHorizontal
-
-The **horizontal** equivalent of masonry layout. Instead of progressing top-to-bottom, masonryHorizontal layout will progress left-to-right. Item elements are arranged intelligently within a grid. For each item element, the script calculates the next best fit for the item within the grid.
-
-### Options {#masonryHorizontal-options}
-
-
- rowHeight
- Integer
-
-
-The width of one column in the grid. If no value is set for `rowHeight`, default is the height of the first item element.
-
-### Example {#masonryHorizontal-example}
-
-{% highlight javascript %}
-
-$('#container').isotope({
- masonryHorizontal: {
- rowHeight: 360
- }
-});
-
-{% endhighlight %}
-
-## straightAcross
-
-Item elements are arranged **horizontally** left to right. Useful for simple lists.
-
-## straightDown
-
-Item elements are arranged **vertically** top to bottom. Useful for simple lists.
-
-## Modified layout modes
-
-[Isotope's methods can be extended and overwritten](extending-isotope.html) to shim-in additional functionality. See these modified layout modes:
-
-+ [**Centered masonry**](../custom-layout-modes/centered-masonry.html)
-+ [**Masonry corner stamp**](../custom-layout-modes/masonry-corner-stamp.html)
-+ [**Masonry gutters**](../custom-layout-modes/masonry-gutters.html)
-
-To use these mods, copy the revised methods found in the demos' page source. They look like:
-
-{% highlight javascript %}
-
-$.Isotope.prototype._masonryReset = function() {
- // modified code..
-};
-
-{% endhighlight %}
diff --git a/_posts/docs/2010-12-06-filtering.mdown b/_posts/docs/2010-12-06-filtering.mdown
deleted file mode 100644
index bb14ba9..0000000
--- a/_posts/docs/2010-12-06-filtering.mdown
+++ /dev/null
@@ -1,109 +0,0 @@
----
-
-title: Filtering
-category: docs
-layout: default
-toc:
- - { title: Markup, anchor: markup }
- - { title: jQuery script, anchor: jquery_script }
- - { title: Creating interactive buttons, anchor: creating_interactive_buttons }
- - { title: Recommended CSS, anchor: recommended_css }
-
----
-
-Isotope can hide and show item elements via the [`filter` option](options.html#filter). `filter` accepts a jQuery selector. Items that match that selector will be shown. Items that do not match will be hidden.
-
-[**See Demo: Filtering**](../demos/filtering.html)
-
-## Markup
-
-Each item element has several identifying classes. In this case, `transition`, `metal`, `lanthanoid`, `alkali`, etc.
-
-{% highlight html %}
-
-
-
...
-
...
-
...
-
...
-
...
-
...
-
...
- ...
-
-
-{% endhighlight %}
-
-## jQuery script
-
-To show only `.metal` items, the jQuery script would be:
-
-{% highlight javascript %}
-
-$('#container').isotope({ filter: '.metal' });
-
-{% endhighlight %}
-
-The `filter` option uses a [jQuery selector](http://api.jquery.com/category/selectors/) to show item elements that match a selector, and hide all others that do not. For example:
-
-+ `.alkali, .alkaline-earth` will show `.alkali` AND ` .alkaline-earth` item elements.
-+ `.metal.transition` will show item elements that have BOTH `.metal` and `.transition` classes.
-+ `.metal:not(.transition)` will show `.metal` item elements that are NOT `.transition`.
-
-## Creating interactive buttons
-
-Let's use a basic list for our buttons
-
-{% highlight html %}
-
-
-
-{% endhighlight %}
-
-Here we set the filter for each link with a `data-filter` attribute. In our jQuery script, whenever a link is clicked, we'll use this attribute as the filter selector.
-
-{% highlight javascript %}
-
-// cache container
-var $container = $('#container');
-// initialize isotope
-$container.isotope({
- // options...
-});
-
-// filter items when filter link is clicked
-$('#filters a').click(function(){
- var selector = $(this).attr('data-filter');
- $container.isotope({ filter: selector });
- return false;
-});
-
-{% endhighlight %}
-
-## Recommended CSS
-
-If you choose to use the filtering functionality, add the following CSS to your stylesheet:
-
-{% highlight css %}
-
-/**** Isotope filtering ****/
-
-.isotope-item {
- z-index: 2;
-}
-
-.isotope-hidden.isotope-item {
- pointer-events: none;
- z-index: 1;
-}
-
-{% endhighlight %}
-
-These styles ensure that hidden items will not interfere with interactions.
diff --git a/_posts/docs/2010-12-07-sorting.mdown b/_posts/docs/2010-12-07-sorting.mdown
deleted file mode 100644
index 7e2aceb..0000000
--- a/_posts/docs/2010-12-07-sorting.mdown
+++ /dev/null
@@ -1,169 +0,0 @@
----
-
-title: Sorting
-category: docs
-layout: default
-toc:
- - { title: Markup, anchor: markup }
- - { title: getSortData option, anchor: getsortdata_option }
- - { title: sortBy option, anchor: sortby_option }
- - { title: sortAscending option, anchor: sortascending_option }
- - { title: Creating interactive buttons, anchor: creating_interactive_buttons }
-
----
-
-Collect data from item element and rearrange their order in the layout with sorting.
-
-[**See Demo: Sorting**](../demos/sorting.html)
-
-## Markup
-
-Any group of similar items have their own data. It could be a text value, like a title or tag, or a numerical value, like a measurement or grade. For our example, each item element has several data points that can be used for sorting. There's the elemental symbol, number, name of the element, weight, and category.
-
-{% highlight html %}
-
-
-
-{% endhighlight %}
-
-
-## getSortData option
-
-In order to extract this data from the element, we need to pass in a function to get it via the [`getSortData`](options.html#getsortdata) option. This option accepts an object, whose values are the functions to extract the data.
-
-Each function receives one argument, which represents a jQuery object for each item element. With that argument, the function needs to return the data point.
-
-In the example above, to get element name, we would need to get the text from the `.name` element. The same works for symbol.
-
-{% highlight javascript %}
-
-$('#container').isotope({
- getSortData : {
- name : function ( $elem ) {
- return $elem.find('.name').text();
- },
- symbol : function ( $elem ) {
- return $elem.find('.symbol').text();
- }
- }
-});
-
-{% endhighlight %}
-
-
-For numerical data, we can convert a text value into a number with `parseInt()` or `parseFloat()`.
-
-{% highlight javascript %}
-
-getSortData : {
- // ...
- number : function ( $elem ) {
- return parseInt( $elem.find('.number').text(), 10 );
- },
- weight : function ( $elem ) {
- return parseFloat( $elem.find('.weight').text() );
- }
-}
-
-{% endhighlight %}
-
-The data extracted can be anything accessible in the item element via jQuery. To extract the category data held within the `data-category` attribute, we can use the `.attr()`.
-
-{% highlight javascript %}
-
-getSortData : {
- // ...
- category : function ( $elem ) {
- return $elem.attr('data-category');
- }
-}
-
-{% endhighlight %}
-
-Get creative! You could sort a list by the width of each item element.
-
-{% highlight javascript %}
-
-getSortData : {
- // ...
- width : function( $elem ) {
- return $elem.width();
- }
-}
-
-{% endhighlight %}
-
-## sortBy option
-
-For every method set in `getSortData`, Isotope uses that method to build the data for sorting. The data cache is built on initialization so it can be quickly accessed when sorting. With the methods above, we have built data for an item elements name, symbol, number, weight and category.
-
-Sorting elements is done with the [`sortBy` option](options.html#sortby). The value needs to match the property name used in the `getSortData` object.
-
-With our example, we can use `'name'`, `'symbol'`, `'number'`, `'weight'` and `'category'`.
-
-{% highlight javascript %}
-
-$('#container').isotope({ sortBy : 'symbol' });
-
-{% endhighlight %}
-
-There are two additional sorting data methods built in to Isotope.
-
-+ `'original-order'` will use the original order of the item elements to arrange them in the layout.
-+ `'random'` is a random order.
-
-## sortAscending option
-
-By default, Isotope sorts data in ascension. If our data for name is "Gold, Antimony, Lead, Iron, Silver", when sorted by name, the elements will be ordered ABC.. : "Antimony, Gold, Iron, Lead, Silver." To reverse the order and sort data in descension, set [`sortAscending`](options.html#sortascending) to false
.
-
-{% highlight javascript %}
-
-$('#container').isotope({
- sortBy : 'name',
- sortAscending : false
-});
-
-{% endhighlight %}
-
-## Creating interactive buttons
-
-We can use a simple list for our buttons.
-
-{% highlight html %}
-
-
-
-{% endhighlight %}
-
-When one of these links is clicked, we can use the `href` attribute as the value for `sortBy` in the Isotope script.
-
-{% highlight javascript %}
-
-$('#sort-by a').click(function(){
- // get href attribute, minus the '#'
- var sortName = $(this).attr('href').slice(1);
- $('#container').isotope({ sortBy : sortName });
- return false;
-});
-
-{% endhighlight %}
diff --git a/_posts/docs/2010-12-09-animating.mdown b/_posts/docs/2010-12-09-animating.mdown
deleted file mode 100644
index f991ba2..0000000
--- a/_posts/docs/2010-12-09-animating.mdown
+++ /dev/null
@@ -1,100 +0,0 @@
----
-
-title: Animating
-category: docs
-layout: default
-toc:
- - { title: animationEngine option, anchor: animationengine_option }
- - { title: CSS transitions, anchor: css_transitions }
- - { title: Variations, anchor: variations }
-
----
-
-Isotope was developed to take advantage of the best browser features available. For animations, you can use CSS3 transitions and transforms in capable browsers. Isotope provides Javascript animation fall back for lesser browsers.
-
-
-## animationEngine option
-
-You can control how Isotope handles animation with the [`animationEngine`](options.html#animationengine) option. This option has three values which control whether jQuery applies styles with`.css()` or `.animate()`.
-
-+ `'best-available'`: if browser supports CSS transitions, Isotope uses `.css()`. If not, falls back to using `.animate()`.
-+ `'css'`: Isotope uses `.css()`
-+ `'jquery'`: Isotope uses `.animate()`
-
-## CSS transitions
-
-To enable animation with CSS transitions, you'll need the following code in your CSS:
-
-{% highlight css %}
-
-.isotope,
-.isotope .isotope-item {
- /* change duration value to whatever you like */
- -webkit-transition-duration: 0.8s;
- -moz-transition-duration: 0.8s;
- -ms-transition-duration: 0.8s;
- -o-transition-duration: 0.8s;
- transition-duration: 0.8s;
-}
-
-.isotope {
- -webkit-transition-property: height, width;
- -moz-transition-property: height, width;
- -ms-transition-property: height, width;
- -o-transition-property: height, width;
- transition-property: height, width;
-}
-
-.isotope .isotope-item {
- -webkit-transition-property: -webkit-transform, opacity;
- -moz-transition-property: -moz-transform, opacity;
- -ms-transition-property: -ms-transform, opacity;
- -o-transition-property: -o-transform, opacity;
- transition-property: transform, opacity;
-}
-
-/**** disabling Isotope CSS3 transitions ****/
-
-.isotope.no-transition,
-.isotope.no-transition .isotope-item,
-.isotope .isotope-item.no-transition {
- -webkit-transition-duration: 0s;
- -moz-transition-duration: 0s;
- -ms-transition-duration: 0s;
- -o-transition-duration: 0s;
- transition-duration: 0s;
-}
-
-{% endhighlight %}
-
-## Variations
-
-With these two options you can finely control how animation is handled across browsers.
-
-### Best available (recommended)
-
-Browsers that support CSS transitions will use them. Other browsers will fall back to using jQuery animation.
-
-+ **Add** CSS transition declarations
-
-### Always use jQuery
-
-All browsers will use jQuery animation, regardless of their CSS transition support.
-
-+ `animationEngine : 'jquery'`
-+ **No** CSS transition declarations
-
-Never set `animationEngine : 'jquery'` AND add CSS transition declarations. This will cause double-animation in browser that support CSS transitions — which is a bad thing.
-
-### Only CSS transitions
-
-+ `animationEngine: 'css'`
-+ **Add** CSS transition declarations
-
-### None
-
-Animation is not enabled in any browser
-
-+ `animationEngine : 'css'`
-+ **No** CSS transition declarations
-
diff --git a/_posts/docs/2010-12-10-adding-items.mdown b/_posts/docs/2010-12-10-adding-items.mdown
deleted file mode 100644
index f74af8f..0000000
--- a/_posts/docs/2010-12-10-adding-items.mdown
+++ /dev/null
@@ -1,79 +0,0 @@
----
-
-title: Adding items
-category: docs
-layout: default
-toc:
- - { title: addItems method, anchor: additems_method }
- - { title: insert method, anchor: insert_method }
- - { title: appended method, anchor: appended_method }
- - { title: Prepending, anchor: prepending }
- - { title: Recommended CSS, anchor: recommended_css }
-
----
-
-If your application dynamically adds new content, Isotope provides several methods to add items.
-
-[**See Demo: Adding items**](../demos/adding-items.html).
-
-## addItems method
-
-The [`addItems` method](methods.html#additems) adds new content to an Isotope container. This applies the proper styles to the items so they can be positioned and any sorting data is retrieved. But that's it. The new content will _not_ be filtered, sorted, or positioned properly, nor will it be appended to the container element.
-
-{% highlight javascript %}
-
-var $newItems = $('
');
-$('#container').append( $newItems ).isotope( 'addItems', $newItems );
-
-{% endhighlight %}
-
-## insert method
-
-More likely, you want to use the [`insert` method](methods.html#insert), which does everything that `addItems` misses. `insert` will append the content to the container, filter the new content, sort all the content, then trigger a `reLayout` so all item elements are properly laid out.
-
-{% highlight javascript %}
-
-var $newItems = $('
');
-$('#container').isotope( 'insert', $newItems );
-
-{% endhighlight %}
-
-## appended method
-
-The [`appended` method](methods.html#appended) is a convenience method triggers `addItems` on new content, then lays out _only the new content_ at the end of the layout. This method is useful if you know you only want to add new content to the end, and **not** use filtering or sorting. `appended` is the best method to use with Infinite Scroll.
-
-[**See Demo: Infinite Scroll**](../demos/infinite-scroll.html).
-
-See also [Infinite Scroll with filtering or sorting](help.html#infinite_scroll_with_filtering_or_sorting)
-
-## Prepending
-
-Because of Isotope's sorting functionality, prepending isn't as straight forward as might expect. However, it can be replicated fairly easy. After prepending new content to the container, you can re-collect all the item elements and update their sorting order with the [`reloadItems` method](methods.html#reloaditems). Then trigger a re-layout, with the original DOM order.
-
-{% highlight javascript %}
-
-var $newItems = $('
');
-$('#container').prepend( $newItems)
- .isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' });
-
-{% endhighlight %}
-
-## Recommended CSS
-
-You'll need these styles in your CSS for the reveal animation when adding items.
-
-{% highlight css %}
-
-/**** disabling Isotope CSS3 transitions ****/
-
-.isotope.no-transition,
-.isotope.no-transition .isotope-item,
-.isotope .isotope-item.no-transition {
- -webkit-transition-duration: 0s;
- -moz-transition-duration: 0s;
- -ms-transition-duration: 0s;
- -o-transition-duration: 0s;
- transition-duration: 0s;
-}
-
-{% endhighlight %}
diff --git a/_posts/docs/2011-05-25-extending-isotope.mdown b/_posts/docs/2011-05-25-extending-isotope.mdown
deleted file mode 100644
index 082ed50..0000000
--- a/_posts/docs/2011-05-25-extending-isotope.mdown
+++ /dev/null
@@ -1,174 +0,0 @@
----
-
-title: Extending Isotope
-category: docs
-layout: default
-toc:
- - { title: Custom layout modes, anchor: custom_layout_modes }
-
----
-
-Isotope uses a constructor pattern, `$.Isotope`. To extend Isotope, you need only to add a method to `$.Isotope.prototype`.
-
-{% highlight javascript %}
-
-$.Isotope.prototype.myMethod = function() { ... };
-
-// or, using jQuery extend utility
-$.extend( $.Isotope.prototype, {
- myMethod : function() { ... }
-});
-
-{% endhighlight %}
-
-Before diving in, try [looking over the source](../jquery.isotope.js) to get a better understand of the internal logic behind Isotope.
-
-## Custom layout modes
-
-Isotope's layout modes are built around four methods: `Reset`, `Layout`, `GetContainerSize`, and `ResizeChanged`. These methods are the hooks that allow you to develop your own custom layout mode, without getting your hands dirty dealing with sorting, filtering, or other functionality. These layout mode methods need to be prefixed with an underscore and the name of the layout mode.
-
-{% highlight javascript %}
-
-// adding layout mode methods for 'customMode'
-$.extend( $.Isotope.prototype, {
- _customModeReset : function() { ... },
- _customModeLayout : function( $elems ) { ... },
- _customModeGetContainerSize : function() { ... },
- _customModeResizeChanged : function() { ... }
-});
-
-{% endhighlight %}
-
-[**See Custom layout mode: Category Rows**](../custom-layout-modes/category-rows.html)
-[**See Custom layout mode: Spine align**](../custom-layout-modes/spine-align.html)
-
-All of the [default layout modes](../docs/layout-modes.html) follow this pattern. We'll look at the code behind the _fitRows_ layout mode.
-
-### Reset
-
-Each layout mode should have its own set of properties that only it can use and not be affected by other layout modes. These properties can be accessed in the instance as an object whose value matches the layout mode name (i.e. `this.fitRows` for _fitRows_).
-
-The `Reset` layout mode method is called with every `reLayout`, where Isotope will go through each item element and position it. This method resets layout mode properties.
-
-The _fitRows_ layout mode keeps track of x and y position, as well as the height of the container. These properties are set back to zero in `Reset`.
-
-{% highlight javascript %}
-
-_fitRowsReset : function() {
- this.fitRows = {
- x : 0,
- y : 0,
- height : 0
- };
-},
-
-{% endhighlight %}
-
-### Layout
-
-The `Layout` layout mode method is where items are positioned. Most of your layout logic happens here. This method provides one argument `$elems` -- a jQuery object with the item elements that need to be positioned.
-
-`$elems.each` is the principle loop, iterating over each item element and positioning it. Items are positioned with the `_pushPosition` method (see below). The layout modes properties are
-
-For _fitRows_, items are placed with the `this.fitRows.x` and `this.fitRows.y` values. This position is determined by if the item can fit in the current row, or if a new row needs to be started.
-
-{% highlight javascript %}
-
-_fitRowsLayout : function( $elems ) {
- var instance = this,
- containerWidth = this.element.width(),
- props = this.fitRows;
-
- $elems.each( function() {
- var $this = $(this),
- atomW = $this.outerWidth(true),
- atomH = $this.outerHeight(true);
-
- if ( props.x !== 0 && atomW + props.x > containerWidth ) {
- // if this element cannot fit in the current row
- props.x = 0;
- props.y = props.height;
- }
-
- // position the atom
- instance._pushPosition( $this, props.x, props.y );
-
- props.height = Math.max( props.y + atomH, props.height );
- props.x += atomW;
-
- });
-},
-
-{% endhighlight %}
-
-### GetContainerSize
-
-After the script goes through positioning each item, it needs to resize the container. `GetContainerSize` returns the style for the size of the container.
-
-In _fitRows_, the height property is returned as the value for height.
-
-{% highlight javascript %}
-
-_fitRowsGetContainerSize : function () {
- return { height : this.fitRows.height };
-},
-
-{% endhighlight %}
-
-### ResizeChanged
-
-`ResizeChanged` is triggered whenever the browser window is resized. Before Isotope adjusts the layout, this method is triggered to determine if the layout has actually changed. The methods return a boolean.
-
-{% highlight javascript %}
-
-_fitRowsResizeChanged : function() {
- return true;
-},
-
-{% endhighlight %}
-
-### Helper methods
-
-The `_pushPosition` method is used within a layout mode's `Layout` method. It takes 3 arguments: the item element currently being positioned, the x position, and the y position.
-
-{% highlight javascript %}
-
-_pushPosition( $item, x, y )
-
-{% endhighlight %}
-
-`_getSegments` is used within the layout mode's `Reset` method. It performs several utilities:
-
-+ Determines the `columnWidth` for the layout mode (`rowHeight` for horizontal layout modes). This is either passed in as an option (i.e. `masonry { columnWidth: 90 }`), or the width of the first item element. This property is then set for the layout mode, i.e. `this.masonry.columnWidth`.
-+ Calculates the number of number of columns (or rows, if horizontal) given the size of the container. This property is then set for the layout mode, i.e. `this.masonry.cols`.
-
-{% highlight javascript %}
-
-_getSegments( isHorizontal )
-
-// for example
-_cellsByRowReset : function() {
- this.cellsByRow = {
- index : 0
- };
- // get this.cellsByRow.columnWidth
- this._getSegments();
- // get this.cellsByRow.rowHeight
- this._getSegments(true);
-},
-
-{% endhighlight %}
-
-Similarly, `_checkIfSegmentsChanged` is used within `ResizeChanged`. It returns a boolean indicating whether or not the number of columns or rows has changed since the window has been resized.
-
-{% highlight javascript %}
-
-_checkIfSegmentsChanged( isHorizontal )
-
-// for example
-_masonryResizeChanged : function() {
- return this._checkIfSegmentsChanged();
-},
-
-{% endhighlight %}
-
diff --git a/_posts/docs/2011-06-16-hash-history-jquery-bbq.mdown b/_posts/docs/2011-06-16-hash-history-jquery-bbq.mdown
deleted file mode 100644
index 04375bd..0000000
--- a/_posts/docs/2011-06-16-hash-history-jquery-bbq.mdown
+++ /dev/null
@@ -1,86 +0,0 @@
----
-
-title: Hash history with jQuery BBQ
-category: docs
-layout: default
-toc:
- - { title: Markup, anchor: markup }
- - { title: jQuery script, anchor: jquery_script }
-
----
-
-As cool as Isotope is, the only thing that could make it even cooler would be adding bookmark-able URL hashes. Ben Alman's [jQuery BBQ](http://benalman.com/projects/jquery-bbq-plugin/) allows us to do just that.
-
-> jQuery BBQ leverages the HTML5 hashchange event to allow simple, yet powerful bookmarkable #hash history.
-
-[**See Demo: Hash history**](../demos/hash-history.html)
-
-BBQ is a marvelous plugin that provides for a lot more functionality. The [hash history demo](../demos/hash-history.html) uses multiple options (`sortBy`, `sortAscending`, and `layoutMode` in addition to `filter`), the ability to use back-button history, and properly highlights selected links.
-
-Given BBQ's tremendous capabilities, the code can grow to be a bit complex. Be sure to read through [BBQ's docs](http://benalman.com/code/projects/jquery-bbq/docs/files/jquery-ba-bbq-js.html) and take look at [its examples](http://benalman.com/code/projects/jquery-bbq/examples/) before you dive in and code up your own solution.
-
-## Markup
-
-Instead of setting the option values and keys with `data` attributes, we can add the option in the `href` for each link.
-
-{% highlight html %}
-
-
-
-{% endhighlight %}
-
-The `href` value is a serialized string, suitable for a URL. These values can be created with [jQuery.param()](http://api.jquery.com/jQuery.param/).
-
-{% highlight javascript %}
-
-$.param({ filter: '.metal' })
-// >> "filter=.metal"
-$.param({ filter: '.alkali, alkaline-earth' })
-// >> "filter=.alkali%2C+alkaline-earth"
-$.param({ filter: ':not(.transition)' })
-// >> "#filter=%3Anot(.transition)"
-
-{% endhighlight %}
-
-## jQuery script
-
-These serialized `href` values can be converted into their proper jQuery object form when clicked using [jQuery.deparam()](http://benalman.com/code/projects/jquery-bbq/docs/files/jquery-ba-bbq-js.html#jQuery.deparam) from jQuery BBQ.
-
-{% highlight javascript %}
-
-$('.option-set a').click(function(){
- // get href attr, remove leading #
- var href = $(this).attr('href').replace( /^#/, '' ),
- // convert href into object
- // i.e. 'filter=.inner-transition' -> { filter: '.inner-transition' }
- option = $.deparam( href, true );
- // set hash, triggers hashchange on window
- $.bbq.pushState( option );
- return false;
-});
-
-{% endhighlight %}
-
-Calling [$.bbq.pushState()](http://benalman.com/code/projects/jquery-bbq/docs/files/jquery-ba-bbq-js.html#jQuery.bbq.pushState) will trigger the `hashchange` event. At that point, we can parse the hash from the URL and use it to trigger the proper change in the Isotope instance.
-
-{% highlight javascript %}
-
-$(window).bind( 'hashchange', function( event ){
- // get options object from hash
- var hashOptions = $.deparam.fragment();
- // apply options from hash
- $container.isotope( hashOptions );
-})
- // trigger hashchange to capture any hash data on init
- .trigger('hashchange');
-
-{% endhighlight %}
-
-Now any filter buttons that are clicked will update the URL hash, so these options can be bookmarked.
diff --git a/_posts/docs/2011-12-11-help.mdown b/_posts/docs/2011-12-11-help.mdown
deleted file mode 100644
index 2697127..0000000
--- a/_posts/docs/2011-12-11-help.mdown
+++ /dev/null
@@ -1,234 +0,0 @@
----
-
-title: Help
-category: docs
-layout: default
-toc:
- - { title: Reporting bugs and issues, anchor: reporting_bugs_and_issues }
- - { title: Additional resources, anchor: additional_resources }
- - { title: Unloaded media, anchor: unloaded_media }
- - { title: Images, anchor: images }
- - { title: @font-face fonts, anchor: fontface_fonts }
- - { title: Problems with CSS transforms, anchor: css-transforms }
- - { title: Getting item position, anchor: getting_item_position }
- - { title: Accessing the instance, anchor: accessing_the_instance }
- - { title: CSS transforms in Opera, anchor: css_transforms_in_opera }
- - { title: Infinite Scroll with filtering or sorting, anchor: infinite_scroll_with_filtering_or_sorting}
- - { title: Poor type rendering in WebKit, anchor: poor_type_rendering_in_webkit }
- - { title: First item breaks Masonry layout, anchor: first_item_breaks_masonry_layout }
- - { title: Right-to-left layouts, anchor: righttoleft_layouts }
- - { title: Preventing clicks on filtered items, anchor: unclickable-filtered }
-
----
-
-
-## Reporting bugs and issues
-
-Please read my [Issues Agreement](https://github.com/desandro/issues-agreement/#readme) and then [report bugs and issues on GitHub](http://github.com/desandro/isotope/issues).
-
-## Support
-
-Try the support forum at CodersClan.
-
-[](http://codersclan.net/support/step1.php?repo_id=1)
-
-## Additional resources
-
-+ The [Metafizzy blog](http://metafizzy.co/blog/) has posts that cover specialized use cases
-+ [Various Isotope tests on jsFiddle](http://www.delicious.com/desandro/re:isotope+fiddle)
-+ [My answers on Stack Overflow](http://stackoverflow.com/users/182183/desandro?tab=answers)
-+ [Sites using Isotope on Zootool](http://zootool.com/user/desandro/tag:isotope), has screenshots
-+ [Sites using Isotope on Delicious](http://www.delicious.com/desandro/using:isotope)
-+ [Miscelleanous Isotope content](http://www.delicious.com/desandro/re:isotope)
-
-## Unloaded media
-
-Most layout modes (i.e masonry, fitRows) need to measure the size of each item to appropriately account for its space in the layout. Unloaded media files like images and @font-face fonts can throw off layout and cause item elements to overlap one another. Ideally, Isotope layouts should be initialized after all inner content has loaded.
-
-## Images
-
-### Inline dimensions
-
-For images, the best method is to specify the width and height of images inline.
-
-{% highlight html %}
-
-
-
-{% endhighlight %}
-
-If you’re using a PHP-based CMS, you can use the [getimagesize](http://php.net/manual/en/function.getimagesize.php) function.
-
-### imagesLoaded plugin
-
-The next best solution is to use the [imagesLoaded plugin](https://github.com/desandro/imagesloaded) included with Isotope. It's a small plugin that finds all the images in a context, and fires a callback function once all the images have loaded.
-
-{% highlight javascript %}
-
-var $container = $('#container');
-
-$container.imagesLoaded( function(){
- $container.isotope({
- // options...
- });
-});
-
-{% endhighlight %}
-
-### `$(window).load()`
-
-Another solution is to initialize Isotope inside `$(window).load()` instead of `$(document).ready()`. This will trigger Isotope after all the media on the page has loaded.
-
-{% highlight javascript %}
-
-$(window).load(function(){
- $('#container').isotope({
- // options...
- });
-});
-
-{% endhighlight %}
-
-## @font-face fonts
-
-Both Typekit and Google WebFont Loader provide font events to control scripts based on how fonts are loaded.
-
-+ [Typekit font events](http://blog.typekit.com/2010/10/18/more-control-with-typekits-font-events/)
-+ [Google WebFont Loader: Events](http://code.google.com/apis/webfonts/docs/webfont_loader.html#Events)
-
-## Problems with CSS transforms {: #css-transforms}
-
-As the browser implementations of CSS tranforms are still a work-in-progress, they can cause buggy behavoir with other types of dynamic content.
-
-
-
-+ [Flash content in Safari and Firefox](http://dropshado.ws/post/4085720152/css-transforms-breaking-flash), like YouTube or Vimeo videos, Flash ads, or Flash audio players.
-
-### Disabling transforms
-
-Set [`transformsEnabled`](options.html#transformsenabled) to `false`. This is an easy step to take when troubleshooting.
-
-{% highlight javascript %}
-
-$('#container').isotope({
- // options...
- transformsEnabled: false
-});
-
-{% endhighlight %}
-
-## Getting item position
-
-CSS transforms will break previous patterns for getting the position of an item. See the [`itemPositionDataEnabled`](options.html#itempositiondataenabled) option for a stop-gap.
-
-## Accessing the instance
-
-[Similar to jQuery UI](http://docs.jquery.com/UI_Developer_Guide#Internal_functions_.26_scopes_explained), Isotope stores a instance containing properties, settings and methods with jQuery.data. You can access the instance with the `'isotope'` namespace.
-
-{% highlight javascript %}
-
-var $container = $('#container');
-
-// initialize Isotope instance
-$container.isotope({
- // options...
-});
-
-// get Isotope instance
-var isotopeInstance = $container.data('isotope');
-isotopeInstance.options; // options
-isotopeInstance.$filteredAtoms; // jQuery object of filtered & sorted item elements
-isotopeInstance.masonry.columnWidth; // Layout mode specific properties
-
-{% endhighlight %}
-
-## CSS transforms in Opera
-
-[Using CSS transforms in older versions Opera (< 12) distorts text rendering](http://dropshado.ws/post/1260101028/opera-transform-issues). See how to enable [CSS transitions with top, left positioning](options.html#transformsEnabled-css).
-
-## Infinite Scroll with filtering or sorting
-
-I recommend against using Infinite Scroll with filtering or sorting. This combination produces a unnecessarily complex user interaction that will frustrate your users. New content gets added, but part of it might be hidden. There is no way for the user to tell what gets hidden or re-arranged when Infinite Scroll adds more content. Exercise [moderation](introduction.html#moderation) with your Isotope implementation.
-
-If you do plan on implementing Infinite Scroll with filtering or sorting (which is a _bad idea_), use the `insert` method instead of `appended`.
-
-## Poor type rendering in WebKit
-
-Type rendering may appear poor in WebKit browsers like Chrome and Safari. This is because of Isotope's activation of hardware acceleration. A solution is to add add a matching background to the item elements. See more: [dropshado.ws - Resolving anti-aliasing on WebKit hardware-accelerated elements](http://dropshado.ws/post/6142339613/resolving-anti-aliasing-on-webkit-hardware-accelerated). Another solution is to [disable transforms](#disabling_transforms).
-
-## First item breaks Masonry layout
-
-With [Masonry layout mode](layout-modes.html#masonry) If you run into an issue where you re-size the first item, and all the rest of the items no longer fit together in the grid, you most likely need to set [`columnWidth` option](layout-modes.html#masonry-options). Without `columnWidth` set, the Masonry layout mode will use the width of the first item for the size of its columns.
-
-{% highlight javascript %}
-
-$('#container').isotope(
- masonry: {
- columnWidth: 220
- }
-});
-
-{% endhighlight %}
-
-## Right-to-left layouts
-
-Isotope can be modified to support right-to-left layouts for languages like Hebrew and Arabic.
-
-[**See test: Right to left**](../tests/right-to-left.html)
-
-You'll need to make the following changes:
-
-+ Modify Isotope's `_positionAbs` method
-+ Set `transformsEnabled: false` in the Isotope options
-+ Add CSS transition property styles for right/top.
-
-### JavaScript for right-to-left support
-
-{% highlight javascript %}
-
-// modify Isotope's absolute position method
-$.Isotope.prototype._positionAbs = function( x, y ) {
- return { right: x, top: y };
-};
-
-// initialize Isotope
-$('#container').isotope({
- transformsEnabled: false
- // other options...
-});
-
-{% endhighlight %}
-
-### CSS for right-to-left support
-
-{% highlight css %}
-
-.isotope .isotope-item {
- -webkit-transition-property: right, top, -webkit-transform, opacity;
- -moz-transition-property: right, top, -moz-transform, opacity;
- -ms-transition-property: right, top, -ms-transform, opacity;
- -o-transition-property: right, top, -o-transform, opacity;
- transition-property: right, top, transform, opacity;
-}
-
-{% endhighlight %}
-
-## Preventing clicks on filtered items {: #unclickable-filtered}
-
-The [recommended CSS for filtering](filtering.html#recommended_css) includes `pointer-events: none` for `.isotope-hidden`. Unfortunately, Opera and Internet Explorer still let click events propagate with this style in place. But you can still dismiss click events in your click handler by checking to see if the element or element's parent is a filtered item.
-
-[See test: Unclickable filtered](../tests/unclickable-filtered.html)
-
-{% highlight javascript %}
-
-$('.item a').click(function(){
- var $this = $(this);
- // back out if hidden item
- if ( $this.parents('.isotope-item').hasClass('isotope-hidden') ) {
- return;
- }
- // otherwise, continue to do stuff...
- console.log('item was clicked');
-});
-
-{% endhighlight %}
\ No newline at end of file
diff --git a/_posts/docs/2011-12-20-license.mdown b/_posts/docs/2011-12-20-license.mdown
deleted file mode 100644
index d35d4f2..0000000
--- a/_posts/docs/2011-12-20-license.mdown
+++ /dev/null
@@ -1,79 +0,0 @@
----
-
-title: License
-category: docs
-layout: default
-toc:
- - { title: Commercial licensing, anchor: commercial_licensing }
- - { title: Isotope Commercial License Agreement, anchor: isotope_commercial_license_agreement }
-
----
-
-Isotope may be used in commercial projects and applications with the one-time purchase of a commercial license.
-
-### Open source license
-
-For non-commercial, personal, or open source projects and applications, you may use Isotope under the terms of the MIT License. You may use Isotope for free.
-
-### What is commercial considered?
-
-If you are paid to do your job, and part of your job is implementing Isotope, a commercial license is required.
-
-## Commercial licensing
-
-Purchasing accepts most credit cards and takes seconds. Once purchased, you’ll receive a commercial license PDF and you will be all set to use Isotope in your commercial applications.
-
-With the purchase of a commercial license:
-
-+ You may use Isotope in as many commercial applications you like.
-+ You may use Isotope in your own commercial applications and products. For example: premium WordPress, Tumblr, or other CMS themes, plugins and templates.
-+ Customers and users of your products do **not** need to purchase their own license -- so long as they are not developing their own commercial products with Isotope.
-
-The commercial license comes in two varieties:
-
-### Isotope Commercial Developer License
-
-The Isotope Commercial Developer License is for individual developers. This license is priced per developer. Each individual developer needs to purchase a separate license. A developer is someone who implements Isotope, and probably types `.isotope()` at some point.
-
-{% include developer-buy-button.html %}
-
-### Isotope Commercial Organization License
-
-The Isotope Commercial Organization License is for an organization with a team of developers. The license covers the entire team no matter how many developers are working on it.
-
-{% include org-buy-button.html %}
-
-### Purchase via PayPal
-
-If you're having trouble using a credit card, try purchasing a license via PayPal:
-
-+ [Buy Developer License via PayPal](http://pul.ly/b/13620)
-+ [Buy Organization License via PayPal](http://pul.ly/b/36595)
-
-## Isotope Commercial License Agreement
-
-This Commercial License Agreement is a binding legal agreement between you and Metafizzy LLC (**Metafizzy**). By installing, copying, or using Isotope (the **Software**), you agree to be bound by these terms of this Agreement.
-
-### Grant of License
-
-Subject to the payment of the fee required and the conditions herein, you are hereby granted a non-exclusive, non-transferable right to the Software to design and develop commercial applications (**Applications**).
-
-#### Developer Grant
-
-The Isotope Commercial Developer License grants 1 license for you as 1 designated user (**Developer**) to use the Software for the purpose of developing Applications. A Developer is an individual who implements the Software into Applications, most often writing the necessary code to do so. You must purchase another separate license to the Software for each and any additional Developer, or purchase a Isotope Commercial Organization License to cover your organization as a whole.
-
-#### Organization Grant
-
-The Isotope Commercial Organization License grants 1 license for your Organization as 1 designated, collective user (**Organization**) to use the Software for the purpose of developing Applications. There is no limit or restriction of the number of Developers within your Organization who may develop Applications using the Software.
-
-#### Usage
-
-You are granted the right to use and to modify the source code of the Software for use in Applications. There is no limit or restriction of the number of Applications which use the Software. You own any original work authored by you. Metafizzy continues to retain all copyright and other intellectual property rights in the Software. You are not permitted to move, remove, edit, or obscure any copyright, trademark, attribution, warning or disclaimer notices in the Software.
-
-You may use the Software only to create Applications that are significantly different than and do not compete with the Software. You are granted the license to distribute the Software as part of your Applications on a royalty-free basis. Users of your Applications are permitted to use the Software or your modifications of the Software as part of your Applications. Users do not need to purchase their own commercial license for the Software, so long as they are not acting as Developers, developing their own commercial Applications with the Software.
-
-### Warranties and Remedies
-
-The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. Metafizzy's entire liability and your exclusive remedy under this agreement shall be return of the price paid for the Software.
-
-
diff --git a/_posts/pages/2011-01-01-2.html b/_posts/pages/2011-01-01-2.html
deleted file mode 100644
index a5b226c..0000000
--- a/_posts/pages/2011-01-01-2.html
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Infinite Scroll Page 2
-category: pages
-layout: default
-page_position: 20
-infinite_scroll: true
----
-
-{% include inf-scroll-page.html %}
\ No newline at end of file
diff --git a/_posts/pages/2011-01-01-3.html b/_posts/pages/2011-01-01-3.html
deleted file mode 100644
index 5aa7e41..0000000
--- a/_posts/pages/2011-01-01-3.html
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Infinite Scroll Page 3
-category: pages
-layout: default
-page_position: 40
-infinite_scroll: true
----
-
-{% include inf-scroll-page.html %}
\ No newline at end of file
diff --git a/_posts/pages/2011-01-01-4.html b/_posts/pages/2011-01-01-4.html
deleted file mode 100644
index d08868d..0000000
--- a/_posts/pages/2011-01-01-4.html
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Infinite Scroll Page 4
-category: pages
-layout: default
-page_position: 60
-infinite_scroll: true
----
-
-{% include inf-scroll-page.html %}
\ No newline at end of file
diff --git a/_posts/pages/2011-01-01-5.html b/_posts/pages/2011-01-01-5.html
deleted file mode 100644
index 7da5795..0000000
--- a/_posts/pages/2011-01-01-5.html
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Infinite Scroll Page 5
-category: pages
-layout: default
-page_position: 80
-infinite_scroll: true
----
-
-{% include inf-scroll-page.html %}
\ No newline at end of file
diff --git a/_posts/pages/2011-01-01-6.html b/_posts/pages/2011-01-01-6.html
deleted file mode 100644
index 369c780..0000000
--- a/_posts/pages/2011-01-01-6.html
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Infinite Scroll Page 6
-category: pages
-layout: default
-page_position: 100
-infinite_scroll: true
----
-
-{% include inf-scroll-page.html %}
\ No newline at end of file
diff --git a/_posts/tests/2010-01-01-index.html b/_posts/tests/2010-01-01-index.html
deleted file mode 100644
index ccac568..0000000
--- a/_posts/tests/2010-01-01-index.html
+++ /dev/null
@@ -1,14 +0,0 @@
----
-title: Tests Index
-layout: default
-category: tests
-is_index_page: true
----
-
-
- {% for post in site.categories.tests reversed %}
- {% if post.is_index_page != true %}
- {{ post.title }}
- {% endif %}
- {% endfor %}
-
\ No newline at end of file
diff --git a/_posts/tests/2011-03-27-destroy.html b/_posts/tests/2011-03-27-destroy.html
deleted file mode 100644
index 6e71409..0000000
--- a/_posts/tests/2011-03-27-destroy.html
+++ /dev/null
@@ -1,48 +0,0 @@
----
-title: destroy
-layout: default
-category: tests
----
-
-
-
-
- Click init button the destroy . Original CSS, pre-init, should be re-applied, all items back to visibility.
-
-
-
- Init Isotope instance
- Destroy Isotope instance
-
-
-
- {% for element in site.elements limit:20 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/tests/2011-03-27-flash.html b/_posts/tests/2011-03-27-flash.html
deleted file mode 100644
index 446ecd0..0000000
--- a/_posts/tests/2011-03-27-flash.html
+++ /dev/null
@@ -1,118 +0,0 @@
----
-title: flash
-layout: default
-category: tests
----
-
-
-
-
- Flash content like YouTube or Vimeo videos
-
-
-
-
-
-
-
-
-
-
-
Sexy Sax Man (Careless Whisper Saxophone Prank!!) directors cut (by mikedahlquist )
-
-
-
-
-
-
- WIN
-
-
-
-
-
-
-
- [Flash 9 is required to listen to audio.]
- Smashing Pumpkins
- Set The Ray To Jerry
- Judas 0: B-Sides and Rarities
-
- I’ll believe until the day I die that the Smashing Pumpkins were more unique and more complex than most people will ever give them credit for. But I also understand that casual listeners aren’t going to go out of their way to hear the hundreds of lesser-known Pumpkins tracks that are often just as good as anything that’s made its way onto an album. So I’m telling you to start with “Set the Ray to Jerry.”
-
-
- — Ross McGowan The Smashing Pumpkins: Set the Ray to Jerry
-
-
-
-
-
-
-
-
-
-
-
-
- VIDEO
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/tests/2011-03-27-no-items.html b/_posts/tests/2011-03-27-no-items.html
deleted file mode 100644
index b020c7b..0000000
--- a/_posts/tests/2011-03-27-no-items.html
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: no items
-layout: default
-category: tests
----
-
-
- What happens when there are no items for Isotope? If no items match `itemSelector`, container collapses. Plugin still return this
.
-
-
-
- {% for element in site.elements limit:20 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/tests/2011-04-26-item-position-data.html b/_posts/tests/2011-04-26-item-position-data.html
deleted file mode 100644
index 9e66990..0000000
--- a/_posts/tests/2011-04-26-item-position-data.html
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: item position data
-layout: default
-category: tests
----
-
-
- itemPositionDataEnabled
option is enabled.
-
-
-
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
- {% for element in site.elements limit:40 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/tests/2011-05-13-jquery-animation.html b/_posts/tests/2011-05-13-jquery-animation.html
deleted file mode 100644
index 3df3be8..0000000
--- a/_posts/tests/2011-05-13-jquery-animation.html
+++ /dev/null
@@ -1,92 +0,0 @@
----
-title: jquery animation
-layout: default
-category: tests
----
-
-
-
-
- Check that the option setter for animationEngine is properly triggered.
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
- {% for element in site.elements limit:40 %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/tests/2011-05-24-elements-complete-test.html b/_posts/tests/2011-05-24-elements-complete-test.html
deleted file mode 100644
index b4fbc5e..0000000
--- a/_posts/tests/2011-05-24-elements-complete-test.html
+++ /dev/null
@@ -1,140 +0,0 @@
----
-title: elements complete test
-layout: default
-category: tests
-body_class: demos
----
-
-
- Isotope’s capabilities are designed to be used together cohesively. You can do it all — filter, sort, change layout modes, add items — and Isotope will handle it with ease.
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- {% include layout-options.html %}
-
- Etc
-
-
-
-
-
-
-
- {% for elem_number in site.random_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
diff --git a/_posts/tests/2011-05-31-tiny-text.html b/_posts/tests/2011-05-31-tiny-text.html
deleted file mode 100644
index c6227c8..0000000
--- a/_posts/tests/2011-05-31-tiny-text.html
+++ /dev/null
@@ -1,70 +0,0 @@
----
-title: Tiny text
-layout: default
-category: tests
-lorem: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
----
-
-
-
-
- Test to see how IE7 deals with type rendering
-
-
-
-
-
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
{{ page.lorem }}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/tests/2011-08-19-right-to-left.html b/_posts/tests/2011-08-19-right-to-left.html
deleted file mode 100644
index 90fe56a..0000000
--- a/_posts/tests/2011-08-19-right-to-left.html
+++ /dev/null
@@ -1,151 +0,0 @@
----
-title: Right to left
-layout: default
-category: tests
-body_class: demos
----
-
-
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- {% include layout-options.html %}
-
- Etc
-
-
-
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
diff --git a/_posts/tests/2011-08-23-unclickable-filtered.html b/_posts/tests/2011-08-23-unclickable-filtered.html
deleted file mode 100644
index 76550ea..0000000
--- a/_posts/tests/2011-08-23-unclickable-filtered.html
+++ /dev/null
@@ -1,118 +0,0 @@
----
-title: Unclickable filtered
-layout: default
-category: tests
-body_class: demos
----
-
-
-
-
- For Internet Explorer and Opera, you might need to dismiss event on filtered out items. You should not be able to click on the big red blocks when filtered-out
- (Last item clicked)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/tests/2011-10-19-callbacks.html b/_posts/tests/2011-10-19-callbacks.html
deleted file mode 100644
index fc7c103..0000000
--- a/_posts/tests/2011-10-19-callbacks.html
+++ /dev/null
@@ -1,165 +0,0 @@
----
-title: Callbacks
-layout: default
-category: tests
----
-
-
- Tests that callbacks are triggering properly, after animation/transition has completed.
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/_posts/tests/2012-02-07-onlayout.html b/_posts/tests/2012-02-07-onlayout.html
deleted file mode 100644
index 05e891e..0000000
--- a/_posts/tests/2012-02-07-onlayout.html
+++ /dev/null
@@ -1,171 +0,0 @@
----
-title: onLayout
-layout: default
-category: tests
----
-
-
- Tests that onLayout callback is triggering properly, after animation/transition has completed.
-
-
-
-
-
- {% include filter-buttons.html %}
-
- {% include sort-buttons.html %}
-
- Etc
-
-
-
-
-
-
- {% for elem_number in site.best_of_order %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
-
-
-
-
-
-
-
diff --git a/_posts/tests/2012-08-11-combo-sort-history.html b/_posts/tests/2012-08-11-combo-sort-history.html
deleted file mode 100644
index c309885..0000000
--- a/_posts/tests/2012-08-11-combo-sort-history.html
+++ /dev/null
@@ -1,177 +0,0 @@
----
-title: Combo filters, sorting, AND hash history
-layout: default
-category: tests
-schema:
- - name: color
- filters: [ red, blue, yellow ]
- - name: size
- filters: [ small, wide, tall, big ]
- - name: shape
- filters : [ round, square ]
----
-
-
- Filters can be combined. In addition to filtering for just .red
or .tall
, you can pass in a filter selector of both: .red.tall
.
-
-
-
-
-
Filters
-
- {% for group in page.schema %}
-
- {% endfor %}
-
-
- Sort
-
-
-
-
-
-
-
- {% for size in page.schema[1].filters %}
- {% for shape in page.schema[2].filters %}
- {% for color in page.schema[0].filters %}
-
- {% endfor %}
- {% endfor %}
- {% endfor %}
-
-
- {% for color in page.schema[0].filters %}
- {% for shape in page.schema[2].filters %}
- {% for size in page.schema[1].filters %}
-
- {% endfor %}
- {% endfor %}
- {% endfor %}
-
-
-
-
-
-
-
-
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..4e09284
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,37 @@
+{
+ "name": "isotope",
+ "version": "2.0.0",
+ "description": "Filter and sort magical layouts",
+ "main": [
+ "js/item.js",
+ "js/layout-mode.js",
+ "js/isotope.js",
+ "js/layout-modes/vertical.js",
+ "js/layout-modes/fit-rows.js",
+ "js/layout-modes/masonry.js"
+ ],
+ "dependencies": {
+ "get-size": "desandro/get-size#>=1 <2",
+ "matches-selector": "desandro/matches-selector#>=1 <2",
+ "outlayer": "^1.2.0",
+ "masonry": "^3.1.5"
+ },
+ "devDependencies": {
+ "doc-ready": "desandro/doc-ready",
+ "isotope-cells-by-column": "metafizzy/isotope-cells-by-column",
+ "isotope-cells-by-row": "metafizzy/isotope-cells-by-row",
+ "isotope-fit-columns": "metafizzy/isotope-fit-columns",
+ "isotope-horizontal": "metafizzy/isotope-horizontal",
+ "isotope-masonry-horizontal": "metafizzy/isotope-masonry-horizontal",
+ "jquery": "1",
+ "qunit": "1.12"
+ },
+ "ignore": [
+ "test/",
+ "examples/",
+ "**/.*",
+ "Gruntfile.js",
+ "package.json",
+ "notes.md"
+ ]
+}
diff --git a/css/style.css b/css/style.css
deleted file mode 100644
index e87f0d9..0000000
--- a/css/style.css
+++ /dev/null
@@ -1,842 +0,0 @@
-/* Start: Recommended Isotope styles */
-
-/**** Isotope Filtering ****/
-
-.isotope-item {
- z-index: 2;
-}
-
-.isotope-hidden.isotope-item {
- pointer-events: none;
- z-index: 1;
-}
-
-/**** Isotope CSS3 transitions ****/
-
-.isotope,
-.isotope .isotope-item {
- -webkit-transition-duration: 0.8s;
- -moz-transition-duration: 0.8s;
- -ms-transition-duration: 0.8s;
- -o-transition-duration: 0.8s;
- transition-duration: 0.8s;
-}
-
-.isotope {
- -webkit-transition-property: height, width;
- -moz-transition-property: height, width;
- -ms-transition-property: height, width;
- -o-transition-property: height, width;
- transition-property: height, width;
-}
-
-.isotope .isotope-item {
- -webkit-transition-property: -webkit-transform, opacity;
- -moz-transition-property: -moz-transform, opacity;
- -ms-transition-property: -ms-transform, opacity;
- -o-transition-property: -o-transform, opacity;
- transition-property: transform, opacity;
-}
-
-/**** disabling Isotope CSS3 transitions ****/
-
-.isotope.no-transition,
-.isotope.no-transition .isotope-item,
-.isotope .isotope-item.no-transition {
- -webkit-transition-duration: 0s;
- -moz-transition-duration: 0s;
- -ms-transition-duration: 0s;
- -o-transition-duration: 0s;
- transition-duration: 0s;
-}
-
-/* End: Recommended Isotope styles */
-
-
-
-/* disable CSS transitions for containers with infinite scrolling*/
-.isotope.infinite-scrolling {
- -webkit-transition: none;
- -moz-transition: none;
- -ms-transition: none;
- -o-transition: none;
- transition: none;
-}
-
-
-/**** Base styles ****/
-
-html, body, div, span, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
-small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section, summary,
-time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
- vertical-align: baseline;
-}
-
-article, aside, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section {
- display: block;
-}
-
-body {
- padding: 20px;
- font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
- font-size: 13px;
- line-height: 1.7em;
- background: #1F1E1D;
- color: #FFF;
-}
-
-h1, h2, h3, p, ul, ol, pre, dl {
- margin-bottom: 1.0em;
-}
-
-h1, h2, #super-list, .element, .tagline, #index-list,
-.super-list .link {
- font-family: 'Helvetica Neue', Arial, sans-serif;
-}
-
-h1, h2, h3 { font-weight: bold; }
-
-h1 {
- font-size: 32px;
- line-height: 1.1em;
-}
-
-h2 {
- font-size: 24px;
- line-height: 1.1em;
-}
-
-ul, ol {
- margin-left: 1.5em;
-}
-
-a,
-a code {
- color: #FB4;
- text-decoration: none;
-}
-
-a:hover,
-a:hover code {
- color: #4BF;
-}
-
-a:active,
-a:active code {
- color: #1FB;
- background: black;
-}
-
-a img { border: none; }
-
-em { font-style: italic; }
-strong { font-weight: bold; }
-
-blockquote {
- padding-left: 1.0em;
- margin-left: 1.0em;
- border-left: 1px solid #333;
- font-style: italic;
-}
-
-/**** Isotope styles ****/
-
-/* required for containers to inherit vertical size from window */
-html,
-body {
- height: 100%;
-}
-
-#container {
- border: 1px solid #666;
- padding: 5px;
- margin-bottom: 20px;
-}
-
-.element {
- width: 110px;
- height: 110px;
- margin: 5px;
- float: left;
- overflow: hidden;
- position: relative;
- background: #888;
- color: #222;
- -webkit-border-top-right-radius: 1.2em;
- -moz-border-radius-topright: 1.2em;
- border-top-right-radius: 1.2em;
-}
-
-.element.alkali { background: #F00; background: hsl( 0, 100%, 50%); }
-.element.alkaline-earth { background: #F80; background: hsl( 36, 100%, 50%); }
-.element.lanthanoid { background: #FF0; background: hsl( 72, 100%, 50%); }
-.element.actinoid { background: #0F0; background: hsl( 108, 100%, 50%); }
-.element.transition { background: #0F8; background: hsl( 144, 100%, 50%); }
-.element.post-transition { background: #0FF; background: hsl( 180, 100%, 50%); }
-.element.metalloid { background: #08F; background: hsl( 216, 100%, 50%); }
-.element.other.nonmetal { background: #00F; background: hsl( 252, 100%, 50%); }
-.element.halogen { background: #F0F; background: hsl( 288, 100%, 50%); }
-.element.noble-gas { background: #F08; background: hsl( 324, 100%, 50%); }
-
-
-.element * {
- position: absolute;
- margin: 0;
-}
-
-.element .symbol {
- left: 0.2em;
- top: 0.4em;
- font-size: 3.8em;
- line-height: 1.0em;
- color: #FFF;
-}
-.element.large .symbol {
- font-size: 4.5em;
-}
-
-.element.fake .symbol {
- color: #000;
-}
-
-.element .name {
- left: 0.5em;
- bottom: 1.6em;
- font-size: 1.05em;
-}
-
-.element .weight {
- font-size: 0.9em;
- left: 0.5em;
- bottom: 0.5em;
-}
-
-.element .number {
- font-size: 1.25em;
- font-weight: bold;
- color: hsla(0,0%,0%,.5);
- right: 0.5em;
- top: 0.5em;
-}
-
-.variable-sizes .element.width2 { width: 230px; }
-
-.variable-sizes .element.height2 { height: 230px; }
-
-.variable-sizes .element.width2.height2 {
- font-size: 2.0em;
-}
-
-.element.large,
-.variable-sizes .element.large,
-.variable-sizes .element.large.width2.height2 {
- font-size: 3.0em;
- width: 350px;
- height: 350px;
- z-index: 100;
-}
-
-.clickable .element:hover {
- cursor: pointer;
-}
-
-.clickable .element:hover h3 {
- text-shadow:
- 0 0 10px white,
- 0 0 10px white
- ;
-}
-
-.clickable .element:hover h2 {
- color: white;
-}
-
-/**** Example Options ****/
-
-#options {
- padding-bottom: 1.0em;
-}
-
-#options h3 {
- margin-bottom: 0.2em;
- font-size: 15px;
-}
-
-#options h4 {
- font-weight: bold;
-}
-
-#options ul {
- margin: 0;
- list-style: none;
-}
-
-#options ul ul {
- margin-left: 1.5em;
-}
-
-#options li {
- float: left;
- margin-bottom: 0.2em;
-}
-
-#options li a {
- display: block;
- padding: 0.4em 0.5em;
- background-color: #DDD;
- color: #222;
- font-weight: bold;
- text-shadow: 0 1px hsla( 0, 0%, 100%, 0.5 );
- background-image: -webkit-linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
- background-image: -moz-linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
- background-image: -ms-linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
- background-image: -o-linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
- background-image: linear-gradient( top, hsla( 0, 0%, 100%, 0.5 ), hsla( 0, 0%, 100%, 0.0 ) );
-}
-
-#options li a:hover {
- background-color: #5BF;
-}
-
-#options li a:active {
- background-color: #39D;
- -webkit-box-shadow: inset 0 2px 8px hsla( 0, 0%, 0%, 0.6 );
- -moz-box-shadow: inset 0 2px 8px hsla( 0, 0%, 0%, 0.6 );
- -o-box-shadow: inset 0 2px 8px hsla( 0, 0%, 0%, 0.6 );
- box-shadow: inset 0 2px 8px hsla( 0, 0%, 0%, 0.6 );
-}
-
-#options li a {
- border-left: 1px solid hsla( 0, 0%, 100%, 0.3 );
- border-right: 1px solid hsla( 0, 0%, 0%, 0.2 );
-}
-
-#options li:first-child a {
- border-radius: 7px 0 0 7px;
- border-left: none;
-}
-
-#options li:last-child a {
- border-radius: 0 7px 7px 0;
-}
-
-#options li a.selected {
- background-color: #13F;
- text-shadow: none;
- color: white;
-}
-
-/* Combination filter options*/
-
-#options .option-combo {
- display: inline-block;
- float: left;
- margin-right: 10px;
-}
-
-#options .option-combo ul {
- margin-right: 20px;
- display: inline-block;
-}
-
-#options .option-combo h2,
-#options .option-combo h4 {
- line-height: 34px;
- margin-bottom: 0;
- margin-right: 5px;
- display: inline-block;
- vertical-align: top;
-}
-
-/* Color shapes */
-
-.color-shape {
- width: 70px;
- height: 70px;
- margin: 5px;
- float: left;
-}
-
-.color-shape.round {
- -webkit-border-radius: 35px;
- -moz-border-radius: 35px;
- border-radius: 35px;
-}
-
-.color-shape.big.round {
- -webkit-border-radius: 75px;
- -moz-border-radius: 75px;
- border-radius: 75px;
-}
-
-.color-shape.red { background: red; }
-.color-shape.blue { background: blue; }
-.color-shape.yellow { background: yellow; }
-
-.color-shape.wide, .color-shape.big { width: 150px; }
-.color-shape.tall, .color-shape.big { height: 150px; }
-
-.color-shape a {
- display: block;
- height: 100%;
-}
-
-.color-shape a:hover {
- background: white;
- background: hsla( 0, 0%, 100%, 0.5 );
-}
-
-/**** Horizontal ****/
-
-.horizontal #container {
- height: 80%;
-}
-
-#copy {
- max-width: 640px;
-}
-
-/**** Photo demo ****/
-
-.photos .photo {
- width: 320px;
- margin: 5px;
- float: left;
-}
-
-.photos .photo img {
- display: block;
- width: 100%;
-}
-
-#content {
- margin-left: 210px;
-}
-
-.demos #content {
- height: 100%;
-}
-
-/**** Docs ****/
-
-.docs #content {
- max-width: 640px;
-}
-
-.docs #content a:hover {
- border-bottom: 1px dotted;
-}
-
-/**** Doc page nav ****/
-
-
-
-#site-nav {
- width: 200px;
- position: absolute;
- left: 10px;
- top: 0px;
- padding-top: 20px;
- font-size: 12px;
-}
-
-#site-nav h1 {
- font-size: 24px;
- margin-bottom: 0.5em;
- margin-top: 0;
- font-weight: bold;
- font-family: 'Helvetica Neue', Arial, sans-serif;
-}
-
-#site-nav h2 {
- font-size: 17px;
- font-weight: normal;
- margin: 0 0 0.3em;
- border-top: none;
-}
-
-#site-nav h1 a { color: #4FB; }
-#site-nav h1 a:hover { color: #4BF; }
-
-#site-nav ul {
- list-style: none;
- margin: 0 0 1.0em;
- font-weight: bold;
-}
-
-#site-nav ul ul { margin-bottom: 0; }
-
-#site-nav ul a {
- display: block;
- border: none;
- padding: 1px 5px;
-}
-
-#site-nav ul .current a {
- background: hsla( 0, 0%, 0%, 0.3 );
- color: #1BF;
-}
-#site-nav ul a:hover,
-#site-nav ul .current a:hover { color: white; }
-
-#site-nav ul .current .toc a {
- font-size: 12px;
- padding-left: 1.2em;
- font-weight: normal;
-}
-
-/**** Doc content ****/
-
-.docs #content h2 {
- border-top: 1px solid #333;
- padding-top: 0.8em;
- margin-bottom: 0.8em;
-}
-
-.docs #content h2:target {
- padding: 10px;
- background: white;
- color: #222;
-}
-
-.docs #content h3 {
- color: #FEC;
- background: hsla( 0, 0%, 75%, 0.05 );
- padding: 2px 0.5em;
- margin-bottom: 0.5em;
- font-size: 1.15em;
-}
-
-.docs #content h4 {
- margin-bottom: 0.5em;
- font-size: 14px;
-}
-
-
-footer {
- font-size: 12px;
- font-style: italic;
- border-top: 1px solid #333;
- padding: 0.8em 0;
-}
-
-pre {
- padding: 10px;
-}
-
-pre, code {
- background: black;
- color: white;
- font-family: 'Monaco', monospace, sans-serif;
-}
-
-#content code {
- font-size: 12px;
-}
-
-#content pre {
- line-height: 1.6em;
-}
-
-h3#options {
- padding-bottom: 0;
-}
-
-.option-def dl dt,
-.option-def dl dd {
- float: left;
- padding: 0 1.2em;;
- background: #161616;
- line-height: 36px;
- height: 36px;
-}
-
-.option-def dl.header dt,
-.option-def dl.header dd {
- background: #444;
-}
-
-.option-def dl .option-type {
- font-size: 13px;
- color: #AAA;
- font-style: italic;
-}
-
-.option-def dl dd {
- border-left: 1px solid #222;
-}
-
-/* Tagline */
-
-.docs .tagline {
- font-size: 22px;
- font-weight: 300;
-}
-
-/* as-is from MIT */
-
-.docs .as-is {
- font-size: 95%;
-}
-
-/* Commercial license blurb */
-
-.docs #commercial {
- background: white;
- padding: 10px;
- font-size: 14px;
- color: #1F1F1D;
-}
-
-.docs #commercial a { font-weight: bold;}
-
-/**** Pygments ****/
-
-code .s1,
-code .s { color: #78BD55; } /* string */
-code .mi, /* integer */
-code .cp, /* doctype */
-code .kc { color: #5298D4; } /*boolean*/
-code .k { color: #E39B79; } /* keyword */
-code .kd, /* storage */
-code .na { color: #A9D866; } /* markup attribute */
-code .p { color: #EDB; } /* punctuation */
-code .o { color: #F63; } /* operator */
-code .nb { color: #AA97AC;} /* support */
-
-/* comment */
-code .c,
-code .c1 { color: #666; font-style: italic; }
-
-code .nt { color: #A0C8FC; } /* Markup open tag */
-
-code .nf { color: #9EA8B8; } /* css id */
-code .nc { color: #A78352; } /* CSS class */
-code .m { color: #DE8E50; } /* CSS value */
-code .nd { color: #9FAD7E; } /* CSS pseudo selector */
-
-
-
-/**** Super list ****/
-
-
-/**** Sites using Isotope ****/
-
-#sites h2 {
- display: none;
- padding: 0.4em;
- line-height: 32px;
- margin-bottom: 0.4em;
- -webkit-transition: background-color 0.8s;
- -moz-transition: background-color 0.8s;
- -o-transition: background-color 0.8s;
- transition: background-color 0.8s;
-}
-
-#sites h2 img {
- display: inline-block;
- margin-right: 0.4em;
- vertical-align: bottom;
-}
-
-#sites h2.loading {
- background: white;
- color: #222;
-}
-#sites h2.error {
- background: red;
- color: #222;
-}
-
-
-#sites ul {
- margin: 0;
-}
-
-.super-list .example {
- list-style: none;
- float: left;
- width: 230px;
- margin: 5px;
-}
-
-.super-list .example a,
-.super-list .example b,
-.super-list .example img {
- display: block;
-}
-
-.super-list .example img { width: 100%; }
-
-.super-list .example a {
- background: #1F1E1D;
-}
-
-.super-list .example a:hover {
- background: white;
- color: #111;
-}
-
-.super-list .example b {
- font-weight: bold;
- line-height: 1.3em;
- padding: 3px;
- padding-top: 8px;
-}
-
-.super-list .link {
- float: left;
- position: relative;
- font-size: 24px;
- line-height: 1.2em;
- font-weight: 300;
- margin: 5px;
-}
-
-.super-list .link {
- width: 230px;
- height: 110px;
-}
-
-.super-list .link a {
- display: block;
- padding: 10px;
- padding-left: 65px;
- height: 90px;
- background: #1F1E1D;
- color: #FE5;
- -webkit-border-radius: 14px;
- -moz-border-radius: 14px;
- border-radius: 14px;
-}
-
-.super-list .link a:before {
- content: '➔';
- font-size: 70px;
- position: absolute;
- top: 30px;
- left: 5px;
- -webkit-transform: rotate(90deg);
- -moz-transform: rotate(90deg);
- -ms-transform: rotate(90deg);
- -o-transform: rotate(90deg);
- transform: rotate(90deg);
-}
-
-.super-list .link.away a:before {
- top: 25px;
- left: 0px;
- -webkit-transform: rotate(-45deg);
- -moz-transform: rotate(-45deg);
- -ms-transform: rotate(-45deg);
- -o-transform: rotate(-45deg);
- transform: rotate(-45deg);
-}
-
-.super-list .link a:hover {
- background: #E58;
- color: white;
-}
-
-.super-list .feature .name {
- bottom: auto;
- top: 140px;
- left: 18px;
- font-size: 20px;
-}
-
-/**** BIG Graph ****/
-
-.big-graph {
- background: white;
- height: 600px;
- margin: 20px auto;
-}
-
-.big-graph .project {
- width: 45px;
- height: 45px;
- float: left;
-}
-
-.big-graph .project .icon {
- pointer-events: none;
- width: 31px;
- height: 31px;
- background: white;
- margin-left: 7px;
- -webkit-transition: -webkit-transform 0.25s;
- -moz-transition: -moz-transform 0.25s;
- -ms-transition: -ms-transform 0.25s;
- -o-transition: -o-transform 0.25s;
- transition: transform 0.25s;
-}
-
-.big-graph .project:hover {
- z-index: 5;
-
-}
-
-.big-graph .project:hover .icon {
- -webkit-transform: scale(3);
- -moz-transform: scale(3);
- -ms-transform: scale(3);
- -o-transform: scale(3);
- transform: scale(3);
-}
-
-.big-graph .project.commercial .icon { background: #6B6B6B; }
-.big-graph .project.urbanism .icon { background: #00CF00; }
-.big-graph .project.public-space .icon { background: #FF8D00; }
-.big-graph .project.culture .icon { background: #D61919; }
-.big-graph .project.body-culture .icon { background: #00ECFF; }
-.big-graph .project.health .icon { background: #FF2251; }
-.big-graph .project.education .icon { background: #00A700; }
-.big-graph .project.housing .icon { background: #FF02FF; }
-.big-graph .project.hotel .icon { background: #0000C3; }
-.big-graph .project.media .icon { background: #292929; }
-
-.big-graph .project p {
- line-height: 14px;
- font-size: 10.5px;
- color: black;
- margin-left: 7px;
-}
-
-/**** Infinite Scroll ****/
-
-#infscr-loading {
- position: fixed;
- text-align: center;
- bottom: 30px;
- left: 42%;
- z-index: 100;
- background: white;
- background: hsla( 0, 0%, 100%, 0.9 );
- padding: 20px;
- color: #222;
- font-size: 15px;
- font-weight: bold;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
-}
-
-
-
-/* The Magnificent Clearfix: nicolasgallagher.com/micro-clearfix-hack/ */
-.clearfix:before, .clearfix:after { content: ""; display: table; }
-.clearfix:after { clear: both; }
-.clearfix { zoom: 1; }
diff --git a/dist/isotope.pkgd.js b/dist/isotope.pkgd.js
new file mode 100644
index 0000000..9dc4937
--- /dev/null
+++ b/dist/isotope.pkgd.js
@@ -0,0 +1,3890 @@
+/*!
+ * Isotope PACKAGED v2.0.0
+ * Filter & sort magical layouts
+ * http://isotope.metafizzy.co
+ */
+
+/**
+ * Bridget makes jQuery widgets
+ * v1.0.1
+ */
+
+( function( window ) {
+
+
+
+// -------------------------- utils -------------------------- //
+
+var slice = Array.prototype.slice;
+
+function noop() {}
+
+// -------------------------- definition -------------------------- //
+
+function defineBridget( $ ) {
+
+// bail if no jQuery
+if ( !$ ) {
+ return;
+}
+
+// -------------------------- addOptionMethod -------------------------- //
+
+/**
+ * adds option method -> $().plugin('option', {...})
+ * @param {Function} PluginClass - constructor class
+ */
+function addOptionMethod( PluginClass ) {
+ // don't overwrite original option method
+ if ( PluginClass.prototype.option ) {
+ return;
+ }
+
+ // option setter
+ PluginClass.prototype.option = function( opts ) {
+ // bail out if not an object
+ if ( !$.isPlainObject( opts ) ){
+ return;
+ }
+ this.options = $.extend( true, this.options, opts );
+ };
+}
+
+
+// -------------------------- plugin bridge -------------------------- //
+
+// helper function for logging errors
+// $.error breaks jQuery chaining
+var logError = typeof console === 'undefined' ? noop :
+ function( message ) {
+ console.error( message );
+ };
+
+/**
+ * jQuery plugin bridge, access methods like $elem.plugin('method')
+ * @param {String} namespace - plugin name
+ * @param {Function} PluginClass - constructor class
+ */
+function bridge( namespace, PluginClass ) {
+ // add to jQuery fn namespace
+ $.fn[ namespace ] = function( options ) {
+ if ( typeof options === 'string' ) {
+ // call plugin method when first argument is a string
+ // get arguments for method
+ var args = slice.call( arguments, 1 );
+
+ for ( var i=0, len = this.length; i < len; i++ ) {
+ var elem = this[i];
+ var instance = $.data( elem, namespace );
+ if ( !instance ) {
+ logError( "cannot call methods on " + namespace + " prior to initialization; " +
+ "attempted to call '" + options + "'" );
+ continue;
+ }
+ if ( !$.isFunction( instance[options] ) || options.charAt(0) === '_' ) {
+ logError( "no such method '" + options + "' for " + namespace + " instance" );
+ continue;
+ }
+
+ // trigger method with arguments
+ var returnValue = instance[ options ].apply( instance, args );
+
+ // break look and return first value if provided
+ if ( returnValue !== undefined ) {
+ return returnValue;
+ }
+ }
+ // return this if no return value
+ return this;
+ } else {
+ return this.each( function() {
+ var instance = $.data( this, namespace );
+ if ( instance ) {
+ // apply options & init
+ instance.option( options );
+ instance._init();
+ } else {
+ // initialize new instance
+ instance = new PluginClass( this, options );
+ $.data( this, namespace, instance );
+ }
+ });
+ }
+ };
+
+}
+
+// -------------------------- bridget -------------------------- //
+
+/**
+ * converts a Prototypical class into a proper jQuery plugin
+ * the class must have a ._init method
+ * @param {String} namespace - plugin name, used in $().pluginName
+ * @param {Function} PluginClass - constructor class
+ */
+$.bridget = function( namespace, PluginClass ) {
+ addOptionMethod( PluginClass );
+ bridge( namespace, PluginClass );
+};
+
+return $.bridget;
+
+}
+
+// transport
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'jquery-bridget/jquery.bridget',[ 'jquery' ], defineBridget );
+} else {
+ // get jquery from browser global
+ defineBridget( window.jQuery );
+}
+
+})( window );
+
+/*!
+ * eventie v1.0.5
+ * event binding helper
+ * eventie.bind( elem, 'click', myFn )
+ * eventie.unbind( elem, 'click', myFn )
+ * MIT license
+ */
+
+/*jshint browser: true, undef: true, unused: true */
+/*global define: false, module: false */
+
+( function( window ) {
+
+
+
+var docElem = document.documentElement;
+
+var bind = function() {};
+
+function getIEEvent( obj ) {
+ var event = window.event;
+ // add event.target
+ event.target = event.target || event.srcElement || obj;
+ return event;
+}
+
+if ( docElem.addEventListener ) {
+ bind = function( obj, type, fn ) {
+ obj.addEventListener( type, fn, false );
+ };
+} else if ( docElem.attachEvent ) {
+ bind = function( obj, type, fn ) {
+ obj[ type + fn ] = fn.handleEvent ?
+ function() {
+ var event = getIEEvent( obj );
+ fn.handleEvent.call( fn, event );
+ } :
+ function() {
+ var event = getIEEvent( obj );
+ fn.call( obj, event );
+ };
+ obj.attachEvent( "on" + type, obj[ type + fn ] );
+ };
+}
+
+var unbind = function() {};
+
+if ( docElem.removeEventListener ) {
+ unbind = function( obj, type, fn ) {
+ obj.removeEventListener( type, fn, false );
+ };
+} else if ( docElem.detachEvent ) {
+ unbind = function( obj, type, fn ) {
+ obj.detachEvent( "on" + type, obj[ type + fn ] );
+ try {
+ delete obj[ type + fn ];
+ } catch ( err ) {
+ // can't delete window object properties
+ obj[ type + fn ] = undefined;
+ }
+ };
+}
+
+var eventie = {
+ bind: bind,
+ unbind: unbind
+};
+
+// ----- module definition ----- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'eventie/eventie',eventie );
+} else if ( typeof exports === 'object' ) {
+ // CommonJS
+ module.exports = eventie;
+} else {
+ // browser global
+ window.eventie = eventie;
+}
+
+})( this );
+
+/*!
+ * docReady
+ * Cross browser DOMContentLoaded event emitter
+ */
+
+/*jshint browser: true, strict: true, undef: true, unused: true*/
+/*global define: false */
+
+( function( window ) {
+
+
+
+var document = window.document;
+// collection of functions to be triggered on ready
+var queue = [];
+
+function docReady( fn ) {
+ // throw out non-functions
+ if ( typeof fn !== 'function' ) {
+ return;
+ }
+
+ if ( docReady.isReady ) {
+ // ready now, hit it
+ fn();
+ } else {
+ // queue function when ready
+ queue.push( fn );
+ }
+}
+
+docReady.isReady = false;
+
+// triggered on various doc ready events
+function init( event ) {
+ // bail if IE8 document is not ready just yet
+ var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete';
+ if ( docReady.isReady || isIE8NotReady ) {
+ return;
+ }
+ docReady.isReady = true;
+
+ // process queue
+ for ( var i=0, len = queue.length; i < len; i++ ) {
+ var fn = queue[i];
+ fn();
+ }
+}
+
+function defineDocReady( eventie ) {
+ eventie.bind( document, 'DOMContentLoaded', init );
+ eventie.bind( document, 'readystatechange', init );
+ eventie.bind( window, 'load', init );
+
+ return docReady;
+}
+
+// transport
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ // if RequireJS, then doc is already ready
+ docReady.isReady = typeof requirejs === 'function';
+ define( 'doc-ready/doc-ready',[ 'eventie/eventie' ], defineDocReady );
+} else {
+ // browser global
+ window.docReady = defineDocReady( window.eventie );
+}
+
+})( this );
+
+/*!
+ * EventEmitter v4.2.7 - git.io/ee
+ * Oliver Caldwell
+ * MIT license
+ * @preserve
+ */
+
+(function () {
+
+
+ /**
+ * Class for managing events.
+ * Can be extended to provide event functionality in other classes.
+ *
+ * @class EventEmitter Manages event registering and emitting.
+ */
+ function EventEmitter() {}
+
+ // Shortcuts to improve speed and size
+ var proto = EventEmitter.prototype;
+ var exports = this;
+ var originalGlobalValue = exports.EventEmitter;
+
+ /**
+ * Finds the index of the listener for the event in it's storage array.
+ *
+ * @param {Function[]} listeners Array of listeners to search through.
+ * @param {Function} listener Method to look for.
+ * @return {Number} Index of the specified listener, -1 if not found
+ * @api private
+ */
+ function indexOfListener(listeners, listener) {
+ var i = listeners.length;
+ while (i--) {
+ if (listeners[i].listener === listener) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ * Alias a method while keeping the context correct, to allow for overwriting of target method.
+ *
+ * @param {String} name The name of the target method.
+ * @return {Function} The aliased method
+ * @api private
+ */
+ function alias(name) {
+ return function aliasClosure() {
+ return this[name].apply(this, arguments);
+ };
+ }
+
+ /**
+ * Returns the listener array for the specified event.
+ * Will initialise the event object and listener arrays if required.
+ * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.
+ * Each property in the object response is an array of listener functions.
+ *
+ * @param {String|RegExp} evt Name of the event to return the listeners from.
+ * @return {Function[]|Object} All listener functions for the event.
+ */
+ proto.getListeners = function getListeners(evt) {
+ var events = this._getEvents();
+ var response;
+ var key;
+
+ // Return a concatenated array of all matching events if
+ // the selector is a regular expression.
+ if (evt instanceof RegExp) {
+ response = {};
+ for (key in events) {
+ if (events.hasOwnProperty(key) && evt.test(key)) {
+ response[key] = events[key];
+ }
+ }
+ }
+ else {
+ response = events[evt] || (events[evt] = []);
+ }
+
+ return response;
+ };
+
+ /**
+ * Takes a list of listener objects and flattens it into a list of listener functions.
+ *
+ * @param {Object[]} listeners Raw listener objects.
+ * @return {Function[]} Just the listener functions.
+ */
+ proto.flattenListeners = function flattenListeners(listeners) {
+ var flatListeners = [];
+ var i;
+
+ for (i = 0; i < listeners.length; i += 1) {
+ flatListeners.push(listeners[i].listener);
+ }
+
+ return flatListeners;
+ };
+
+ /**
+ * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.
+ *
+ * @param {String|RegExp} evt Name of the event to return the listeners from.
+ * @return {Object} All listener functions for an event in an object.
+ */
+ proto.getListenersAsObject = function getListenersAsObject(evt) {
+ var listeners = this.getListeners(evt);
+ var response;
+
+ if (listeners instanceof Array) {
+ response = {};
+ response[evt] = listeners;
+ }
+
+ return response || listeners;
+ };
+
+ /**
+ * Adds a listener function to the specified event.
+ * The listener will not be added if it is a duplicate.
+ * If the listener returns true then it will be removed after it is called.
+ * If you pass a regular expression as the event name then the listener will be added to all events that match it.
+ *
+ * @param {String|RegExp} evt Name of the event to attach the listener to.
+ * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.addListener = function addListener(evt, listener) {
+ var listeners = this.getListenersAsObject(evt);
+ var listenerIsWrapped = typeof listener === 'object';
+ var key;
+
+ for (key in listeners) {
+ if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {
+ listeners[key].push(listenerIsWrapped ? listener : {
+ listener: listener,
+ once: false
+ });
+ }
+ }
+
+ return this;
+ };
+
+ /**
+ * Alias of addListener
+ */
+ proto.on = alias('addListener');
+
+ /**
+ * Semi-alias of addListener. It will add a listener that will be
+ * automatically removed after it's first execution.
+ *
+ * @param {String|RegExp} evt Name of the event to attach the listener to.
+ * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.addOnceListener = function addOnceListener(evt, listener) {
+ return this.addListener(evt, {
+ listener: listener,
+ once: true
+ });
+ };
+
+ /**
+ * Alias of addOnceListener.
+ */
+ proto.once = alias('addOnceListener');
+
+ /**
+ * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.
+ * You need to tell it what event names should be matched by a regex.
+ *
+ * @param {String} evt Name of the event to create.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.defineEvent = function defineEvent(evt) {
+ this.getListeners(evt);
+ return this;
+ };
+
+ /**
+ * Uses defineEvent to define multiple events.
+ *
+ * @param {String[]} evts An array of event names to define.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.defineEvents = function defineEvents(evts) {
+ for (var i = 0; i < evts.length; i += 1) {
+ this.defineEvent(evts[i]);
+ }
+ return this;
+ };
+
+ /**
+ * Removes a listener function from the specified event.
+ * When passed a regular expression as the event name, it will remove the listener from all events that match it.
+ *
+ * @param {String|RegExp} evt Name of the event to remove the listener from.
+ * @param {Function} listener Method to remove from the event.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.removeListener = function removeListener(evt, listener) {
+ var listeners = this.getListenersAsObject(evt);
+ var index;
+ var key;
+
+ for (key in listeners) {
+ if (listeners.hasOwnProperty(key)) {
+ index = indexOfListener(listeners[key], listener);
+
+ if (index !== -1) {
+ listeners[key].splice(index, 1);
+ }
+ }
+ }
+
+ return this;
+ };
+
+ /**
+ * Alias of removeListener
+ */
+ proto.off = alias('removeListener');
+
+ /**
+ * Adds listeners in bulk using the manipulateListeners method.
+ * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.
+ * You can also pass it a regular expression to add the array of listeners to all events that match it.
+ * Yeah, this function does quite a bit. That's probably a bad thing.
+ *
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.
+ * @param {Function[]} [listeners] An optional array of listener functions to add.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.addListeners = function addListeners(evt, listeners) {
+ // Pass through to manipulateListeners
+ return this.manipulateListeners(false, evt, listeners);
+ };
+
+ /**
+ * Removes listeners in bulk using the manipulateListeners method.
+ * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
+ * You can also pass it an event name and an array of listeners to be removed.
+ * You can also pass it a regular expression to remove the listeners from all events that match it.
+ *
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.
+ * @param {Function[]} [listeners] An optional array of listener functions to remove.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.removeListeners = function removeListeners(evt, listeners) {
+ // Pass through to manipulateListeners
+ return this.manipulateListeners(true, evt, listeners);
+ };
+
+ /**
+ * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.
+ * The first argument will determine if the listeners are removed (true) or added (false).
+ * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
+ * You can also pass it an event name and an array of listeners to be added/removed.
+ * You can also pass it a regular expression to manipulate the listeners of all events that match it.
+ *
+ * @param {Boolean} remove True if you want to remove listeners, false if you want to add.
+ * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.
+ * @param {Function[]} [listeners] An optional array of listener functions to add/remove.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
+ var i;
+ var value;
+ var single = remove ? this.removeListener : this.addListener;
+ var multiple = remove ? this.removeListeners : this.addListeners;
+
+ // If evt is an object then pass each of it's properties to this method
+ if (typeof evt === 'object' && !(evt instanceof RegExp)) {
+ for (i in evt) {
+ if (evt.hasOwnProperty(i) && (value = evt[i])) {
+ // Pass the single listener straight through to the singular method
+ if (typeof value === 'function') {
+ single.call(this, i, value);
+ }
+ else {
+ // Otherwise pass back to the multiple function
+ multiple.call(this, i, value);
+ }
+ }
+ }
+ }
+ else {
+ // So evt must be a string
+ // And listeners must be an array of listeners
+ // Loop over it and pass each one to the multiple method
+ i = listeners.length;
+ while (i--) {
+ single.call(this, evt, listeners[i]);
+ }
+ }
+
+ return this;
+ };
+
+ /**
+ * Removes all listeners from a specified event.
+ * If you do not specify an event then all listeners will be removed.
+ * That means every event will be emptied.
+ * You can also pass a regex to remove all events that match it.
+ *
+ * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.removeEvent = function removeEvent(evt) {
+ var type = typeof evt;
+ var events = this._getEvents();
+ var key;
+
+ // Remove different things depending on the state of evt
+ if (type === 'string') {
+ // Remove all listeners for the specified event
+ delete events[evt];
+ }
+ else if (evt instanceof RegExp) {
+ // Remove all events matching the regex.
+ for (key in events) {
+ if (events.hasOwnProperty(key) && evt.test(key)) {
+ delete events[key];
+ }
+ }
+ }
+ else {
+ // Remove all listeners in all events
+ delete this._events;
+ }
+
+ return this;
+ };
+
+ /**
+ * Alias of removeEvent.
+ *
+ * Added to mirror the node API.
+ */
+ proto.removeAllListeners = alias('removeEvent');
+
+ /**
+ * Emits an event of your choice.
+ * When emitted, every listener attached to that event will be executed.
+ * If you pass the optional argument array then those arguments will be passed to every listener upon execution.
+ * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.
+ * So they will not arrive within the array on the other side, they will be separate.
+ * You can also pass a regular expression to emit to all events that match it.
+ *
+ * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
+ * @param {Array} [args] Optional array of arguments to be passed to each listener.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.emitEvent = function emitEvent(evt, args) {
+ var listeners = this.getListenersAsObject(evt);
+ var listener;
+ var i;
+ var key;
+ var response;
+
+ for (key in listeners) {
+ if (listeners.hasOwnProperty(key)) {
+ i = listeners[key].length;
+
+ while (i--) {
+ // If the listener returns true then it shall be removed from the event
+ // The function is executed either with a basic call or an apply if there is an args array
+ listener = listeners[key][i];
+
+ if (listener.once === true) {
+ this.removeListener(evt, listener.listener);
+ }
+
+ response = listener.listener.apply(this, args || []);
+
+ if (response === this._getOnceReturnValue()) {
+ this.removeListener(evt, listener.listener);
+ }
+ }
+ }
+ }
+
+ return this;
+ };
+
+ /**
+ * Alias of emitEvent
+ */
+ proto.trigger = alias('emitEvent');
+
+ /**
+ * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.
+ * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.
+ *
+ * @param {String|RegExp} evt Name of the event to emit and execute listeners for.
+ * @param {...*} Optional additional arguments to be passed to each listener.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.emit = function emit(evt) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return this.emitEvent(evt, args);
+ };
+
+ /**
+ * Sets the current value to check against when executing listeners. If a
+ * listeners return value matches the one set here then it will be removed
+ * after execution. This value defaults to true.
+ *
+ * @param {*} value The new value to check for when executing listeners.
+ * @return {Object} Current instance of EventEmitter for chaining.
+ */
+ proto.setOnceReturnValue = function setOnceReturnValue(value) {
+ this._onceReturnValue = value;
+ return this;
+ };
+
+ /**
+ * Fetches the current value to check against when executing listeners. If
+ * the listeners return value matches this one then it should be removed
+ * automatically. It will return true by default.
+ *
+ * @return {*|Boolean} The current value to check for or the default, true.
+ * @api private
+ */
+ proto._getOnceReturnValue = function _getOnceReturnValue() {
+ if (this.hasOwnProperty('_onceReturnValue')) {
+ return this._onceReturnValue;
+ }
+ else {
+ return true;
+ }
+ };
+
+ /**
+ * Fetches the events object and creates one if required.
+ *
+ * @return {Object} The events storage object.
+ * @api private
+ */
+ proto._getEvents = function _getEvents() {
+ return this._events || (this._events = {});
+ };
+
+ /**
+ * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.
+ *
+ * @return {Function} Non conflicting EventEmitter class.
+ */
+ EventEmitter.noConflict = function noConflict() {
+ exports.EventEmitter = originalGlobalValue;
+ return EventEmitter;
+ };
+
+ // Expose the class either via AMD, CommonJS or the global object
+ if (typeof define === 'function' && define.amd) {
+ define('eventEmitter/EventEmitter',[],function () {
+ return EventEmitter;
+ });
+ }
+ else if (typeof module === 'object' && module.exports){
+ module.exports = EventEmitter;
+ }
+ else {
+ this.EventEmitter = EventEmitter;
+ }
+}.call(this));
+
+/*!
+ * getStyleProperty v1.0.3
+ * original by kangax
+ * http://perfectionkills.com/feature-testing-css-properties/
+ */
+
+/*jshint browser: true, strict: true, undef: true */
+/*global define: false, exports: false, module: false */
+
+( function( window ) {
+
+
+
+var prefixes = 'Webkit Moz ms Ms O'.split(' ');
+var docElemStyle = document.documentElement.style;
+
+function getStyleProperty( propName ) {
+ if ( !propName ) {
+ return;
+ }
+
+ // test standard property first
+ if ( typeof docElemStyle[ propName ] === 'string' ) {
+ return propName;
+ }
+
+ // capitalize
+ propName = propName.charAt(0).toUpperCase() + propName.slice(1);
+
+ // test vendor specific properties
+ var prefixed;
+ for ( var i=0, len = prefixes.length; i < len; i++ ) {
+ prefixed = prefixes[i] + propName;
+ if ( typeof docElemStyle[ prefixed ] === 'string' ) {
+ return prefixed;
+ }
+ }
+}
+
+// transport
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'get-style-property/get-style-property',[],function() {
+ return getStyleProperty;
+ });
+} else if ( typeof exports === 'object' ) {
+ // CommonJS for Component
+ module.exports = getStyleProperty;
+} else {
+ // browser global
+ window.getStyleProperty = getStyleProperty;
+}
+
+})( window );
+
+/**
+ * getSize v1.1.7
+ * measure size of elements
+ */
+
+/*jshint browser: true, strict: true, undef: true, unused: true */
+/*global define: false, exports: false, require: false, module: false */
+
+( function( window, undefined ) {
+
+
+
+// -------------------------- helpers -------------------------- //
+
+var getComputedStyle = window.getComputedStyle;
+var getStyle = getComputedStyle ?
+ function( elem ) {
+ return getComputedStyle( elem, null );
+ } :
+ function( elem ) {
+ return elem.currentStyle;
+ };
+
+// get a number from a string, not a percentage
+function getStyleSize( value ) {
+ var num = parseFloat( value );
+ // not a percent like '100%', and a number
+ var isValid = value.indexOf('%') === -1 && !isNaN( num );
+ return isValid && num;
+}
+
+// -------------------------- measurements -------------------------- //
+
+var measurements = [
+ 'paddingLeft',
+ 'paddingRight',
+ 'paddingTop',
+ 'paddingBottom',
+ 'marginLeft',
+ 'marginRight',
+ 'marginTop',
+ 'marginBottom',
+ 'borderLeftWidth',
+ 'borderRightWidth',
+ 'borderTopWidth',
+ 'borderBottomWidth'
+];
+
+function getZeroSize() {
+ var size = {
+ width: 0,
+ height: 0,
+ innerWidth: 0,
+ innerHeight: 0,
+ outerWidth: 0,
+ outerHeight: 0
+ };
+ for ( var i=0, len = measurements.length; i < len; i++ ) {
+ var measurement = measurements[i];
+ size[ measurement ] = 0;
+ }
+ return size;
+}
+
+
+
+function defineGetSize( getStyleProperty ) {
+
+// -------------------------- box sizing -------------------------- //
+
+var boxSizingProp = getStyleProperty('boxSizing');
+var isBoxSizeOuter;
+
+/**
+ * WebKit measures the outer-width on style.width on border-box elems
+ * IE & Firefox measures the inner-width
+ */
+( function() {
+ if ( !boxSizingProp ) {
+ return;
+ }
+
+ var div = document.createElement('div');
+ div.style.width = '200px';
+ div.style.padding = '1px 2px 3px 4px';
+ div.style.borderStyle = 'solid';
+ div.style.borderWidth = '1px 2px 3px 4px';
+ div.style[ boxSizingProp ] = 'border-box';
+
+ var body = document.body || document.documentElement;
+ body.appendChild( div );
+ var style = getStyle( div );
+
+ isBoxSizeOuter = getStyleSize( style.width ) === 200;
+ body.removeChild( div );
+})();
+
+
+// -------------------------- getSize -------------------------- //
+
+function getSize( elem ) {
+ // use querySeletor if elem is string
+ if ( typeof elem === 'string' ) {
+ elem = document.querySelector( elem );
+ }
+
+ // do not proceed on non-objects
+ if ( !elem || typeof elem !== 'object' || !elem.nodeType ) {
+ return;
+ }
+
+ var style = getStyle( elem );
+
+ // if hidden, everything is 0
+ if ( style.display === 'none' ) {
+ return getZeroSize();
+ }
+
+ var size = {};
+ size.width = elem.offsetWidth;
+ size.height = elem.offsetHeight;
+
+ var isBorderBox = size.isBorderBox = !!( boxSizingProp &&
+ style[ boxSizingProp ] && style[ boxSizingProp ] === 'border-box' );
+
+ // get all measurements
+ for ( var i=0, len = measurements.length; i < len; i++ ) {
+ var measurement = measurements[i];
+ var value = style[ measurement ];
+ value = mungeNonPixel( elem, value );
+ var num = parseFloat( value );
+ // any 'auto', 'medium' value will be 0
+ size[ measurement ] = !isNaN( num ) ? num : 0;
+ }
+
+ var paddingWidth = size.paddingLeft + size.paddingRight;
+ var paddingHeight = size.paddingTop + size.paddingBottom;
+ var marginWidth = size.marginLeft + size.marginRight;
+ var marginHeight = size.marginTop + size.marginBottom;
+ var borderWidth = size.borderLeftWidth + size.borderRightWidth;
+ var borderHeight = size.borderTopWidth + size.borderBottomWidth;
+
+ var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
+
+ // overwrite width and height if we can get it from style
+ var styleWidth = getStyleSize( style.width );
+ if ( styleWidth !== false ) {
+ size.width = styleWidth +
+ // add padding and border unless it's already including it
+ ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
+ }
+
+ var styleHeight = getStyleSize( style.height );
+ if ( styleHeight !== false ) {
+ size.height = styleHeight +
+ // add padding and border unless it's already including it
+ ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
+ }
+
+ size.innerWidth = size.width - ( paddingWidth + borderWidth );
+ size.innerHeight = size.height - ( paddingHeight + borderHeight );
+
+ size.outerWidth = size.width + marginWidth;
+ size.outerHeight = size.height + marginHeight;
+
+ return size;
+}
+
+// IE8 returns percent values, not pixels
+// taken from jQuery's curCSS
+function mungeNonPixel( elem, value ) {
+ // IE8 and has percent value
+ if ( getComputedStyle || value.indexOf('%') === -1 ) {
+ return value;
+ }
+ var style = elem.style;
+ // Remember the original values
+ var left = style.left;
+ var rs = elem.runtimeStyle;
+ var rsLeft = rs && rs.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ rs.left = elem.currentStyle.left;
+ }
+ style.left = value;
+ value = style.pixelLeft;
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ rs.left = rsLeft;
+ }
+
+ return value;
+}
+
+return getSize;
+
+}
+
+// transport
+if ( typeof define === 'function' && define.amd ) {
+ // AMD for RequireJS
+ define( 'get-size/get-size',[ 'get-style-property/get-style-property' ], defineGetSize );
+} else if ( typeof exports === 'object' ) {
+ // CommonJS for Component
+ module.exports = defineGetSize( require('get-style-property') );
+} else {
+ // browser global
+ window.getSize = defineGetSize( window.getStyleProperty );
+}
+
+})( window );
+
+/**
+ * matchesSelector helper v1.0.1
+ *
+ * @name matchesSelector
+ * @param {Element} elem
+ * @param {String} selector
+ */
+
+/*jshint browser: true, strict: true, undef: true, unused: true */
+/*global define: false */
+
+( function( global, ElemProto ) {
+
+
+
+ var matchesMethod = ( function() {
+ // check un-prefixed
+ if ( ElemProto.matchesSelector ) {
+ return 'matchesSelector';
+ }
+ // check vendor prefixes
+ var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
+
+ for ( var i=0, len = prefixes.length; i < len; i++ ) {
+ var prefix = prefixes[i];
+ var method = prefix + 'MatchesSelector';
+ if ( ElemProto[ method ] ) {
+ return method;
+ }
+ }
+ })();
+
+ // ----- match ----- //
+
+ function match( elem, selector ) {
+ return elem[ matchesMethod ]( selector );
+ }
+
+ // ----- appendToFragment ----- //
+
+ function checkParent( elem ) {
+ // not needed if already has parent
+ if ( elem.parentNode ) {
+ return;
+ }
+ var fragment = document.createDocumentFragment();
+ fragment.appendChild( elem );
+ }
+
+ // ----- query ----- //
+
+ // fall back to using QSA
+ // thx @jonathantneal https://gist.github.com/3062955
+ function query( elem, selector ) {
+ // append to fragment if no parent
+ checkParent( elem );
+
+ // match elem with all selected elems of parent
+ var elems = elem.parentNode.querySelectorAll( selector );
+ for ( var i=0, len = elems.length; i < len; i++ ) {
+ // return true if match
+ if ( elems[i] === elem ) {
+ return true;
+ }
+ }
+ // otherwise return false
+ return false;
+ }
+
+ // ----- matchChild ----- //
+
+ function matchChild( elem, selector ) {
+ checkParent( elem );
+ return match( elem, selector );
+ }
+
+ // ----- matchesSelector ----- //
+
+ var matchesSelector;
+
+ if ( matchesMethod ) {
+ // IE9 supports matchesSelector, but doesn't work on orphaned elems
+ // check for that
+ var div = document.createElement('div');
+ var supportsOrphans = match( div, 'div' );
+ matchesSelector = supportsOrphans ? match : matchChild;
+ } else {
+ matchesSelector = query;
+ }
+
+ // transport
+ if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'matches-selector/matches-selector',[],function() {
+ return matchesSelector;
+ });
+ } else {
+ // browser global
+ window.matchesSelector = matchesSelector;
+ }
+
+})( this, Element.prototype );
+
+/**
+ * Outlayer Item
+ */
+
+( function( window ) {
+
+
+
+// ----- get style ----- //
+
+var getComputedStyle = window.getComputedStyle;
+var getStyle = getComputedStyle ?
+ function( elem ) {
+ return getComputedStyle( elem, null );
+ } :
+ function( elem ) {
+ return elem.currentStyle;
+ };
+
+
+// extend objects
+function extend( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+ return a;
+}
+
+function isEmptyObj( obj ) {
+ for ( var prop in obj ) {
+ return false;
+ }
+ prop = null;
+ return true;
+}
+
+// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
+function toDash( str ) {
+ return str.replace( /([A-Z])/g, function( $1 ){
+ return '-' + $1.toLowerCase();
+ });
+}
+
+// -------------------------- Outlayer definition -------------------------- //
+
+function outlayerItemDefinition( EventEmitter, getSize, getStyleProperty ) {
+
+// -------------------------- CSS3 support -------------------------- //
+
+var transitionProperty = getStyleProperty('transition');
+var transformProperty = getStyleProperty('transform');
+var supportsCSS3 = transitionProperty && transformProperty;
+var is3d = !!getStyleProperty('perspective');
+
+var transitionEndEvent = {
+ WebkitTransition: 'webkitTransitionEnd',
+ MozTransition: 'transitionend',
+ OTransition: 'otransitionend',
+ transition: 'transitionend'
+}[ transitionProperty ];
+
+// properties that could have vendor prefix
+var prefixableProperties = [
+ 'transform',
+ 'transition',
+ 'transitionDuration',
+ 'transitionProperty'
+];
+
+// cache all vendor properties
+var vendorProperties = ( function() {
+ var cache = {};
+ for ( var i=0, len = prefixableProperties.length; i < len; i++ ) {
+ var prop = prefixableProperties[i];
+ var supportedProp = getStyleProperty( prop );
+ if ( supportedProp && supportedProp !== prop ) {
+ cache[ prop ] = supportedProp;
+ }
+ }
+ return cache;
+})();
+
+// -------------------------- Item -------------------------- //
+
+function Item( element, layout ) {
+ if ( !element ) {
+ return;
+ }
+
+ this.element = element;
+ // parent layout class, i.e. Masonry, Isotope, or Packery
+ this.layout = layout;
+ this.position = {
+ x: 0,
+ y: 0
+ };
+
+ this._create();
+}
+
+// inherit EventEmitter
+extend( Item.prototype, EventEmitter.prototype );
+
+Item.prototype._create = function() {
+ // transition objects
+ this._transn = {
+ ingProperties: {},
+ clean: {},
+ onEnd: {}
+ };
+
+ this.css({
+ position: 'absolute'
+ });
+};
+
+// trigger specified handler for event type
+Item.prototype.handleEvent = function( event ) {
+ var method = 'on' + event.type;
+ if ( this[ method ] ) {
+ this[ method ]( event );
+ }
+};
+
+Item.prototype.getSize = function() {
+ this.size = getSize( this.element );
+};
+
+/**
+ * apply CSS styles to element
+ * @param {Object} style
+ */
+Item.prototype.css = function( style ) {
+ var elemStyle = this.element.style;
+
+ for ( var prop in style ) {
+ // use vendor property if available
+ var supportedProp = vendorProperties[ prop ] || prop;
+ elemStyle[ supportedProp ] = style[ prop ];
+ }
+};
+
+ // measure position, and sets it
+Item.prototype.getPosition = function() {
+ var style = getStyle( this.element );
+ var layoutOptions = this.layout.options;
+ var isOriginLeft = layoutOptions.isOriginLeft;
+ var isOriginTop = layoutOptions.isOriginTop;
+ var x = parseInt( style[ isOriginLeft ? 'left' : 'right' ], 10 );
+ var y = parseInt( style[ isOriginTop ? 'top' : 'bottom' ], 10 );
+
+ // clean up 'auto' or other non-integer values
+ x = isNaN( x ) ? 0 : x;
+ y = isNaN( y ) ? 0 : y;
+ // remove padding from measurement
+ var layoutSize = this.layout.size;
+ x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;
+ y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;
+
+ this.position.x = x;
+ this.position.y = y;
+};
+
+// set settled position, apply padding
+Item.prototype.layoutPosition = function() {
+ var layoutSize = this.layout.size;
+ var layoutOptions = this.layout.options;
+ var style = {};
+
+ if ( layoutOptions.isOriginLeft ) {
+ style.left = ( this.position.x + layoutSize.paddingLeft ) + 'px';
+ // reset other property
+ style.right = '';
+ } else {
+ style.right = ( this.position.x + layoutSize.paddingRight ) + 'px';
+ style.left = '';
+ }
+
+ if ( layoutOptions.isOriginTop ) {
+ style.top = ( this.position.y + layoutSize.paddingTop ) + 'px';
+ style.bottom = '';
+ } else {
+ style.bottom = ( this.position.y + layoutSize.paddingBottom ) + 'px';
+ style.top = '';
+ }
+
+ this.css( style );
+ this.emitEvent( 'layout', [ this ] );
+};
+
+
+// transform translate function
+var translate = is3d ?
+ function( x, y ) {
+ return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
+ } :
+ function( x, y ) {
+ return 'translate(' + x + 'px, ' + y + 'px)';
+ };
+
+
+Item.prototype._transitionTo = function( x, y ) {
+ this.getPosition();
+ // get current x & y from top/left
+ var curX = this.position.x;
+ var curY = this.position.y;
+
+ var compareX = parseInt( x, 10 );
+ var compareY = parseInt( y, 10 );
+ var didNotMove = compareX === this.position.x && compareY === this.position.y;
+
+ // save end position
+ this.setPosition( x, y );
+
+ // if did not move and not transitioning, just go to layout
+ if ( didNotMove && !this.isTransitioning ) {
+ this.layoutPosition();
+ return;
+ }
+
+ var transX = x - curX;
+ var transY = y - curY;
+ var transitionStyle = {};
+ // flip cooridinates if origin on right or bottom
+ var layoutOptions = this.layout.options;
+ transX = layoutOptions.isOriginLeft ? transX : -transX;
+ transY = layoutOptions.isOriginTop ? transY : -transY;
+ transitionStyle.transform = translate( transX, transY );
+
+ this.transition({
+ to: transitionStyle,
+ onTransitionEnd: {
+ transform: this.layoutPosition
+ },
+ isCleaning: true
+ });
+};
+
+// non transition + transform support
+Item.prototype.goTo = function( x, y ) {
+ this.setPosition( x, y );
+ this.layoutPosition();
+};
+
+// use transition and transforms if supported
+Item.prototype.moveTo = supportsCSS3 ?
+ Item.prototype._transitionTo : Item.prototype.goTo;
+
+Item.prototype.setPosition = function( x, y ) {
+ this.position.x = parseInt( x, 10 );
+ this.position.y = parseInt( y, 10 );
+};
+
+// ----- transition ----- //
+
+/**
+ * @param {Object} style - CSS
+ * @param {Function} onTransitionEnd
+ */
+
+// non transition, just trigger callback
+Item.prototype._nonTransition = function( args ) {
+ this.css( args.to );
+ if ( args.isCleaning ) {
+ this._removeStyles( args.to );
+ }
+ for ( var prop in args.onTransitionEnd ) {
+ args.onTransitionEnd[ prop ].call( this );
+ }
+};
+
+/**
+ * proper transition
+ * @param {Object} args - arguments
+ * @param {Object} to - style to transition to
+ * @param {Object} from - style to start transition from
+ * @param {Boolean} isCleaning - removes transition styles after transition
+ * @param {Function} onTransitionEnd - callback
+ */
+Item.prototype._transition = function( args ) {
+ // redirect to nonTransition if no transition duration
+ if ( !parseFloat( this.layout.options.transitionDuration ) ) {
+ this._nonTransition( args );
+ return;
+ }
+
+ var _transition = this._transn;
+ // keep track of onTransitionEnd callback by css property
+ for ( var prop in args.onTransitionEnd ) {
+ _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];
+ }
+ // keep track of properties that are transitioning
+ for ( prop in args.to ) {
+ _transition.ingProperties[ prop ] = true;
+ // keep track of properties to clean up when transition is done
+ if ( args.isCleaning ) {
+ _transition.clean[ prop ] = true;
+ }
+ }
+
+ // set from styles
+ if ( args.from ) {
+ this.css( args.from );
+ // force redraw. http://blog.alexmaccaw.com/css-transitions
+ var h = this.element.offsetHeight;
+ // hack for JSHint to hush about unused var
+ h = null;
+ }
+ // enable transition
+ this.enableTransition( args.to );
+ // set styles that are transitioning
+ this.css( args.to );
+
+ this.isTransitioning = true;
+
+};
+
+var itemTransitionProperties = transformProperty && ( toDash( transformProperty ) +
+ ',opacity' );
+
+Item.prototype.enableTransition = function(/* style */) {
+ // only enable if not already transitioning
+ // bug in IE10 were re-setting transition style will prevent
+ // transitionend event from triggering
+ if ( this.isTransitioning ) {
+ return;
+ }
+
+ // make transition: foo, bar, baz from style object
+ // TODO uncomment this bit when IE10 bug is resolved
+ // var transitionValue = [];
+ // for ( var prop in style ) {
+ // // dash-ify camelCased properties like WebkitTransition
+ // transitionValue.push( toDash( prop ) );
+ // }
+ // enable transition styles
+ // HACK always enable transform,opacity for IE10
+ this.css({
+ transitionProperty: itemTransitionProperties,
+ transitionDuration: this.layout.options.transitionDuration
+ });
+ // listen for transition end event
+ this.element.addEventListener( transitionEndEvent, this, false );
+};
+
+Item.prototype.transition = Item.prototype[ transitionProperty ? '_transition' : '_nonTransition' ];
+
+// ----- events ----- //
+
+Item.prototype.onwebkitTransitionEnd = function( event ) {
+ this.ontransitionend( event );
+};
+
+Item.prototype.onotransitionend = function( event ) {
+ this.ontransitionend( event );
+};
+
+// properties that I munge to make my life easier
+var dashedVendorProperties = {
+ '-webkit-transform': 'transform',
+ '-moz-transform': 'transform',
+ '-o-transform': 'transform'
+};
+
+Item.prototype.ontransitionend = function( event ) {
+ // disregard bubbled events from children
+ if ( event.target !== this.element ) {
+ return;
+ }
+ var _transition = this._transn;
+ // get property name of transitioned property, convert to prefix-free
+ var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;
+
+ // remove property that has completed transitioning
+ delete _transition.ingProperties[ propertyName ];
+ // check if any properties are still transitioning
+ if ( isEmptyObj( _transition.ingProperties ) ) {
+ // all properties have completed transitioning
+ this.disableTransition();
+ }
+ // clean style
+ if ( propertyName in _transition.clean ) {
+ // clean up style
+ this.element.style[ event.propertyName ] = '';
+ delete _transition.clean[ propertyName ];
+ }
+ // trigger onTransitionEnd callback
+ if ( propertyName in _transition.onEnd ) {
+ var onTransitionEnd = _transition.onEnd[ propertyName ];
+ onTransitionEnd.call( this );
+ delete _transition.onEnd[ propertyName ];
+ }
+
+ this.emitEvent( 'transitionEnd', [ this ] );
+};
+
+Item.prototype.disableTransition = function() {
+ this.removeTransitionStyles();
+ this.element.removeEventListener( transitionEndEvent, this, false );
+ this.isTransitioning = false;
+};
+
+/**
+ * removes style property from element
+ * @param {Object} style
+**/
+Item.prototype._removeStyles = function( style ) {
+ // clean up transition styles
+ var cleanStyle = {};
+ for ( var prop in style ) {
+ cleanStyle[ prop ] = '';
+ }
+ this.css( cleanStyle );
+};
+
+var cleanTransitionStyle = {
+ transitionProperty: '',
+ transitionDuration: ''
+};
+
+Item.prototype.removeTransitionStyles = function() {
+ // remove transition
+ this.css( cleanTransitionStyle );
+};
+
+// ----- show/hide/remove ----- //
+
+// remove element from DOM
+Item.prototype.removeElem = function() {
+ this.element.parentNode.removeChild( this.element );
+ this.emitEvent( 'remove', [ this ] );
+};
+
+Item.prototype.remove = function() {
+ // just remove element if no transition support or no transition
+ if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {
+ this.removeElem();
+ return;
+ }
+
+ // start transition
+ var _this = this;
+ this.on( 'transitionEnd', function() {
+ _this.removeElem();
+ return true; // bind once
+ });
+ this.hide();
+};
+
+Item.prototype.reveal = function() {
+ delete this.isHidden;
+ // remove display: none
+ this.css({ display: '' });
+
+ var options = this.layout.options;
+ this.transition({
+ from: options.hiddenStyle,
+ to: options.visibleStyle,
+ isCleaning: true
+ });
+};
+
+Item.prototype.hide = function() {
+ // set flag
+ this.isHidden = true;
+ // remove display: none
+ this.css({ display: '' });
+
+ var options = this.layout.options;
+ this.transition({
+ from: options.visibleStyle,
+ to: options.hiddenStyle,
+ // keep hidden stuff hidden
+ isCleaning: true,
+ onTransitionEnd: {
+ opacity: function() {
+ // check if still hidden
+ // during transition, item may have been un-hidden
+ if ( this.isHidden ) {
+ this.css({ display: 'none' });
+ }
+ }
+ }
+ });
+};
+
+Item.prototype.destroy = function() {
+ this.css({
+ position: '',
+ left: '',
+ right: '',
+ top: '',
+ bottom: '',
+ transition: '',
+ transform: ''
+ });
+};
+
+return Item;
+
+}
+
+// -------------------------- transport -------------------------- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'outlayer/item',[
+ 'eventEmitter/EventEmitter',
+ 'get-size/get-size',
+ 'get-style-property/get-style-property'
+ ],
+ outlayerItemDefinition );
+} else {
+ // browser global
+ window.Outlayer = {};
+ window.Outlayer.Item = outlayerItemDefinition(
+ window.EventEmitter,
+ window.getSize,
+ window.getStyleProperty
+ );
+}
+
+})( window );
+
+/*!
+ * Outlayer v1.2.0
+ * the brains and guts of a layout library
+ * MIT license
+ */
+
+( function( window ) {
+
+
+
+// ----- vars ----- //
+
+var document = window.document;
+var console = window.console;
+var jQuery = window.jQuery;
+
+var noop = function() {};
+
+// -------------------------- helpers -------------------------- //
+
+// extend objects
+function extend( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+ return a;
+}
+
+
+var objToString = Object.prototype.toString;
+function isArray( obj ) {
+ return objToString.call( obj ) === '[object Array]';
+}
+
+// turn element or nodeList into an array
+function makeArray( obj ) {
+ var ary = [];
+ if ( isArray( obj ) ) {
+ // use object if already an array
+ ary = obj;
+ } else if ( obj && typeof obj.length === 'number' ) {
+ // convert nodeList to array
+ for ( var i=0, len = obj.length; i < len; i++ ) {
+ ary.push( obj[i] );
+ }
+ } else {
+ // array of single index
+ ary.push( obj );
+ }
+ return ary;
+}
+
+// http://stackoverflow.com/a/384380/182183
+var isElement = ( typeof HTMLElement === 'object' ) ?
+ function isElementDOM2( obj ) {
+ return obj instanceof HTMLElement;
+ } :
+ function isElementQuirky( obj ) {
+ return obj && typeof obj === 'object' &&
+ obj.nodeType === 1 && typeof obj.nodeName === 'string';
+ };
+
+// index of helper cause IE8
+var indexOf = Array.prototype.indexOf ? function( ary, obj ) {
+ return ary.indexOf( obj );
+ } : function( ary, obj ) {
+ for ( var i=0, len = ary.length; i < len; i++ ) {
+ if ( ary[i] === obj ) {
+ return i;
+ }
+ }
+ return -1;
+ };
+
+function removeFrom( obj, ary ) {
+ var index = indexOf( ary, obj );
+ if ( index !== -1 ) {
+ ary.splice( index, 1 );
+ }
+}
+
+// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
+function toDashed( str ) {
+ return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
+ return $1 + '-' + $2;
+ }).toLowerCase();
+}
+
+
+function outlayerDefinition( eventie, docReady, EventEmitter, getSize, matchesSelector, Item ) {
+
+// -------------------------- Outlayer -------------------------- //
+
+// globally unique identifiers
+var GUID = 0;
+// internal store of all Outlayer intances
+var instances = {};
+
+
+/**
+ * @param {Element, String} element
+ * @param {Object} options
+ * @constructor
+ */
+function Outlayer( element, options ) {
+ // use element as selector string
+ if ( typeof element === 'string' ) {
+ element = document.querySelector( element );
+ }
+
+ // bail out if not proper element
+ if ( !element || !isElement( element ) ) {
+ if ( console ) {
+ console.error( 'Bad ' + this.constructor.namespace + ' element: ' + element );
+ }
+ return;
+ }
+
+ this.element = element;
+
+ // options
+ this.options = extend( {}, this.constructor.defaults );
+ this.option( options );
+
+ // add id for Outlayer.getFromElement
+ var id = ++GUID;
+ this.element.outlayerGUID = id; // expando
+ instances[ id ] = this; // associate via id
+
+ // kick it off
+ this._create();
+
+ if ( this.options.isInitLayout ) {
+ this.layout();
+ }
+}
+
+// settings are for internal use only
+Outlayer.namespace = 'outlayer';
+Outlayer.Item = Item;
+
+// default options
+Outlayer.defaults = {
+ containerStyle: {
+ position: 'relative'
+ },
+ isInitLayout: true,
+ isOriginLeft: true,
+ isOriginTop: true,
+ isResizeBound: true,
+ isResizingContainer: true,
+ // item options
+ transitionDuration: '0.4s',
+ hiddenStyle: {
+ opacity: 0,
+ transform: 'scale(0.001)'
+ },
+ visibleStyle: {
+ opacity: 1,
+ transform: 'scale(1)'
+ }
+};
+
+// inherit EventEmitter
+extend( Outlayer.prototype, EventEmitter.prototype );
+
+/**
+ * set options
+ * @param {Object} opts
+ */
+Outlayer.prototype.option = function( opts ) {
+ extend( this.options, opts );
+};
+
+Outlayer.prototype._create = function() {
+ // get items from children
+ this.reloadItems();
+ // elements that affect layout, but are not laid out
+ this.stamps = [];
+ this.stamp( this.options.stamp );
+ // set container style
+ extend( this.element.style, this.options.containerStyle );
+
+ // bind resize method
+ if ( this.options.isResizeBound ) {
+ this.bindResize();
+ }
+};
+
+// goes through all children again and gets bricks in proper order
+Outlayer.prototype.reloadItems = function() {
+ // collection of item elements
+ this.items = this._itemize( this.element.children );
+};
+
+
+/**
+ * turn elements into Outlayer.Items to be used in layout
+ * @param {Array or NodeList or HTMLElement} elems
+ * @returns {Array} items - collection of new Outlayer Items
+ */
+Outlayer.prototype._itemize = function( elems ) {
+
+ var itemElems = this._filterFindItemElements( elems );
+ var Item = this.constructor.Item;
+
+ // create new Outlayer Items for collection
+ var items = [];
+ for ( var i=0, len = itemElems.length; i < len; i++ ) {
+ var elem = itemElems[i];
+ var item = new Item( elem, this );
+ items.push( item );
+ }
+
+ return items;
+};
+
+/**
+ * get item elements to be used in layout
+ * @param {Array or NodeList or HTMLElement} elems
+ * @returns {Array} items - item elements
+ */
+Outlayer.prototype._filterFindItemElements = function( elems ) {
+ // make array of elems
+ elems = makeArray( elems );
+ var itemSelector = this.options.itemSelector;
+ var itemElems = [];
+
+ for ( var i=0, len = elems.length; i < len; i++ ) {
+ var elem = elems[i];
+ // check that elem is an actual element
+ if ( !isElement( elem ) ) {
+ continue;
+ }
+ // filter & find items if we have an item selector
+ if ( itemSelector ) {
+ // filter siblings
+ if ( matchesSelector( elem, itemSelector ) ) {
+ itemElems.push( elem );
+ }
+ // find children
+ var childElems = elem.querySelectorAll( itemSelector );
+ // concat childElems to filterFound array
+ for ( var j=0, jLen = childElems.length; j < jLen; j++ ) {
+ itemElems.push( childElems[j] );
+ }
+ } else {
+ itemElems.push( elem );
+ }
+ }
+
+ return itemElems;
+};
+
+/**
+ * getter method for getting item elements
+ * @returns {Array} elems - collection of item elements
+ */
+Outlayer.prototype.getItemElements = function() {
+ var elems = [];
+ for ( var i=0, len = this.items.length; i < len; i++ ) {
+ elems.push( this.items[i].element );
+ }
+ return elems;
+};
+
+// ----- init & layout ----- //
+
+/**
+ * lays out all items
+ */
+Outlayer.prototype.layout = function() {
+ this._resetLayout();
+ this._manageStamps();
+
+ // don't animate first layout
+ var isInstant = this.options.isLayoutInstant !== undefined ?
+ this.options.isLayoutInstant : !this._isLayoutInited;
+ this.layoutItems( this.items, isInstant );
+
+ // flag for initalized
+ this._isLayoutInited = true;
+};
+
+// _init is alias for layout
+Outlayer.prototype._init = Outlayer.prototype.layout;
+
+/**
+ * logic before any new layout
+ */
+Outlayer.prototype._resetLayout = function() {
+ this.getSize();
+};
+
+
+Outlayer.prototype.getSize = function() {
+ this.size = getSize( this.element );
+};
+
+/**
+ * get measurement from option, for columnWidth, rowHeight, gutter
+ * if option is String -> get element from selector string, & get size of element
+ * if option is Element -> get size of element
+ * else use option as a number
+ *
+ * @param {String} measurement
+ * @param {String} size - width or height
+ * @private
+ */
+Outlayer.prototype._getMeasurement = function( measurement, size ) {
+ var option = this.options[ measurement ];
+ var elem;
+ if ( !option ) {
+ // default to 0
+ this[ measurement ] = 0;
+ } else {
+ // use option as an element
+ if ( typeof option === 'string' ) {
+ elem = this.element.querySelector( option );
+ } else if ( isElement( option ) ) {
+ elem = option;
+ }
+ // use size of element, if element
+ this[ measurement ] = elem ? getSize( elem )[ size ] : option;
+ }
+};
+
+/**
+ * layout a collection of item elements
+ * @api public
+ */
+Outlayer.prototype.layoutItems = function( items, isInstant ) {
+ items = this._getItemsForLayout( items );
+
+ this._layoutItems( items, isInstant );
+
+ this._postLayout();
+};
+
+/**
+ * get the items to be laid out
+ * you may want to skip over some items
+ * @param {Array} items
+ * @returns {Array} items
+ */
+Outlayer.prototype._getItemsForLayout = function( items ) {
+ var layoutItems = [];
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ if ( !item.isIgnored ) {
+ layoutItems.push( item );
+ }
+ }
+ return layoutItems;
+};
+
+/**
+ * layout items
+ * @param {Array} items
+ * @param {Boolean} isInstant
+ */
+Outlayer.prototype._layoutItems = function( items, isInstant ) {
+ var _this = this;
+ function onItemsLayout() {
+ _this.emitEvent( 'layoutComplete', [ _this, items ] );
+ }
+
+ if ( !items || !items.length ) {
+ // no items, emit event with empty array
+ onItemsLayout();
+ return;
+ }
+
+ // emit layoutComplete when done
+ this._itemsOn( items, 'layout', onItemsLayout );
+
+ var queue = [];
+
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ // get x/y object from method
+ var position = this._getItemLayoutPosition( item );
+ // enqueue
+ position.item = item;
+ position.isInstant = isInstant || item.isLayoutInstant;
+ queue.push( position );
+ }
+
+ this._processLayoutQueue( queue );
+};
+
+/**
+ * get item layout position
+ * @param {Outlayer.Item} item
+ * @returns {Object} x and y position
+ */
+Outlayer.prototype._getItemLayoutPosition = function( /* item */ ) {
+ return {
+ x: 0,
+ y: 0
+ };
+};
+
+/**
+ * iterate over array and position each item
+ * Reason being - separating this logic prevents 'layout invalidation'
+ * thx @paul_irish
+ * @param {Array} queue
+ */
+Outlayer.prototype._processLayoutQueue = function( queue ) {
+ for ( var i=0, len = queue.length; i < len; i++ ) {
+ var obj = queue[i];
+ this._positionItem( obj.item, obj.x, obj.y, obj.isInstant );
+ }
+};
+
+/**
+ * Sets position of item in DOM
+ * @param {Outlayer.Item} item
+ * @param {Number} x - horizontal position
+ * @param {Number} y - vertical position
+ * @param {Boolean} isInstant - disables transitions
+ */
+Outlayer.prototype._positionItem = function( item, x, y, isInstant ) {
+ if ( isInstant ) {
+ // if not transition, just set CSS
+ item.goTo( x, y );
+ } else {
+ item.moveTo( x, y );
+ }
+};
+
+/**
+ * Any logic you want to do after each layout,
+ * i.e. size the container
+ */
+Outlayer.prototype._postLayout = function() {
+ this.resizeContainer();
+};
+
+Outlayer.prototype.resizeContainer = function() {
+ if ( !this.options.isResizingContainer ) {
+ return;
+ }
+ var size = this._getContainerSize();
+ if ( size ) {
+ this._setContainerMeasure( size.width, true );
+ this._setContainerMeasure( size.height, false );
+ }
+};
+
+/**
+ * Sets width or height of container if returned
+ * @returns {Object} size
+ * @param {Number} width
+ * @param {Number} height
+ */
+Outlayer.prototype._getContainerSize = noop;
+
+/**
+ * @param {Number} measure - size of width or height
+ * @param {Boolean} isWidth
+ */
+Outlayer.prototype._setContainerMeasure = function( measure, isWidth ) {
+ if ( measure === undefined ) {
+ return;
+ }
+
+ var elemSize = this.size;
+ // add padding and border width if border box
+ if ( elemSize.isBorderBox ) {
+ measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
+ elemSize.borderLeftWidth + elemSize.borderRightWidth :
+ elemSize.paddingBottom + elemSize.paddingTop +
+ elemSize.borderTopWidth + elemSize.borderBottomWidth;
+ }
+
+ measure = Math.max( measure, 0 );
+ this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';
+};
+
+/**
+ * trigger a callback for a collection of items events
+ * @param {Array} items - Outlayer.Items
+ * @param {String} eventName
+ * @param {Function} callback
+ */
+Outlayer.prototype._itemsOn = function( items, eventName, callback ) {
+ var doneCount = 0;
+ var count = items.length;
+ // event callback
+ var _this = this;
+ function tick() {
+ doneCount++;
+ if ( doneCount === count ) {
+ callback.call( _this );
+ }
+ return true; // bind once
+ }
+ // bind callback
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ item.on( eventName, tick );
+ }
+};
+
+// -------------------------- ignore & stamps -------------------------- //
+
+
+/**
+ * keep item in collection, but do not lay it out
+ * ignored items do not get skipped in layout
+ * @param {Element} elem
+ */
+Outlayer.prototype.ignore = function( elem ) {
+ var item = this.getItem( elem );
+ if ( item ) {
+ item.isIgnored = true;
+ }
+};
+
+/**
+ * return item to layout collection
+ * @param {Element} elem
+ */
+Outlayer.prototype.unignore = function( elem ) {
+ var item = this.getItem( elem );
+ if ( item ) {
+ delete item.isIgnored;
+ }
+};
+
+/**
+ * adds elements to stamps
+ * @param {NodeList, Array, Element, or String} elems
+ */
+Outlayer.prototype.stamp = function( elems ) {
+ elems = this._find( elems );
+ if ( !elems ) {
+ return;
+ }
+
+ this.stamps = this.stamps.concat( elems );
+ // ignore
+ for ( var i=0, len = elems.length; i < len; i++ ) {
+ var elem = elems[i];
+ this.ignore( elem );
+ }
+};
+
+/**
+ * removes elements to stamps
+ * @param {NodeList, Array, or Element} elems
+ */
+Outlayer.prototype.unstamp = function( elems ) {
+ elems = this._find( elems );
+ if ( !elems ){
+ return;
+ }
+
+ for ( var i=0, len = elems.length; i < len; i++ ) {
+ var elem = elems[i];
+ // filter out removed stamp elements
+ removeFrom( elem, this.stamps );
+ this.unignore( elem );
+ }
+
+};
+
+/**
+ * finds child elements
+ * @param {NodeList, Array, Element, or String} elems
+ * @returns {Array} elems
+ */
+Outlayer.prototype._find = function( elems ) {
+ if ( !elems ) {
+ return;
+ }
+ // if string, use argument as selector string
+ if ( typeof elems === 'string' ) {
+ elems = this.element.querySelectorAll( elems );
+ }
+ elems = makeArray( elems );
+ return elems;
+};
+
+Outlayer.prototype._manageStamps = function() {
+ if ( !this.stamps || !this.stamps.length ) {
+ return;
+ }
+
+ this._getBoundingRect();
+
+ for ( var i=0, len = this.stamps.length; i < len; i++ ) {
+ var stamp = this.stamps[i];
+ this._manageStamp( stamp );
+ }
+};
+
+// update boundingLeft / Top
+Outlayer.prototype._getBoundingRect = function() {
+ // get bounding rect for container element
+ var boundingRect = this.element.getBoundingClientRect();
+ var size = this.size;
+ this._boundingRect = {
+ left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
+ top: boundingRect.top + size.paddingTop + size.borderTopWidth,
+ right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),
+ bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )
+ };
+};
+
+/**
+ * @param {Element} stamp
+**/
+Outlayer.prototype._manageStamp = noop;
+
+/**
+ * get x/y position of element relative to container element
+ * @param {Element} elem
+ * @returns {Object} offset - has left, top, right, bottom
+ */
+Outlayer.prototype._getElementOffset = function( elem ) {
+ var boundingRect = elem.getBoundingClientRect();
+ var thisRect = this._boundingRect;
+ var size = getSize( elem );
+ var offset = {
+ left: boundingRect.left - thisRect.left - size.marginLeft,
+ top: boundingRect.top - thisRect.top - size.marginTop,
+ right: thisRect.right - boundingRect.right - size.marginRight,
+ bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
+ };
+ return offset;
+};
+
+// -------------------------- resize -------------------------- //
+
+// enable event handlers for listeners
+// i.e. resize -> onresize
+Outlayer.prototype.handleEvent = function( event ) {
+ var method = 'on' + event.type;
+ if ( this[ method ] ) {
+ this[ method ]( event );
+ }
+};
+
+/**
+ * Bind layout to window resizing
+ */
+Outlayer.prototype.bindResize = function() {
+ // bind just one listener
+ if ( this.isResizeBound ) {
+ return;
+ }
+ eventie.bind( window, 'resize', this );
+ this.isResizeBound = true;
+};
+
+/**
+ * Unbind layout to window resizing
+ */
+Outlayer.prototype.unbindResize = function() {
+ if ( this.isResizeBound ) {
+ eventie.unbind( window, 'resize', this );
+ }
+ this.isResizeBound = false;
+};
+
+// original debounce by John Hann
+// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
+
+// this fires every resize
+Outlayer.prototype.onresize = function() {
+ if ( this.resizeTimeout ) {
+ clearTimeout( this.resizeTimeout );
+ }
+
+ var _this = this;
+ function delayed() {
+ _this.resize();
+ delete _this.resizeTimeout;
+ }
+
+ this.resizeTimeout = setTimeout( delayed, 100 );
+};
+
+// debounced, layout on resize
+Outlayer.prototype.resize = function() {
+ // don't trigger if size did not change
+ // or if resize was unbound. See #9
+ if ( !this.isResizeBound || !this.needsResizeLayout() ) {
+ return;
+ }
+
+ this.layout();
+};
+
+/**
+ * check if layout is needed post layout
+ * @returns Boolean
+ */
+Outlayer.prototype.needsResizeLayout = function() {
+ var size = getSize( this.element );
+ // check that this.size and size are there
+ // IE8 triggers resize on body size change, so they might not be
+ var hasSizes = this.size && size;
+ return hasSizes && size.innerWidth !== this.size.innerWidth;
+};
+
+// -------------------------- methods -------------------------- //
+
+/**
+ * add items to Outlayer instance
+ * @param {Array or NodeList or Element} elems
+ * @returns {Array} items - Outlayer.Items
+**/
+Outlayer.prototype.addItems = function( elems ) {
+ var items = this._itemize( elems );
+ // add items to collection
+ if ( items.length ) {
+ this.items = this.items.concat( items );
+ }
+ return items;
+};
+
+/**
+ * Layout newly-appended item elements
+ * @param {Array or NodeList or Element} elems
+ */
+Outlayer.prototype.appended = function( elems ) {
+ var items = this.addItems( elems );
+ if ( !items.length ) {
+ return;
+ }
+ // layout and reveal just the new items
+ this.layoutItems( items, true );
+ this.reveal( items );
+};
+
+/**
+ * Layout prepended elements
+ * @param {Array or NodeList or Element} elems
+ */
+Outlayer.prototype.prepended = function( elems ) {
+ var items = this._itemize( elems );
+ if ( !items.length ) {
+ return;
+ }
+ // add items to beginning of collection
+ var previousItems = this.items.slice(0);
+ this.items = items.concat( previousItems );
+ // start new layout
+ this._resetLayout();
+ this._manageStamps();
+ // layout new stuff without transition
+ this.layoutItems( items, true );
+ this.reveal( items );
+ // layout previous items
+ this.layoutItems( previousItems );
+};
+
+/**
+ * reveal a collection of items
+ * @param {Array of Outlayer.Items} items
+ */
+Outlayer.prototype.reveal = function( items ) {
+ var len = items && items.length;
+ if ( !len ) {
+ return;
+ }
+ for ( var i=0; i < len; i++ ) {
+ var item = items[i];
+ item.reveal();
+ }
+};
+
+/**
+ * hide a collection of items
+ * @param {Array of Outlayer.Items} items
+ */
+Outlayer.prototype.hide = function( items ) {
+ var len = items && items.length;
+ if ( !len ) {
+ return;
+ }
+ for ( var i=0; i < len; i++ ) {
+ var item = items[i];
+ item.hide();
+ }
+};
+
+/**
+ * get Outlayer.Item, given an Element
+ * @param {Element} elem
+ * @param {Function} callback
+ * @returns {Outlayer.Item} item
+ */
+Outlayer.prototype.getItem = function( elem ) {
+ // loop through items to get the one that matches
+ for ( var i=0, len = this.items.length; i < len; i++ ) {
+ var item = this.items[i];
+ if ( item.element === elem ) {
+ // return item
+ return item;
+ }
+ }
+};
+
+/**
+ * get collection of Outlayer.Items, given Elements
+ * @param {Array} elems
+ * @returns {Array} items - Outlayer.Items
+ */
+Outlayer.prototype.getItems = function( elems ) {
+ if ( !elems || !elems.length ) {
+ return;
+ }
+ var items = [];
+ for ( var i=0, len = elems.length; i < len; i++ ) {
+ var elem = elems[i];
+ var item = this.getItem( elem );
+ if ( item ) {
+ items.push( item );
+ }
+ }
+
+ return items;
+};
+
+/**
+ * remove element(s) from instance and DOM
+ * @param {Array or NodeList or Element} elems
+ */
+Outlayer.prototype.remove = function( elems ) {
+ elems = makeArray( elems );
+
+ var removeItems = this.getItems( elems );
+ // bail if no items to remove
+ if ( !removeItems || !removeItems.length ) {
+ return;
+ }
+
+ this._itemsOn( removeItems, 'remove', function() {
+ this.emitEvent( 'removeComplete', [ this, removeItems ] );
+ });
+
+ for ( var i=0, len = removeItems.length; i < len; i++ ) {
+ var item = removeItems[i];
+ item.remove();
+ // remove item from collection
+ removeFrom( item, this.items );
+ }
+};
+
+// ----- destroy ----- //
+
+// remove and disable Outlayer instance
+Outlayer.prototype.destroy = function() {
+ // clean up dynamic styles
+ var style = this.element.style;
+ style.height = '';
+ style.position = '';
+ style.width = '';
+ // destroy items
+ for ( var i=0, len = this.items.length; i < len; i++ ) {
+ var item = this.items[i];
+ item.destroy();
+ }
+
+ this.unbindResize();
+
+ delete this.element.outlayerGUID;
+ // remove data for jQuery
+ if ( jQuery ) {
+ jQuery.removeData( this.element, this.constructor.namespace );
+ }
+
+};
+
+// -------------------------- data -------------------------- //
+
+/**
+ * get Outlayer instance from element
+ * @param {Element} elem
+ * @returns {Outlayer}
+ */
+Outlayer.data = function( elem ) {
+ var id = elem && elem.outlayerGUID;
+ return id && instances[ id ];
+};
+
+
+// -------------------------- create Outlayer class -------------------------- //
+
+/**
+ * create a layout class
+ * @param {String} namespace
+ */
+Outlayer.create = function( namespace, options ) {
+ // sub-class Outlayer
+ function Layout() {
+ Outlayer.apply( this, arguments );
+ }
+ // inherit Outlayer prototype, use Object.create if there
+ if ( Object.create ) {
+ Layout.prototype = Object.create( Outlayer.prototype );
+ } else {
+ extend( Layout.prototype, Outlayer.prototype );
+ }
+ // set contructor, used for namespace and Item
+ Layout.prototype.constructor = Layout;
+
+ Layout.defaults = extend( {}, Outlayer.defaults );
+ // apply new options
+ extend( Layout.defaults, options );
+ // keep prototype.settings for backwards compatibility (Packery v1.2.0)
+ Layout.prototype.settings = {};
+
+ Layout.namespace = namespace;
+
+ Layout.data = Outlayer.data;
+
+ // sub-class Item
+ Layout.Item = function LayoutItem() {
+ Item.apply( this, arguments );
+ };
+
+ Layout.Item.prototype = new Item();
+
+ // -------------------------- declarative -------------------------- //
+
+ /**
+ * allow user to initialize Outlayer via .js-namespace class
+ * options are parsed from data-namespace-option attribute
+ */
+ docReady( function() {
+ var dashedNamespace = toDashed( namespace );
+ var elems = document.querySelectorAll( '.js-' + dashedNamespace );
+ var dataAttr = 'data-' + dashedNamespace + '-options';
+
+ for ( var i=0, len = elems.length; i < len; i++ ) {
+ var elem = elems[i];
+ var attr = elem.getAttribute( dataAttr );
+ var options;
+ try {
+ options = attr && JSON.parse( attr );
+ } catch ( error ) {
+ // log error, do not initialize
+ if ( console ) {
+ console.error( 'Error parsing ' + dataAttr + ' on ' +
+ elem.nodeName.toLowerCase() + ( elem.id ? '#' + elem.id : '' ) + ': ' +
+ error );
+ }
+ continue;
+ }
+ // initialize
+ var instance = new Layout( elem, options );
+ // make available via $().data('layoutname')
+ if ( jQuery ) {
+ jQuery.data( elem, namespace, instance );
+ }
+ }
+ });
+
+ // -------------------------- jQuery bridge -------------------------- //
+
+ // make into jQuery plugin
+ if ( jQuery && jQuery.bridget ) {
+ jQuery.bridget( namespace, Layout );
+ }
+
+ return Layout;
+};
+
+// ----- fin ----- //
+
+// back in global
+Outlayer.Item = Item;
+
+return Outlayer;
+
+}
+
+// -------------------------- transport -------------------------- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'outlayer/outlayer',[
+ 'eventie/eventie',
+ 'doc-ready/doc-ready',
+ 'eventEmitter/EventEmitter',
+ 'get-size/get-size',
+ 'matches-selector/matches-selector',
+ './item'
+ ],
+ outlayerDefinition );
+} else {
+ // browser global
+ window.Outlayer = outlayerDefinition(
+ window.eventie,
+ window.docReady,
+ window.EventEmitter,
+ window.getSize,
+ window.matchesSelector,
+ window.Outlayer.Item
+ );
+}
+
+})( window );
+
+/**
+ * Isotope Item
+**/
+
+( function( window ) {
+
+
+
+// -------------------------- Item -------------------------- //
+
+function itemDefinition( Outlayer ) {
+
+// sub-class Outlayer Item
+function Item() {
+ Outlayer.Item.apply( this, arguments );
+}
+
+Item.prototype = new Outlayer.Item();
+
+Item.prototype._create = function() {
+ // assign id, used for original-order sorting
+ this.id = this.layout.itemGUID++;
+ Outlayer.Item.prototype._create.call( this );
+ this.sortData = {};
+};
+
+Item.prototype.updateSortData = function() {
+ if ( this.isIgnored ) {
+ return;
+ }
+ // default sorters
+ this.sortData.id = this.id;
+ // for backward compatibility
+ this.sortData['original-order'] = this.id;
+ this.sortData.random = Math.random();
+ // go thru getSortData obj and apply the sorters
+ var getSortData = this.layout.options.getSortData;
+ var sorters = this.layout._sorters;
+ for ( var key in getSortData ) {
+ var sorter = sorters[ key ];
+ this.sortData[ key ] = sorter( this.element, this );
+ }
+};
+
+return Item;
+
+}
+
+// -------------------------- transport -------------------------- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'isotope/js/item',[
+ 'outlayer/outlayer'
+ ],
+ itemDefinition );
+} else {
+ // browser global
+ window.Isotope = window.Isotope || {};
+ window.Isotope.Item = itemDefinition(
+ window.Outlayer
+ );
+}
+
+})( window );
+
+( function( window ) {
+
+
+
+// -------------------------- -------------------------- //
+
+function layoutModeDefinition( getSize, Outlayer ) {
+
+ // layout mode class
+ function LayoutMode( isotope ) {
+ this.isotope = isotope;
+ // link properties
+ if ( isotope ) {
+ this.options = isotope.options[ this.namespace ];
+ this.element = isotope.element;
+ this.items = isotope.filteredItems;
+ this.size = isotope.size;
+ }
+ }
+
+ /**
+ * some methods should just defer to default Outlayer method
+ * and reference the Isotope instance as `this`
+ **/
+ ( function() {
+ var facadeMethods = [
+ '_resetLayout',
+ '_getItemLayoutPosition',
+ '_manageStamp',
+ '_getContainerSize',
+ '_getElementOffset',
+ 'needsResizeLayout'
+ ];
+
+ for ( var i=0, len = facadeMethods.length; i < len; i++ ) {
+ var methodName = facadeMethods[i];
+ LayoutMode.prototype[ methodName ] = getOutlayerMethod( methodName );
+ }
+
+ function getOutlayerMethod( methodName ) {
+ return function() {
+ return Outlayer.prototype[ methodName ].apply( this.isotope, arguments );
+ };
+ }
+ })();
+
+ // ----- ----- //
+
+ // for horizontal layout modes, check vertical size
+ LayoutMode.prototype.needsVerticalResizeLayout = function() {
+ // don't trigger if size did not change
+ var size = getSize( this.isotope.element );
+ // check that this.size and size are there
+ // IE8 triggers resize on body size change, so they might not be
+ var hasSizes = this.isotope.size && size;
+ return hasSizes && size.innerHeight !== this.isotope.size.innerHeight;
+ };
+
+ // ----- measurements ----- //
+
+ LayoutMode.prototype._getMeasurement = function() {
+ this.isotope._getMeasurement.apply( this, arguments );
+ };
+
+ LayoutMode.prototype.getColumnWidth = function() {
+ this.getSegmentSize( 'column', 'Width' );
+ };
+
+ LayoutMode.prototype.getRowHeight = function() {
+ this.getSegmentSize( 'row', 'Height' );
+ };
+
+ /**
+ * get columnWidth or rowHeight
+ * segment: 'column' or 'row'
+ * size 'Width' or 'Height'
+ **/
+ LayoutMode.prototype.getSegmentSize = function( segment, size ) {
+ var segmentName = segment + size;
+ var outerSize = 'outer' + size;
+ // columnWidth / outerWidth // rowHeight / outerHeight
+ this._getMeasurement( segmentName, outerSize );
+ // got rowHeight or columnWidth, we can chill
+ if ( this[ segmentName ] ) {
+ return;
+ }
+ // fall back to item of first element
+ var firstItemSize = this.getFirstItemSize();
+ this[ segmentName ] = firstItemSize && firstItemSize[ outerSize ] ||
+ // or size of container
+ this.isotope.size[ 'inner' + size ];
+ };
+
+ LayoutMode.prototype.getFirstItemSize = function() {
+ var firstItem = this.isotope.filteredItems[0];
+ return firstItem && firstItem.element && getSize( firstItem.element );
+ };
+
+ // ----- methods that should reference isotope ----- //
+
+ LayoutMode.prototype.layout = function() {
+ this.isotope.layout.apply( this.isotope, arguments );
+ };
+
+ LayoutMode.prototype.getSize = function() {
+ this.isotope.getSize();
+ this.size = this.isotope.size;
+ };
+
+ // -------------------------- create -------------------------- //
+
+ LayoutMode.modes = {};
+
+ LayoutMode.create = function( namespace, options ) {
+
+ function Mode() {
+ LayoutMode.apply( this, arguments );
+ }
+
+ Mode.prototype = new LayoutMode();
+
+ // default options
+ if ( options ) {
+ Mode.options = options;
+ }
+
+ Mode.prototype.namespace = namespace;
+ // register in Isotope
+ LayoutMode.modes[ namespace ] = Mode;
+
+ return Mode;
+ };
+
+
+ return LayoutMode;
+
+}
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'isotope/js/layout-mode',[
+ 'get-size/get-size',
+ 'outlayer/outlayer'
+ ],
+ layoutModeDefinition );
+} else {
+ // browser global
+ window.Isotope = window.Isotope || {};
+ window.Isotope.LayoutMode = layoutModeDefinition(
+ window.getSize,
+ window.Outlayer
+ );
+}
+
+
+})( window );
+
+/*!
+ * Masonry v3.1.5
+ * Cascading grid layout library
+ * http://masonry.desandro.com
+ * MIT License
+ * by David DeSandro
+ */
+
+( function( window ) {
+
+
+
+// -------------------------- helpers -------------------------- //
+
+var indexOf = Array.prototype.indexOf ?
+ function( items, value ) {
+ return items.indexOf( value );
+ } :
+ function ( items, value ) {
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ if ( item === value ) {
+ return i;
+ }
+ }
+ return -1;
+ };
+
+// -------------------------- masonryDefinition -------------------------- //
+
+// used for AMD definition and requires
+function masonryDefinition( Outlayer, getSize ) {
+ // create an Outlayer layout class
+ var Masonry = Outlayer.create('masonry');
+
+ Masonry.prototype._resetLayout = function() {
+ this.getSize();
+ this._getMeasurement( 'columnWidth', 'outerWidth' );
+ this._getMeasurement( 'gutter', 'outerWidth' );
+ this.measureColumns();
+
+ // reset column Y
+ var i = this.cols;
+ this.colYs = [];
+ while (i--) {
+ this.colYs.push( 0 );
+ }
+
+ this.maxY = 0;
+ };
+
+ Masonry.prototype.measureColumns = function() {
+ this.getContainerWidth();
+ // if columnWidth is 0, default to outerWidth of first item
+ if ( !this.columnWidth ) {
+ var firstItem = this.items[0];
+ var firstItemElem = firstItem && firstItem.element;
+ // columnWidth fall back to item of first element
+ this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||
+ // if first elem has no width, default to size of container
+ this.containerWidth;
+ }
+
+ this.columnWidth += this.gutter;
+
+ this.cols = Math.floor( ( this.containerWidth + this.gutter ) / this.columnWidth );
+ this.cols = Math.max( this.cols, 1 );
+ };
+
+ Masonry.prototype.getContainerWidth = function() {
+ // container is parent if fit width
+ var container = this.options.isFitWidth ? this.element.parentNode : this.element;
+ // check that this.size and size are there
+ // IE8 triggers resize on body size change, so they might not be
+ var size = getSize( container );
+ this.containerWidth = size && size.innerWidth;
+ };
+
+ Masonry.prototype._getItemLayoutPosition = function( item ) {
+ item.getSize();
+ // how many columns does this brick span
+ var remainder = item.size.outerWidth % this.columnWidth;
+ var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';
+ // round if off by 1 pixel, otherwise use ceil
+ var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );
+ colSpan = Math.min( colSpan, this.cols );
+
+ var colGroup = this._getColGroup( colSpan );
+ // get the minimum Y value from the columns
+ var minimumY = Math.min.apply( Math, colGroup );
+ var shortColIndex = indexOf( colGroup, minimumY );
+
+ // position the brick
+ var position = {
+ x: this.columnWidth * shortColIndex,
+ y: minimumY
+ };
+
+ // apply setHeight to necessary columns
+ var setHeight = minimumY + item.size.outerHeight;
+ var setSpan = this.cols + 1 - colGroup.length;
+ for ( var i = 0; i < setSpan; i++ ) {
+ this.colYs[ shortColIndex + i ] = setHeight;
+ }
+
+ return position;
+ };
+
+ /**
+ * @param {Number} colSpan - number of columns the element spans
+ * @returns {Array} colGroup
+ */
+ Masonry.prototype._getColGroup = function( colSpan ) {
+ if ( colSpan < 2 ) {
+ // if brick spans only one column, use all the column Ys
+ return this.colYs;
+ }
+
+ var colGroup = [];
+ // how many different places could this brick fit horizontally
+ var groupCount = this.cols + 1 - colSpan;
+ // for each group potential horizontal position
+ for ( var i = 0; i < groupCount; i++ ) {
+ // make an array of colY values for that one group
+ var groupColYs = this.colYs.slice( i, i + colSpan );
+ // and get the max value of the array
+ colGroup[i] = Math.max.apply( Math, groupColYs );
+ }
+ return colGroup;
+ };
+
+ Masonry.prototype._manageStamp = function( stamp ) {
+ var stampSize = getSize( stamp );
+ var offset = this._getElementOffset( stamp );
+ // get the columns that this stamp affects
+ var firstX = this.options.isOriginLeft ? offset.left : offset.right;
+ var lastX = firstX + stampSize.outerWidth;
+ var firstCol = Math.floor( firstX / this.columnWidth );
+ firstCol = Math.max( 0, firstCol );
+ var lastCol = Math.floor( lastX / this.columnWidth );
+ // lastCol should not go over if multiple of columnWidth #425
+ lastCol -= lastX % this.columnWidth ? 0 : 1;
+ lastCol = Math.min( this.cols - 1, lastCol );
+ // set colYs to bottom of the stamp
+ var stampMaxY = ( this.options.isOriginTop ? offset.top : offset.bottom ) +
+ stampSize.outerHeight;
+ for ( var i = firstCol; i <= lastCol; i++ ) {
+ this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );
+ }
+ };
+
+ Masonry.prototype._getContainerSize = function() {
+ this.maxY = Math.max.apply( Math, this.colYs );
+ var size = {
+ height: this.maxY
+ };
+
+ if ( this.options.isFitWidth ) {
+ size.width = this._getContainerFitWidth();
+ }
+
+ return size;
+ };
+
+ Masonry.prototype._getContainerFitWidth = function() {
+ var unusedCols = 0;
+ // count unused columns
+ var i = this.cols;
+ while ( --i ) {
+ if ( this.colYs[i] !== 0 ) {
+ break;
+ }
+ unusedCols++;
+ }
+ // fit container to columns that have been used
+ return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;
+ };
+
+ Masonry.prototype.needsResizeLayout = function() {
+ var previousWidth = this.containerWidth;
+ this.getContainerWidth();
+ return previousWidth !== this.containerWidth;
+ };
+
+ return Masonry;
+}
+
+// -------------------------- transport -------------------------- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'masonry/masonry',[
+ 'outlayer/outlayer',
+ 'get-size/get-size'
+ ],
+ masonryDefinition );
+} else {
+ // browser global
+ window.Masonry = masonryDefinition(
+ window.Outlayer,
+ window.getSize
+ );
+}
+
+})( window );
+
+/*!
+ * Masonry layout mode
+ * sub-classes Masonry
+ * http://masonry.desandro.com
+ */
+
+( function( window ) {
+
+
+
+// -------------------------- helpers -------------------------- //
+
+// extend objects
+function extend( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+ return a;
+}
+
+// -------------------------- masonryDefinition -------------------------- //
+
+// used for AMD definition and requires
+function masonryDefinition( LayoutMode, Masonry ) {
+ // create an Outlayer layout class
+ var MasonryMode = LayoutMode.create('masonry');
+
+ // save on to these methods
+ var _getElementOffset = MasonryMode.prototype._getElementOffset;
+ var layout = MasonryMode.prototype.layout;
+ var _getMeasurement = MasonryMode.prototype._getMeasurement;
+
+ // sub-class Masonry
+ extend( MasonryMode.prototype, Masonry.prototype );
+
+ // set back, as it was overwritten by Masonry
+ MasonryMode.prototype._getElementOffset = _getElementOffset;
+ MasonryMode.prototype.layout = layout;
+ MasonryMode.prototype._getMeasurement = _getMeasurement;
+
+ var measureColumns = MasonryMode.prototype.measureColumns;
+ MasonryMode.prototype.measureColumns = function() {
+ // set items, used if measuring first item
+ this.items = this.isotope.filteredItems;
+ measureColumns.call( this );
+ };
+
+ // HACK copy over isOriginLeft/Top options
+ var _manageStamp = MasonryMode.prototype._manageStamp;
+ MasonryMode.prototype._manageStamp = function() {
+ this.options.isOriginLeft = this.isotope.options.isOriginLeft;
+ this.options.isOriginTop = this.isotope.options.isOriginTop;
+ _manageStamp.apply( this, arguments );
+ };
+
+ return MasonryMode;
+}
+
+// -------------------------- transport -------------------------- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'isotope/js/layout-modes/masonry',[
+ '../layout-mode',
+ 'masonry/masonry'
+ ],
+ masonryDefinition );
+} else {
+ // browser global
+ masonryDefinition(
+ window.Isotope.LayoutMode,
+ window.Masonry
+ );
+}
+
+})( window );
+
+( function( window ) {
+
+
+
+function fitRowsDefinition( LayoutMode ) {
+
+var FitRows = LayoutMode.create('fitRows');
+
+FitRows.prototype._resetLayout = function() {
+ this.x = 0;
+ this.y = 0;
+ this.maxY = 0;
+};
+
+FitRows.prototype._getItemLayoutPosition = function( item ) {
+ item.getSize();
+
+ // if this element cannot fit in the current row
+ if ( this.x !== 0 && item.size.outerWidth + this.x > this.isotope.size.innerWidth ) {
+ this.x = 0;
+ this.y = this.maxY;
+ }
+
+ var position = {
+ x: this.x,
+ y: this.y
+ };
+
+ this.maxY = Math.max( this.maxY, this.y + item.size.outerHeight );
+ this.x += item.size.outerWidth;
+
+ return position;
+};
+
+FitRows.prototype._getContainerSize = function() {
+ return { height: this.maxY };
+};
+
+return FitRows;
+
+}
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'isotope/js/layout-modes/fit-rows',[
+ '../layout-mode'
+ ],
+ fitRowsDefinition );
+} else {
+ // browser global
+ fitRowsDefinition(
+ window.Isotope.LayoutMode
+ );
+}
+
+})( window );
+
+( function( window ) {
+
+
+
+function verticalDefinition( LayoutMode ) {
+
+var Vertical = LayoutMode.create( 'vertical', {
+ horizontalAlignment: 0
+});
+
+Vertical.prototype._resetLayout = function() {
+ this.y = 0;
+};
+
+Vertical.prototype._getItemLayoutPosition = function( item ) {
+ item.getSize();
+ var x = ( this.isotope.size.innerWidth - item.size.outerWidth ) *
+ this.options.horizontalAlignment;
+ var y = this.y;
+ this.y += item.size.outerHeight;
+ return { x: x, y: y };
+};
+
+Vertical.prototype._getContainerSize = function() {
+ return { height: this.y };
+};
+
+return Vertical;
+
+}
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( 'isotope/js/layout-modes/vertical',[
+ '../layout-mode'
+ ],
+ verticalDefinition );
+} else {
+ // browser global
+ verticalDefinition(
+ window.Isotope.LayoutMode
+ );
+}
+
+})( window );
+
+/*!
+ * Isotope v2.0.0
+ * Filter & sort magical layouts
+ * http://isotope.metafizzy.co
+ */
+
+( function( window ) {
+
+
+
+// -------------------------- vars -------------------------- //
+
+var jQuery = window.jQuery;
+
+// -------------------------- helpers -------------------------- //
+
+// extend objects
+function extend( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+ return a;
+}
+
+var trim = String.prototype.trim ?
+ function( str ) {
+ return str.trim();
+ } :
+ function( str ) {
+ return str.replace( /^\s+|\s+$/g, '' );
+ };
+
+var docElem = document.documentElement;
+
+var getText = docElem.textContent ?
+ function( elem ) {
+ return elem.textContent;
+ } :
+ function( elem ) {
+ return elem.innerText;
+ };
+
+var objToString = Object.prototype.toString;
+function isArray( obj ) {
+ return objToString.call( obj ) === '[object Array]';
+}
+
+// index of helper cause IE8
+var indexOf = Array.prototype.indexOf ? function( ary, obj ) {
+ return ary.indexOf( obj );
+ } : function( ary, obj ) {
+ for ( var i=0, len = ary.length; i < len; i++ ) {
+ if ( ary[i] === obj ) {
+ return i;
+ }
+ }
+ return -1;
+ };
+
+// turn element or nodeList into an array
+function makeArray( obj ) {
+ var ary = [];
+ if ( isArray( obj ) ) {
+ // use object if already an array
+ ary = obj;
+ } else if ( obj && typeof obj.length === 'number' ) {
+ // convert nodeList to array
+ for ( var i=0, len = obj.length; i < len; i++ ) {
+ ary.push( obj[i] );
+ }
+ } else {
+ // array of single index
+ ary.push( obj );
+ }
+ return ary;
+}
+
+function removeFrom( obj, ary ) {
+ var index = indexOf( ary, obj );
+ if ( index !== -1 ) {
+ ary.splice( index, 1 );
+ }
+}
+
+// -------------------------- isotopeDefinition -------------------------- //
+
+// used for AMD definition and requires
+function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {
+ // create an Outlayer layout class
+ var Isotope = Outlayer.create( 'isotope', {
+ layoutMode: "masonry",
+ isJQueryFiltering: true,
+ sortAscending: true
+ });
+
+ Isotope.Item = Item;
+ Isotope.LayoutMode = LayoutMode;
+
+ Isotope.prototype._create = function() {
+ this.itemGUID = 0;
+ // functions that sort items
+ this._sorters = {};
+ this._getSorters();
+ // call super
+ Outlayer.prototype._create.call( this );
+
+ // create layout modes
+ this.modes = {};
+ // start filteredItems with all items
+ this.filteredItems = this.items;
+ // keep of track of sortBys
+ this.sortHistory = [ 'original-order' ];
+ // create from registered layout modes
+ for ( var name in LayoutMode.modes ) {
+ this._initLayoutMode( name );
+ }
+ };
+
+ Isotope.prototype.reloadItems = function() {
+ // reset item ID counter
+ this.itemGUID = 0;
+ // call super
+ Outlayer.prototype.reloadItems.call( this );
+ };
+
+ Isotope.prototype._itemize = function() {
+ var items = Outlayer.prototype._itemize.apply( this, arguments );
+ // assign ID for original-order
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ item.id = this.itemGUID++;
+ }
+ this._updateItemsSortData( items );
+ return items;
+ };
+
+
+ // -------------------------- layout -------------------------- //
+
+ Isotope.prototype._initLayoutMode = function( name ) {
+ var Mode = LayoutMode.modes[ name ];
+ // set mode options
+ // HACK extend initial options, back-fill in default options
+ var initialOpts = this.options[ name ] || {};
+ this.options[ name ] = Mode.options ?
+ extend( Mode.options, initialOpts ) : initialOpts;
+ // init layout mode instance
+ this.modes[ name ] = new Mode( this );
+ };
+
+
+ Isotope.prototype.layout = function() {
+ // if first time doing layout, do all magic
+ if ( !this._isLayoutInited && this.options.isInitLayout ) {
+ this.arrange();
+ return;
+ }
+ this._layout();
+ };
+
+ // private method to be used in layout() & magic()
+ Isotope.prototype._layout = function() {
+ // don't animate first layout
+ var isInstant = this._getIsInstant();
+ // layout flow
+ this._resetLayout();
+ this._manageStamps();
+ this.layoutItems( this.filteredItems, isInstant );
+
+ // flag for initalized
+ this._isLayoutInited = true;
+ };
+
+ // filter + sort + layout
+ Isotope.prototype.arrange = function( opts ) {
+ // set any options pass
+ this.option( opts );
+ this._getIsInstant();
+ // filter, sort, and layout
+ this.filteredItems = this._filter( this.items );
+ this._sort();
+ this._layout();
+ };
+ // alias to _init for main plugin method
+ Isotope.prototype._init = Isotope.prototype.arrange;
+
+ // HACK
+ // Don't animate/transition first layout
+ // Or don't animate/transition other layouts
+ Isotope.prototype._getIsInstant = function() {
+ var isInstant = this.options.isLayoutInstant !== undefined ?
+ this.options.isLayoutInstant : !this._isLayoutInited;
+ this._isInstant = isInstant;
+ return isInstant;
+ };
+
+ // -------------------------- filter -------------------------- //
+
+ Isotope.prototype._filter = function( items ) {
+ var filter = this.options.filter;
+ filter = filter || '*';
+ var matches = [];
+ var hiddenMatched = [];
+ var visibleUnmatched = [];
+
+ var test = this._getFilterTest( filter );
+
+ // test each item
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ if ( item.isIgnored ) {
+ continue;
+ }
+ // add item to either matched or unmatched group
+ var isMatched = test( item );
+ // item.isFilterMatched = isMatched;
+ // add to matches if its a match
+ if ( isMatched ) {
+ matches.push( item );
+ }
+ // add to additional group if item needs to be hidden or revealed
+ if ( isMatched && item.isHidden ) {
+ hiddenMatched.push( item );
+ } else if ( !isMatched && !item.isHidden ) {
+ visibleUnmatched.push( item );
+ }
+ }
+
+ var _this = this;
+ function hideReveal() {
+ _this.reveal( hiddenMatched );
+ _this.hide( visibleUnmatched );
+ }
+
+ if ( this._isInstant ) {
+ this._noTransition( hideReveal );
+ } else {
+ hideReveal();
+ }
+
+ return matches;
+ };
+
+ // get a jQuery, function, or a matchesSelector test given the filter
+ Isotope.prototype._getFilterTest = function( filter ) {
+ if ( jQuery && this.options.isJQueryFiltering ) {
+ // use jQuery
+ return function( item ) {
+ return jQuery( item.element ).is( filter );
+ };
+ }
+ if ( typeof filter === 'function' ) {
+ // use filter as function
+ return function( item ) {
+ return filter( item.element );
+ };
+ }
+ // default, use filter as selector string
+ return function( item ) {
+ return matchesSelector( item.element, filter );
+ };
+ };
+
+ // -------------------------- sorting -------------------------- //
+
+ /**
+ * @params {Array} elems
+ * @public
+ */
+ Isotope.prototype.updateSortData = function( elems ) {
+ this._getSorters();
+ // update item sort data
+ // default to all items if none are passed in
+ elems = makeArray( elems );
+ var items = this.getItems( elems );
+ // if no items found, update all items
+ items = items.length ? items : this.items;
+ this._updateItemsSortData( items );
+ };
+
+ Isotope.prototype._getSorters = function() {
+ var getSortData = this.options.getSortData;
+ for ( var key in getSortData ) {
+ var sorter = getSortData[ key ];
+ this._sorters[ key ] = mungeSorter( sorter );
+ }
+ };
+
+ /**
+ * @params {Array} items - of Isotope.Items
+ * @private
+ */
+ Isotope.prototype._updateItemsSortData = function( items ) {
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ item.updateSortData();
+ }
+ };
+
+ // ----- munge sorter ----- //
+
+ // encapsulate this, as we just need mungeSorter
+ // other functions in here are just for munging
+ var mungeSorter = ( function() {
+ // add a magic layer to sorters for convienent shorthands
+ // `.foo-bar` will use the text of .foo-bar querySelector
+ // `[foo-bar]` will use attribute
+ // you can also add parser
+ // `.foo-bar parseInt` will parse that as a number
+ function mungeSorter( sorter ) {
+ // if not a string, return function or whatever it is
+ if ( typeof sorter !== 'string' ) {
+ return sorter;
+ }
+ // parse the sorter string
+ var args = trim( sorter ).split(' ');
+ var query = args[0];
+ // check if query looks like [an-attribute]
+ var attrMatch = query.match( /^\[(.+)\]$/ );
+ var attr = attrMatch && attrMatch[1];
+ var getValue = getValueGetter( attr, query );
+ // use second argument as a parser
+ var parser = Isotope.sortDataParsers[ args[1] ];
+ // parse the value, if there was a parser
+ sorter = parser ? function( elem ) {
+ return elem && parser( getValue( elem ) );
+ } :
+ // otherwise just return value
+ function( elem ) {
+ return elem && getValue( elem );
+ };
+
+ return sorter;
+ }
+
+ // get an attribute getter, or get text of the querySelector
+ function getValueGetter( attr, query ) {
+ var getValue;
+ // if query looks like [foo-bar], get attribute
+ if ( attr ) {
+ getValue = function( elem ) {
+ return elem.getAttribute( attr );
+ };
+ } else {
+ // otherwise, assume its a querySelector, and get its text
+ getValue = function( elem ) {
+ var child = elem.querySelector( query );
+ return child && getText( child );
+ };
+ }
+ return getValue;
+ }
+
+ return mungeSorter;
+ })();
+
+ // parsers used in getSortData shortcut strings
+ Isotope.sortDataParsers = {
+ 'parseInt': function( val ) {
+ return parseInt( val, 10 );
+ },
+ 'parseFloat': function( val ) {
+ return parseFloat( val );
+ }
+ };
+
+ // ----- sort method ----- //
+
+ // sort filteredItem order
+ Isotope.prototype._sort = function() {
+ var sortByOpt = this.options.sortBy;
+ if ( !sortByOpt ) {
+ return;
+ }
+ // concat all sortBy and sortHistory
+ var sortBys = [].concat.apply( sortByOpt, this.sortHistory );
+ // sort magic
+ var itemSorter = getItemSorter( sortBys, this.options.sortAscending );
+ this.filteredItems.sort( itemSorter );
+ // keep track of sortBy History
+ if ( sortByOpt !== this.sortHistory[0] ) {
+ // add to front, oldest goes in last
+ this.sortHistory.unshift( sortByOpt );
+ }
+ };
+
+ // returns a function used for sorting
+ function getItemSorter( sortBys, sortAsc ) {
+ return function sorter( itemA, itemB ) {
+ // cycle through all sortKeys
+ for ( var i = 0, len = sortBys.length; i < len; i++ ) {
+ var sortBy = sortBys[i];
+ var a = itemA.sortData[ sortBy ];
+ var b = itemB.sortData[ sortBy ];
+ if ( a > b || a < b ) {
+ // if sortAsc is an object, use the value given the sortBy key
+ var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;
+ var direction = isAscending ? 1 : -1;
+ return ( a > b ? 1 : -1 ) * direction;
+ }
+ }
+ return 0;
+ };
+ }
+
+ // -------------------------- methods -------------------------- //
+
+ // get layout mode
+ Isotope.prototype._mode = function() {
+ var layoutMode = this.options.layoutMode;
+ var mode = this.modes[ layoutMode ];
+ if ( !mode ) {
+ // TODO console.error
+ throw new Error( 'No layout mode: ' + layoutMode );
+ }
+ // HACK sync mode's options
+ // any options set after init for layout mode need to be synced
+ mode.options = this.options[ layoutMode ];
+ return mode;
+ };
+
+ Isotope.prototype._resetLayout = function() {
+ // trigger original reset layout
+ Outlayer.prototype._resetLayout.call( this );
+ this._mode()._resetLayout();
+ };
+
+ Isotope.prototype._getItemLayoutPosition = function( item ) {
+ return this._mode()._getItemLayoutPosition( item );
+ };
+
+ Isotope.prototype._manageStamp = function( stamp ) {
+ this._mode()._manageStamp( stamp );
+ };
+
+ Isotope.prototype._getContainerSize = function() {
+ return this._mode()._getContainerSize();
+ };
+
+ Isotope.prototype.needsResizeLayout = function() {
+ return this._mode().needsResizeLayout();
+ };
+
+ // -------------------------- adding & removing -------------------------- //
+
+ // HEADS UP overwrites default Outlayer appended
+ Isotope.prototype.appended = function( elems ) {
+ var items = this.addItems( elems );
+ if ( !items.length ) {
+ return;
+ }
+ var filteredItems = this._filterRevealAdded( items );
+ // add to filteredItems
+ this.filteredItems = this.filteredItems.concat( filteredItems );
+ };
+
+ // HEADS UP overwrites default Outlayer prepended
+ Isotope.prototype.prepended = function( elems ) {
+ var items = this._itemize( elems );
+ if ( !items.length ) {
+ return;
+ }
+ // add items to beginning of collection
+ var previousItems = this.items.slice(0);
+ this.items = items.concat( previousItems );
+ // start new layout
+ this._resetLayout();
+ this._manageStamps();
+ // layout new stuff without transition
+ var filteredItems = this._filterRevealAdded( items );
+ // layout previous items
+ this.layoutItems( previousItems );
+ // add to filteredItems
+ this.filteredItems = filteredItems.concat( this.filteredItems );
+ };
+
+ Isotope.prototype._filterRevealAdded = function( items ) {
+ var filteredItems = this._noTransition( function() {
+ return this._filter( items );
+ });
+ // layout and reveal just the new items
+ this.layoutItems( filteredItems, true );
+ this.reveal( filteredItems );
+ return items;
+ };
+
+ /**
+ * Filter, sort, and layout newly-appended item elements
+ * @param {Array or NodeList or Element} elems
+ */
+ Isotope.prototype.insert = function( elems ) {
+ var items = this.addItems( elems );
+ if ( !items.length ) {
+ return;
+ }
+ // append item elements
+ var i, item;
+ var len = items.length;
+ for ( i=0; i < len; i++ ) {
+ item = items[i];
+ this.element.appendChild( item.element );
+ }
+ // filter new stuff
+ /*
+ // this way adds hides new filtered items with NO transition
+ // so user can't see if new hidden items have been inserted
+ var filteredInsertItems;
+ this._noTransition( function() {
+ filteredInsertItems = this._filter( items );
+ // hide all new items
+ this.hide( filteredInsertItems );
+ });
+ // */
+ // this way hides new filtered items with transition
+ // so user at least sees that something has been added
+ var filteredInsertItems = this._filter( items );
+ // hide all newitems
+ this._noTransition( function() {
+ this.hide( filteredInsertItems );
+ });
+ // */
+ // set flag
+ for ( i=0; i < len; i++ ) {
+ items[i].isLayoutInstant = true;
+ }
+ this.arrange();
+ // reset flag
+ for ( i=0; i < len; i++ ) {
+ delete items[i].isLayoutInstant;
+ }
+ this.reveal( filteredInsertItems );
+ };
+
+ var _remove = Isotope.prototype.remove;
+ Isotope.prototype.remove = function( elems ) {
+ elems = makeArray( elems );
+ var removeItems = this.getItems( elems );
+ // do regular thing
+ _remove.call( this, elems );
+ // bail if no items to remove
+ if ( !removeItems || !removeItems.length ) {
+ return;
+ }
+ // remove elems from filteredItems
+ for ( var i=0, len = removeItems.length; i < len; i++ ) {
+ var item = removeItems[i];
+ // remove item from collection
+ removeFrom( item, this.filteredItems );
+ }
+ };
+
+ /**
+ * trigger fn without transition
+ * kind of hacky to have this in the first place
+ * @param {Function} fn
+ * @returns ret
+ * @private
+ */
+ Isotope.prototype._noTransition = function( fn ) {
+ // save transitionDuration before disabling
+ var transitionDuration = this.options.transitionDuration;
+ // disable transition
+ this.options.transitionDuration = 0;
+ // do it
+ var returnValue = fn.call( this );
+ // re-enable transition for reveal
+ this.options.transitionDuration = transitionDuration;
+ return returnValue;
+ };
+
+ // ----- ----- //
+
+ return Isotope;
+}
+
+// -------------------------- transport -------------------------- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'outlayer/outlayer',
+ 'get-size/get-size',
+ 'matches-selector/matches-selector',
+ 'isotope/js/item',
+ 'isotope/js/layout-mode',
+ // include default layout modes
+ 'isotope/js/layout-modes/masonry',
+ 'isotope/js/layout-modes/fit-rows',
+ 'isotope/js/layout-modes/vertical'
+ ],
+ isotopeDefinition );
+} else {
+ // browser global
+ window.Isotope = isotopeDefinition(
+ window.Outlayer,
+ window.getSize,
+ window.matchesSelector,
+ window.Isotope.Item,
+ window.Isotope.LayoutMode
+ );
+}
+
+})( window );
+
diff --git a/dist/isotope.pkgd.min.js b/dist/isotope.pkgd.min.js
new file mode 100644
index 0000000..c225f67
--- /dev/null
+++ b/dist/isotope.pkgd.min.js
@@ -0,0 +1,8 @@
+/*!
+ * Isotope PACKAGED v2.0.0
+ * Filter & sort magical layouts
+ * http://isotope.metafizzy.co
+ */
+
+(function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==n.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var o=0,s=r.length;s>o;o++){var a=r[o];a()}}}function o(o){return o.bind(n,"DOMContentLoaded",i),o.bind(n,"readystatechange",i),o.bind(t,"load",i),e}var n=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],o)):t.docReady=o(t.eventie)}(this),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function o(t){function o(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var o=r(t);if("none"===o.display)return i();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var h=n.isBorderBox=!(!p||!o[p]||"border-box"!==o[p]),f=0,c=s.length;c>f;f++){var d=s[f],l=o[d];l=a(t,l);var y=parseFloat(l);n[d]=isNaN(y)?0:y}var m=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,_=n.marginTop+n.marginBottom,I=n.borderLeftWidth+n.borderRightWidth,L=n.borderTopWidth+n.borderBottomWidth,z=h&&u,S=e(o.width);S!==!1&&(n.width=S+(z?0:m+I));var b=e(o.height);return b!==!1&&(n.height=b+(z?0:g+L)),n.innerWidth=n.width-(m+I),n.innerHeight=n.height-(g+L),n.outerWidth=n.width+v,n.outerHeight=n.height+_,n}}function a(t,e){if(n||-1===e.indexOf("%"))return e;var i=t.style,o=i.left,r=t.runtimeStyle,s=r&&r.left;return s&&(r.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=o,s&&(r.left=s),e}var u,p=t("boxSizing");return function(){if(p){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[p]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var o=r(t);u=200===e(o.width),i.removeChild(t)}}(),o}var n=t.getComputedStyle,r=n?function(t){return n(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(t,e){function i(t,e){return t[a](e)}function o(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function n(t,e){o(t);for(var i=t.parentNode.querySelectorAll(e),n=0,r=i.length;r>n;n++)if(i[n]===t)return!0;return!1}function r(t,e){return o(t),i(t,e)}var s,a=function(){if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0,o=t.length;o>i;i++){var n=t[i],r=n+"MatchesSelector";if(e[r])return r}}();if(a){var u=document.createElement("div"),p=i(u,"div");s=p?i:r}else s=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),p=r("transform"),h=u&&p,f=!!r("perspective"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],d=["transform","transition","transitionDuration","transitionProperty"],l=function(){for(var t={},e=0,i=d.length;i>e;e++){var o=d[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=l[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var y=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=h?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var m=p&&o(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(c,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(c,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=d(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,d,l,y){function m(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!c(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return m.namespace="outlayer",m.Item=y,m.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(m.prototype,f.prototype),m.prototype.option=function(t){e(this.options,t)},m.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},m.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},m.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},m.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(c(s))if(e){l(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,p=a.length;p>u;u++)i.push(a[u])}else i.push(s)}return i},m.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},m.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},m.prototype._init=m.prototype.layout,m.prototype._resetLayout=function(){this.getSize()},m.prototype.getSize=function(){this.size=d(this.element)},m.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):c(o)&&(i=o),this[t]=i?d(i)[e]:o):this[t]=0},m.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},m.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},m.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},m.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},m.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},m.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},m.prototype._postLayout=function(){this.resizeContainer()},m.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},m.prototype._getContainerSize=h,m.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},m.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var p=t[a];p.on(e,o)}},m.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},m.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},m.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},m.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},m.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},m.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},m.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},m.prototype._manageStamp=h,m.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=d(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},m.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},m.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},m.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},m.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},m.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},m.prototype.needsResizeLayout=function(){var t=d(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},m.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},m.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},m.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},m.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},m.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},m.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},m.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},m.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},m.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize(),delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},m.create=function(t,i){function o(){m.apply(this,arguments)}return Object.create?o.prototype=Object.create(m.prototype):e(o.prototype,m.prototype),o.prototype.constructor=o,o.defaults=e({},m.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=m.data,o.Item=function(){y.apply(this,arguments)},o.Item.prototype=new y,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,h=i.length;h>s;s++){var f,c=i[s],d=c.getAttribute(n);try{f=d&&JSON.parse(d)}catch(l){u&&u.error("Error parsing "+n+" on "+c.nodeName.toLowerCase()+(c.id?"#"+c.id:"")+": "+l);continue}var y=new o(c,f);p&&p.data(c,t,y)}}),p&&p.bridget&&p.bridget(t,o),o},m.Item=y,m}var a=t.document,u=t.console,p=t.jQuery,h=function(){},f=Object.prototype.toString,c="object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},d=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t){function e(){t.Item.apply(this,arguments)}return e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}},e}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){function e(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],i):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0},e.prototype._getItemLayoutPosition=function(t){t.getSize(),0!==this.x&&t.size.outerWidth+this.x>this.isotope.size.innerWidth&&(this.x=0,this.y=this.maxY);var e={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=t.size.outerWidth,e},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===h.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=f(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,h){function f(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var c=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});c.Item=u,c.LayoutMode=h,c.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in h.modes)this._initLayoutMode(e)},c.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},c.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e},c.prototype._initLayoutMode=function(t){var i=h.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},c.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},c.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},c.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},c.prototype._init=c.prototype.arrange,c.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},c.prototype._filter=function(t){function e(){f.reveal(n),f.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var p=t[a];if(!p.isIgnored){var h=s(p);h&&o.push(p),h&&p.isHidden?n.push(p):h||p.isHidden||r.push(p)}}var f=this;return this._isInstant?this._noTransition(e):e(),o},c.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},c.prototype.updateSortData=function(t){this._getSorters(),t=o(t);var e=this.getItems(t);e=e.length?e:this.items,this._updateItemsSortData(e)
+},c.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=d(i)}},c.prototype._updateItemsSortData=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];o.updateSortData()}};var d=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=c.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&p(i)}}return t}();c.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},c.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=f(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},c.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},c.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},c.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},c.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},c.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},c.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},c.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},c.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},c.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},c.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var l=c.prototype.remove;return c.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(l.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},c.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},c}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,p=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},h=Object.prototype.toString,f=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],r):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window);
\ No newline at end of file
diff --git a/examples/basic.html b/examples/basic.html
new file mode 100644
index 0000000..fb9f237
--- /dev/null
+++ b/examples/basic.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+ basic
+
+
+
+
+
+
+ basic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/bottom-up.html b/examples/bottom-up.html
new file mode 100644
index 0000000..6d80e72
--- /dev/null
+++ b/examples/bottom-up.html
@@ -0,0 +1,120 @@
+
+
+
+
+
+ bottom up
+
+
+
+
+
+
+
+
+ bottom up
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/cells-by-row.html b/examples/cells-by-row.html
new file mode 100644
index 0000000..4a24b84
--- /dev/null
+++ b/examples/cells-by-row.html
@@ -0,0 +1,220 @@
+
+
+
+
+
+ cellsByRow
+
+
+
+
+
+
+
+ cellsByRow
+
+
+
+
+
+
+
+
+
+
+
83
+
Bi
+
Bismuth
+
208.9804
+
+
+
+
+
+
+
+
+
+
81
+
Tl
+
Thallium
+
204.3833
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/examples.css b/examples/examples.css
new file mode 100644
index 0000000..dd5fe38
--- /dev/null
+++ b/examples/examples.css
@@ -0,0 +1,104 @@
+* {
+ box-sizing: border-box;
+}
+
+#container,
+.container {
+ background: #EEE;
+ width: 50%;
+ margin-bottom: 20px;
+}
+
+.item {
+ width: 60px;
+ height: 60px;
+ float: left;
+ border: 1px solid;
+ background: #09F;
+}
+
+.item.w2 { width: 120px; }
+.item.w3 { width: 180px; }
+
+.item.h2 { height: 100px; }
+.item.h3 { height: 160px; }
+.item.h4 { height: 220px; }
+.item.h5 { height: 280px; }
+
+.stamp {
+ background: red;
+ opacity: 0.75;
+ position: absolute;
+ border: 1px solid;
+}
+
+
+/* element */
+
+.element {
+ width: 80px;
+ height: 90px;
+ margin: 5px;
+ background: #DDD;
+ float: left;
+ position: relative;
+ padding: 5px;
+}
+
+.element > * {
+ margin: 0;
+}
+
+.element .number {
+ right: 5px;
+ top: 5px;
+ position: absolute;
+}
+
+.element .symbol {
+ font-size: 30px;
+ left: 5px;
+ top: 5px;
+ color: white;
+}
+
+.element .name {
+ font-size: 14px;
+}
+
+.element .weight {
+ font-size: 14px;
+}
+
+.element.alkali { background: #F00; background: hsl( 0, 100%, 50%); }
+.element.alkaline-earth { background: #F80; background: hsl( 36, 100%, 50%); }
+.element.lanthanoid { background: #FF0; background: hsl( 72, 100%, 50%); }
+.element.actinoid { background: #0F0; background: hsl( 108, 100%, 50%); }
+.element.transition { background: #0F8; background: hsl( 144, 100%, 50%); }
+.element.post-transition { background: #0FF; background: hsl( 180, 100%, 50%); }
+.element.metalloid { background: #08F; background: hsl( 216, 100%, 50%); }
+.element.other.nonmetal { background: #00F; background: hsl( 252, 100%, 50%); }
+.element.halogen { background: #F0F; background: hsl( 288, 100%, 50%); }
+.element.noble-gas { background: #F08; background: hsl( 324, 100%, 50%); }
+
+/* stamps */
+
+.stamp {
+ position: absolute;
+ background: hsla(0, 100%, 50%, 0.8);
+ border: 1px solid;
+}
+
+.stamp1 {
+ left: 10%;
+ top: 20px;
+ width: 20%;
+ height: 200px;
+}
+
+.stamp2 {
+ right: 200px;
+ top: 100px;
+ width: 100px;
+ height: 100px;
+}
diff --git a/examples/filter-sort.html b/examples/filter-sort.html
new file mode 100644
index 0000000..f02e04f
--- /dev/null
+++ b/examples/filter-sort.html
@@ -0,0 +1,218 @@
+
+
+
+
+
+ filter sort
+
+
+
+
+
+
+ filter sort
+
+
+
Filter
+
+ show all
+ metal
+ post-transition
+ number > 50
+
+
Sort
+
+ original-order
+ number
+ name
+ symbol
+ weight
+ category
+
+
+
+
+
+
+
+
+
+
+
83
+
Bi
+
Bismuth
+
208.9804
+
+
+
+
+
+
+
+
+
+
81
+
Tl
+
Thallium
+
204.3833
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/horizontal-layout-modes.html b/examples/horizontal-layout-modes.html
new file mode 100644
index 0000000..0143687
--- /dev/null
+++ b/examples/horizontal-layout-modes.html
@@ -0,0 +1,217 @@
+
+
+
+
+
+ horizontal layout modes
+
+
+
+
+
+
+ horizontal layout modes
+
+
+
Filter
+
+ show all
+ metal
+ post-transition
+
+
Sort
+
+ original-order
+ number
+ name
+ symbol
+ weight
+ category
+
+
+
+
+
+
+
+
+
+
+
83
+
Bi
+
Bismuth
+
208.9804
+
+
+
+
+
+
+
+
+
+
81
+
Tl
+
Thallium
+
204.3833
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/insert.html b/examples/insert.html
new file mode 100644
index 0000000..39f3c50
--- /dev/null
+++ b/examples/insert.html
@@ -0,0 +1,104 @@
+
+
+
+
+
+ insert
+
+
+
+
+
+
+insert
+
+Insert Append
+
+
+
49
+
35
+
60
+
29
+
78
+
92
+
10
+
55
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/js/require-js.js b/examples/js/require-js.js
new file mode 100644
index 0000000..ac6eb9e
--- /dev/null
+++ b/examples/js/require-js.js
@@ -0,0 +1,85 @@
+/*global requirejs: false*/
+
+// -------------------------- bower -------------------------- //
+
+/*
+// with bower components
+requirejs.config({
+ baseUrl: '../bower_components'
+});
+
+requirejs( [ '../js/isotope' ], function( Isotope ) {
+ new Isotope( '#basic', {
+ masonry: {
+ columnWidth: 60
+ }
+ });
+});
+// */
+
+// -------------------------- pkgd -------------------------- //
+
+/*
+requirejs( [ '../dist/isotope.pkgd.js' ], function( Isotope ) {
+ new Isotope( '#basic', {
+ layoutMode: 'masonry',
+ masonry: {
+ columnWidth: 60
+ }
+ });
+});
+// */
+
+// -------------------------- bower & jQuery -------------------------- //
+
+/*
+requirejs.config({
+ baseUrl: '../bower_components',
+ paths: {
+ jquery: 'jquery/jquery'
+ }
+})
+
+requirejs( [
+ 'jquery',
+ 'isotope/js/isotope',
+ 'jquery-bridget/jquery.bridget'
+ ],
+ function( $, Isotope ) {
+ $.bridget( 'isotope', Isotope );
+ $('#basic').isotope({
+ masonry: {
+ columnWidth: 60
+ }
+ });
+});
+
+// */
+
+// -------------------------- pkgd & jQuery -------------------------- //
+
+// /*
+requirejs.config({
+ paths: {
+ jquery: '../../bower_components/jquery/jquery'
+ }
+});
+
+requirejs( [ 'require', 'jquery', '../dist/isotope.pkgd.js' ],
+ function( require, $, Isotope ) {
+ require( [
+ 'jquery-bridget/jquery.bridget'
+ ],
+ function() {
+ $.bridget( 'isotope', Isotope );
+ $('#basic').isotope({
+ masonry: {
+ columnWidth: 60
+ }
+ });
+ }
+ );
+});
+
+// */
+
diff --git a/examples/masonry-horizontal.html b/examples/masonry-horizontal.html
new file mode 100644
index 0000000..4fc0d0c
--- /dev/null
+++ b/examples/masonry-horizontal.html
@@ -0,0 +1,249 @@
+
+
+
+
+
+ horizontal layout modes
+
+
+
+
+
+
+ horizontal layout modes
+
+
+
Filter
+
+ show all
+ metal
+ post-transition
+
+
Sort
+
+ original-order
+ number
+ name
+ symbol
+ weight
+ category
+
+
+
+
+
+
+
+
+
+
+
+
+
+
83
+
Bi
+
Bismuth
+
208.9804
+
+
+
+
+
+
+
+
+
+
81
+
Tl
+
Thallium
+
204.3833
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/masonry.html b/examples/masonry.html
new file mode 100644
index 0000000..7d164cd
--- /dev/null
+++ b/examples/masonry.html
@@ -0,0 +1,211 @@
+
+
+
+
+
+ masonry
+
+
+
+
+
+
+
+ sorting
+
+
+
Sort
+ original-order
+ number
+ name
+ symbol
+ weight
+ category
+
+
+
+
+
+
+
+
+
+
+
+
+
83
+
Bi
+
Bismuth
+
208.9804
+
+
+
+
+
+
+
+
+
+
81
+
Tl
+
Thallium
+
204.3833
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/require-js.html b/examples/require-js.html
new file mode 100644
index 0000000..4617a7c
--- /dev/null
+++ b/examples/require-js.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+ require js
+
+
+
+
+
+
+
+ require js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/right-to-left.html b/examples/right-to-left.html
new file mode 100644
index 0000000..4978143
--- /dev/null
+++ b/examples/right-to-left.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+ right to left
+
+
+
+
+
+
+
+
+ right to left
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sorting.html b/examples/sorting.html
new file mode 100644
index 0000000..2700b62
--- /dev/null
+++ b/examples/sorting.html
@@ -0,0 +1,210 @@
+
+
+
+
+
+ sorting
+
+
+
+
+
+
+ sorting
+
+
+
+
+
+
+
+
+
+
+
83
+
Bi
+
Bismuth
+
208.9804
+
+
+
+
+
+
+
+
+
+
81
+
Tl
+
Thallium
+
204.3833
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/stamps.html b/examples/stamps.html
new file mode 100644
index 0000000..ee09cee
--- /dev/null
+++ b/examples/stamps.html
@@ -0,0 +1,132 @@
+
+
+
+
+
+ stamps
+
+
+
+
+
+
+
+
+
+ stamps
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/transition-bug.html b/examples/transition-bug.html
new file mode 100644
index 0000000..3935461
--- /dev/null
+++ b/examples/transition-bug.html
@@ -0,0 +1,86 @@
+
+
+
+
+
+ filter sort
+
+
+
+
+
+
+ filter sort
+
+
+ Bug me
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/index.html b/index.html
deleted file mode 100644
index 43dfdf4..0000000
--- a/index.html
+++ /dev/null
@@ -1,185 +0,0 @@
----
-title: Isotope
-layout: default
-category: homepage
-features:
- - name: An exquisite jQuery plugin for magical layouts
- symbol: Iso
- number: 1
- category: alkali
- - name: Dynamic, intelligent layouts
- symbol: Dyn
- number: 31
- category: actinoid
- - name: Re–order items with sorting
- symbol: Srt
- number: 27
- category: lanthanoid
- - name: Powerful methods, simple syntax
- symbol: Pow
- number: 61
- category: metalloid
- - name: Reveal & hide items with filtering
- symbol: Flt
- number: 11
- category: alkaline-earth
- - name: Captivating animations
- symbol: Ani
- number: 41
- category: transition
- - name: Progressively enhanced for CSS3 transforms & transitions
- symbol: Pro
- number: 71
- category: halogen
- - name: Sort items by just about anything
- symbol: Any
- number: 51
- category: post-transition
----
-
-
-
-
- {% for elem_number in site.random_order limit:30 %}
- {% assign element = site.elements[elem_number] %}
- {% include element-partial.html %}
- {% endfor %}
- {% for feature in page.features %}
-
-
{{ feature.number }}
-
{{ feature.symbol }}
-
{{ feature.name }}
-
- {% endfor %}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/jquery.isotope.js b/jquery.isotope.js
deleted file mode 100644
index 02e9bec..0000000
--- a/jquery.isotope.js
+++ /dev/null
@@ -1,1417 +0,0 @@
-define([
- 'jquery'
-], function(jQuery) {
-
-
-
- /**
- * Isotope v1.5.25
- * An exquisite jQuery plugin for magical layouts
- * http://isotope.metafizzy.co
- *
- * Commercial use requires one-time license fee
- * http://metafizzy.co/#licenses
- *
- * Copyright 2012 David DeSandro / Metafizzy
- */
-
- /*jshint asi: true, browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */
- /*global jQuery: false */
-
- (function( window, $, undefined ){
-
- 'use strict';
-
- // get global vars
- var document = window.document;
- var Modernizr = window.Modernizr;
-
- // helper function
- var capitalize = function( str ) {
- return str.charAt(0).toUpperCase() + str.slice(1);
- };
-
- // ========================= getStyleProperty by kangax ===============================
- // http://perfectionkills.com/feature-testing-css-properties/
-
- var prefixes = 'Moz Webkit O Ms'.split(' ');
-
- var getStyleProperty = function( propName ) {
- var style = document.documentElement.style,
- prefixed;
-
- // test standard property first
- if ( typeof style[propName] === 'string' ) {
- return propName;
- }
-
- // capitalize
- propName = capitalize( propName );
-
- // test vendor specific properties
- for ( var i=0, len = prefixes.length; i < len; i++ ) {
- prefixed = prefixes[i] + propName;
- if ( typeof style[ prefixed ] === 'string' ) {
- return prefixed;
- }
- }
- };
-
- var transformProp = getStyleProperty('transform'),
- transitionProp = getStyleProperty('transitionProperty');
-
-
- // ========================= miniModernizr ===============================
- // <3<3<3 and thanks to Faruk and Paul for doing the heavy lifting
-
- /*!
- * Modernizr v1.6ish: miniModernizr for Isotope
- * http://www.modernizr.com
- *
- * Developed by:
- * - Faruk Ates http://farukat.es/
- * - Paul Irish http://paulirish.com/
- *
- * Copyright (c) 2009-2010
- * Dual-licensed under the BSD or MIT licenses.
- * http://www.modernizr.com/license/
- */
-
- /*
- * This version whittles down the script just to check support for
- * CSS transitions, transforms, and 3D transforms.
- */
-
- var tests = {
- csstransforms: function() {
- return !!transformProp;
- },
-
- csstransforms3d: function() {
- var test = !!getStyleProperty('perspective');
- // double check for Chrome's false positive
- if ( test ) {
- var vendorCSSPrefixes = ' -o- -moz- -ms- -webkit- -khtml- '.split(' '),
- mediaQuery = '@media (' + vendorCSSPrefixes.join('transform-3d),(') + 'modernizr)',
- $style = $('')
- .appendTo('head'),
- $div = $('
').appendTo('html');
-
- test = $div.height() === 3;
-
- $div.remove();
- $style.remove();
- }
- return test;
- },
-
- csstransitions: function() {
- return !!transitionProp;
- }
- };
-
- var testName;
-
- if ( Modernizr ) {
- // if there's a previous Modernzir, check if there are necessary tests
- for ( testName in tests) {
- if ( !Modernizr.hasOwnProperty( testName ) ) {
- // if test hasn't been run, use addTest to run it
- Modernizr.addTest( testName, tests[ testName ] );
- }
- }
- } else {
- // or create new mini Modernizr that just has the 3 tests
- Modernizr = window.Modernizr = {
- _version : '1.6ish: miniModernizr for Isotope'
- };
-
- var classes = ' ';
- var result;
-
- // Run through tests
- for ( testName in tests) {
- result = tests[ testName ]();
- Modernizr[ testName ] = result;
- classes += ' ' + ( result ? '' : 'no-' ) + testName;
- }
-
- // Add the new classes to the element.
- $('html').addClass( classes );
- }
-
-
- // ========================= isoTransform ===============================
-
- /**
- * provides hooks for .css({ scale: value, translate: [x, y] })
- * Progressively enhanced CSS transforms
- * Uses hardware accelerated 3D transforms for Safari
- * or falls back to 2D transforms.
- */
-
- if ( Modernizr.csstransforms ) {
-
- // i.e. transformFnNotations.scale(0.5) >> 'scale3d( 0.5, 0.5, 1)'
- var transformFnNotations = Modernizr.csstransforms3d ?
- { // 3D transform functions
- translate : function ( position ) {
- return 'translate3d(' + position[0] + 'px, ' + position[1] + 'px, 0) ';
- },
- scale : function ( scale ) {
- return 'scale3d(' + scale + ', ' + scale + ', 1) ';
- }
- } :
- { // 2D transform functions
- translate : function ( position ) {
- return 'translate(' + position[0] + 'px, ' + position[1] + 'px) ';
- },
- scale : function ( scale ) {
- return 'scale(' + scale + ') ';
- }
- }
- ;
-
- var setIsoTransform = function ( elem, name, value ) {
- // unpack current transform data
- var data = $.data( elem, 'isoTransform' ) || {},
- newData = {},
- fnName,
- transformObj = {},
- transformValue;
-
- // i.e. newData.scale = 0.5
- newData[ name ] = value;
- // extend new value over current data
- $.extend( data, newData );
-
- for ( fnName in data ) {
- transformValue = data[ fnName ];
- transformObj[ fnName ] = transformFnNotations[ fnName ]( transformValue );
- }
-
- // get proper order
- // ideally, we could loop through this give an array, but since we only have
- // a couple transforms we're keeping track of, we'll do it like so
- var translateFn = transformObj.translate || '',
- scaleFn = transformObj.scale || '',
- // sorting so translate always comes first
- valueFns = translateFn + scaleFn;
-
- // set data back in elem
- $.data( elem, 'isoTransform', data );
-
- // set name to vendor specific property
- elem.style[ transformProp ] = valueFns;
- };
-
- // ==================== scale ===================
-
- $.cssNumber.scale = true;
-
- $.cssHooks.scale = {
- set: function( elem, value ) {
- // uncomment this bit if you want to properly parse strings
- // if ( typeof value === 'string' ) {
- // value = parseFloat( value );
- // }
- setIsoTransform( elem, 'scale', value );
- },
- get: function( elem, computed ) {
- var transform = $.data( elem, 'isoTransform' );
- return transform && transform.scale ? transform.scale : 1;
- }
- };
-
- $.fx.step.scale = function( fx ) {
- $.cssHooks.scale.set( fx.elem, fx.now+fx.unit );
- };
-
-
- // ==================== translate ===================
-
- $.cssNumber.translate = true;
-
- $.cssHooks.translate = {
- set: function( elem, value ) {
-
- // uncomment this bit if you want to properly parse strings
- // if ( typeof value === 'string' ) {
- // value = value.split(' ');
- // }
- //
- // var i, val;
- // for ( i = 0; i < 2; i++ ) {
- // val = value[i];
- // if ( typeof val === 'string' ) {
- // val = parseInt( val );
- // }
- // }
-
- setIsoTransform( elem, 'translate', value );
- },
-
- get: function( elem, computed ) {
- var transform = $.data( elem, 'isoTransform' );
- return transform && transform.translate ? transform.translate : [ 0, 0 ];
- }
- };
-
- }
-
- // ========================= get transition-end event ===============================
- var transitionEndEvent, transitionDurProp;
-
- if ( Modernizr.csstransitions ) {
- transitionEndEvent = {
- WebkitTransitionProperty: 'webkitTransitionEnd', // webkit
- MozTransitionProperty: 'transitionend',
- OTransitionProperty: 'oTransitionEnd otransitionend',
- transitionProperty: 'transitionend'
- }[ transitionProp ];
-
- transitionDurProp = getStyleProperty('transitionDuration');
- }
-
- // ========================= smartresize ===============================
-
- /*
- * smartresize: debounced resize event for jQuery
- *
- * latest version and complete README available on Github:
- * https://github.com/louisremi/jquery.smartresize.js
- *
- * Copyright 2011 @louis_remi
- * Licensed under the MIT license.
- */
-
- var $event = $.event,
- dispatchMethod = $.event.handle ? 'handle' : 'dispatch',
- resizeTimeout;
-
- $event.special.smartresize = {
- setup: function() {
- $(this).bind( "resize", $event.special.smartresize.handler );
- },
- teardown: function() {
- $(this).unbind( "resize", $event.special.smartresize.handler );
- },
- handler: function( event, execAsap ) {
- // Save the context
- var context = this,
- args = arguments;
-
- // set correct event type
- event.type = "smartresize";
-
- if ( resizeTimeout ) { clearTimeout( resizeTimeout ); }
- resizeTimeout = setTimeout(function() {
- $event[ dispatchMethod ].apply( context, args );
- }, execAsap === "execAsap"? 0 : 100 );
- }
- };
-
- $.fn.smartresize = function( fn ) {
- return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] );
- };
-
-
-
- // ========================= Isotope ===============================
-
-
- // our "Widget" object constructor
- $.Isotope = function( options, element, callback ){
- this.element = $( element );
-
- this._create( options );
- this._init( callback );
- };
-
- // styles of container element we want to keep track of
- var isoContainerStyles = [ 'width', 'height' ];
-
- var $window = $(window);
-
- $.Isotope.settings = {
- resizable: true,
- layoutMode : 'masonry',
- containerClass : 'isotope',
- itemClass : 'isotope-item',
- hiddenClass : 'isotope-hidden',
- hiddenStyle: { opacity: 0, scale: 0.001 },
- visibleStyle: { opacity: 1, scale: 1 },
- containerStyle: {
- position: 'relative',
- overflow: 'hidden'
- },
- animationEngine: 'best-available',
- animationOptions: {
- queue: false,
- duration: 800
- },
- sortBy : 'original-order',
- sortAscending : true,
- resizesContainer : true,
- transformsEnabled: true,
- itemPositionDataEnabled: false
- };
-
- $.Isotope.prototype = {
-
- // sets up widget
- _create : function( options ) {
-
- this.options = $.extend( {}, $.Isotope.settings, options );
-
- this.styleQueue = [];
- this.elemCount = 0;
-
- // get original styles in case we re-apply them in .destroy()
- var elemStyle = this.element[0].style;
- this.originalStyle = {};
- // keep track of container styles
- var containerStyles = isoContainerStyles.slice(0);
- for ( var prop in this.options.containerStyle ) {
- containerStyles.push( prop );
- }
- for ( var i=0, len = containerStyles.length; i < len; i++ ) {
- prop = containerStyles[i];
- this.originalStyle[ prop ] = elemStyle[ prop ] || '';
- }
- // apply container style from options
- this.element.css( this.options.containerStyle );
-
- this._updateAnimationEngine();
- this._updateUsingTransforms();
-
- // sorting
- var originalOrderSorter = {
- 'original-order' : function( $elem, instance ) {
- instance.elemCount ++;
- return instance.elemCount;
- },
- random : function() {
- return Math.random();
- }
- };
-
- this.options.getSortData = $.extend( this.options.getSortData, originalOrderSorter );
-
- // need to get atoms
- this.reloadItems();
-
- // get top left position of where the bricks should be
- this.offset = {
- left: parseInt( ( this.element.css('padding-left') || 0 ), 10 ),
- top: parseInt( ( this.element.css('padding-top') || 0 ), 10 )
- };
-
- // add isotope class first time around
- var instance = this;
- setTimeout( function() {
- instance.element.addClass( instance.options.containerClass );
- }, 0 );
-
- // bind resize method
- if ( this.options.resizable ) {
- $window.bind( 'smartresize.isotope', function() {
- instance.resize();
- });
- }
-
- // dismiss all click events from hidden events
- this.element.delegate( '.' + this.options.hiddenClass, 'click', function(){
- return false;
- });
-
- },
-
- _getAtoms : function( $elems ) {
- var selector = this.options.itemSelector,
- // filter & find
- $atoms = selector ? $elems.filter( selector ).add( $elems.find( selector ) ) : $elems,
- // base style for atoms
- atomStyle = { position: 'absolute' };
-
- // filter out text nodes
- $atoms = $atoms.filter( function( i, atom ) {
- return atom.nodeType === 1;
- });
-
- if ( this.usingTransforms ) {
- atomStyle.left = 0;
- atomStyle.top = 0;
- }
-
- $atoms.css( atomStyle ).addClass( this.options.itemClass );
-
- this.updateSortData( $atoms, true );
-
- return $atoms;
- },
-
- // _init fires when your instance is first created
- // (from the constructor above), and when you
- // attempt to initialize the widget again (by the bridge)
- // after it has already been initialized.
- _init : function( callback ) {
-
- this.$filteredAtoms = this._filter( this.$allAtoms );
- this._sort();
- this.reLayout( callback );
-
- },
-
- option : function( opts ){
- // change options AFTER initialization:
- // signature: $('#foo').bar({ cool:false });
- if ( $.isPlainObject( opts ) ){
- this.options = $.extend( true, this.options, opts );
-
- // trigger _updateOptionName if it exists
- var updateOptionFn;
- for ( var optionName in opts ) {
- updateOptionFn = '_update' + capitalize( optionName );
- if ( this[ updateOptionFn ] ) {
- this[ updateOptionFn ]();
- }
- }
- }
- },
-
- // ====================== updaters ====================== //
- // kind of like setters
-
- _updateAnimationEngine : function() {
- var animationEngine = this.options.animationEngine.toLowerCase().replace( /[ _\-]/g, '');
- var isUsingJQueryAnimation;
- // set applyStyleFnName
- switch ( animationEngine ) {
- case 'css' :
- case 'none' :
- isUsingJQueryAnimation = false;
- break;
- case 'jquery' :
- isUsingJQueryAnimation = true;
- break;
- default : // best available
- isUsingJQueryAnimation = !Modernizr.csstransitions;
- }
- this.isUsingJQueryAnimation = isUsingJQueryAnimation;
- this._updateUsingTransforms();
- },
-
- _updateTransformsEnabled : function() {
- this._updateUsingTransforms();
- },
-
- _updateUsingTransforms : function() {
- var usingTransforms = this.usingTransforms = this.options.transformsEnabled &&
- Modernizr.csstransforms && Modernizr.csstransitions && !this.isUsingJQueryAnimation;
-
- // prevent scales when transforms are disabled
- if ( !usingTransforms ) {
- delete this.options.hiddenStyle.scale;
- delete this.options.visibleStyle.scale;
- }
-
- this.getPositionStyles = usingTransforms ? this._translate : this._positionAbs;
- },
-
-
- // ====================== Filtering ======================
-
- _filter : function( $atoms ) {
- var filter = this.options.filter === '' ? '*' : this.options.filter;
-
- if ( !filter ) {
- return $atoms;
- }
-
- var hiddenClass = this.options.hiddenClass,
- hiddenSelector = '.' + hiddenClass,
- $hiddenAtoms = $atoms.filter( hiddenSelector ),
- $atomsToShow = $hiddenAtoms;
-
- if ( filter !== '*' ) {
- $atomsToShow = $hiddenAtoms.filter( filter );
- var $atomsToHide = $atoms.not( hiddenSelector ).not( filter ).addClass( hiddenClass );
- this.styleQueue.push({ $el: $atomsToHide, style: this.options.hiddenStyle });
- }
-
- this.styleQueue.push({ $el: $atomsToShow, style: this.options.visibleStyle });
- $atomsToShow.removeClass( hiddenClass );
-
- return $atoms.filter( filter );
- },
-
- // ====================== Sorting ======================
-
- updateSortData : function( $atoms, isIncrementingElemCount ) {
- var instance = this,
- getSortData = this.options.getSortData,
- $this, sortData;
- $atoms.each(function(){
- $this = $(this);
- sortData = {};
- // get value for sort data based on fn( $elem ) passed in
- for ( var key in getSortData ) {
- if ( !isIncrementingElemCount && key === 'original-order' ) {
- // keep original order original
- sortData[ key ] = $.data( this, 'isotope-sort-data' )[ key ];
- } else {
- sortData[ key ] = getSortData[ key ]( $this, instance );
- }
- }
- // apply sort data to element
- $.data( this, 'isotope-sort-data', sortData );
- });
- },
-
- // used on all the filtered atoms
- _sort : function() {
-
- var sortBy = this.options.sortBy,
- getSorter = this._getSorter,
- sortDir = this.options.sortAscending ? 1 : -1,
- sortFn = function( alpha, beta ) {
- var a = getSorter( alpha, sortBy ),
- b = getSorter( beta, sortBy );
- // fall back to original order if data matches
- if ( a === b && sortBy !== 'original-order') {
- a = getSorter( alpha, 'original-order' );
- b = getSorter( beta, 'original-order' );
- }
- return ( ( a > b ) ? 1 : ( a < b ) ? -1 : 0 ) * sortDir;
- };
-
- this.$filteredAtoms.sort( sortFn );
- },
-
- _getSorter : function( elem, sortBy ) {
- return $.data( elem, 'isotope-sort-data' )[ sortBy ];
- },
-
- // ====================== Layout Helpers ======================
-
- _translate : function( x, y ) {
- return { translate : [ x, y ] };
- },
-
- _positionAbs : function( x, y ) {
- return { left: x, top: y };
- },
-
- _pushPosition : function( $elem, x, y ) {
- x = Math.round( x + this.offset.left );
- y = Math.round( y + this.offset.top );
- var position = this.getPositionStyles( x, y );
- this.styleQueue.push({ $el: $elem, style: position });
- if ( this.options.itemPositionDataEnabled ) {
- $elem.data('isotope-item-position', {x: x, y: y} );
- }
- },
-
-
- // ====================== General Layout ======================
-
- // used on collection of atoms (should be filtered, and sorted before )
- // accepts atoms-to-be-laid-out to start with
- layout : function( $elems, callback ) {
-
- var layoutMode = this.options.layoutMode;
-
- // layout logic
- this[ '_' + layoutMode + 'Layout' ]( $elems );
-
- // set the size of the container
- if ( this.options.resizesContainer ) {
- var containerStyle = this[ '_' + layoutMode + 'GetContainerSize' ]();
- this.styleQueue.push({ $el: this.element, style: containerStyle });
- }
-
- this._processStyleQueue( $elems, callback );
-
- this.isLaidOut = true;
- },
-
- _processStyleQueue : function( $elems, callback ) {
- // are we animating the layout arrangement?
- // use plugin-ish syntax for css or animate
- var styleFn = !this.isLaidOut ? 'css' : (
- this.isUsingJQueryAnimation ? 'animate' : 'css'
- ),
- animOpts = this.options.animationOptions,
- onLayout = this.options.onLayout,
- objStyleFn, processor,
- triggerCallbackNow, callbackFn;
-
- // default styleQueue processor, may be overwritten down below
- processor = function( i, obj ) {
- obj.$el[ styleFn ]( obj.style, animOpts );
- };
-
- if ( this._isInserting && this.isUsingJQueryAnimation ) {
- // if using styleQueue to insert items
- processor = function( i, obj ) {
- // only animate if it not being inserted
- objStyleFn = obj.$el.hasClass('no-transition') ? 'css' : styleFn;
- obj.$el[ objStyleFn ]( obj.style, animOpts );
- };
-
- } else if ( callback || onLayout || animOpts.complete ) {
- // has callback
- var isCallbackTriggered = false,
- // array of possible callbacks to trigger
- callbacks = [ callback, onLayout, animOpts.complete ],
- instance = this;
- triggerCallbackNow = true;
- // trigger callback only once
- callbackFn = function() {
- if ( isCallbackTriggered ) {
- return;
- }
- var hollaback;
- for (var i=0, len = callbacks.length; i < len; i++) {
- hollaback = callbacks[i];
- if ( typeof hollaback === 'function' ) {
- hollaback.call( instance.element, $elems, instance );
- }
- }
- isCallbackTriggered = true;
- };
-
- if ( this.isUsingJQueryAnimation && styleFn === 'animate' ) {
- // add callback to animation options
- animOpts.complete = callbackFn;
- triggerCallbackNow = false;
-
- } else if ( Modernizr.csstransitions ) {
- // detect if first item has transition
- var i = 0,
- firstItem = this.styleQueue[0],
- testElem = firstItem && firstItem.$el,
- styleObj;
- // get first non-empty jQ object
- while ( !testElem || !testElem.length ) {
- styleObj = this.styleQueue[ i++ ];
- // HACK: sometimes styleQueue[i] is undefined
- if ( !styleObj ) {
- return;
- }
- testElem = styleObj.$el;
- }
- // get transition duration of the first element in that object
- // yeah, this is inexact
- var duration = parseFloat( getComputedStyle( testElem[0] )[ transitionDurProp ] );
- if ( duration > 0 ) {
- processor = function( i, obj ) {
- obj.$el[ styleFn ]( obj.style, animOpts )
- // trigger callback at transition end
- .one( transitionEndEvent, callbackFn );
- };
- triggerCallbackNow = false;
- }
- }
- }
-
- // process styleQueue
- $.each( this.styleQueue, processor );
-
- if ( triggerCallbackNow ) {
- callbackFn();
- }
-
- // clear out queue for next time
- this.styleQueue = [];
- },
-
-
- resize : function() {
- if ( this[ '_' + this.options.layoutMode + 'ResizeChanged' ]() ) {
- this.reLayout();
- }
- },
-
-
- reLayout : function( callback ) {
-
- this[ '_' + this.options.layoutMode + 'Reset' ]();
- this.layout( this.$filteredAtoms, callback );
-
- },
-
- // ====================== Convenience methods ======================
-
- // ====================== Adding items ======================
-
- // adds a jQuery object of items to a isotope container
- addItems : function( $content, callback ) {
- var $newAtoms = this._getAtoms( $content );
- // add new atoms to atoms pools
- this.$allAtoms = this.$allAtoms.add( $newAtoms );
-
- if ( callback ) {
- callback( $newAtoms );
- }
- },
-
- // convienence method for adding elements properly to any layout
- // positions items, hides them, then animates them back in <--- very sezzy
- insert : function( $content, callback ) {
- // position items
- this.element.append( $content );
-
- var instance = this;
- this.addItems( $content, function( $newAtoms ) {
- var $newFilteredAtoms = instance._filter( $newAtoms );
- instance._addHideAppended( $newFilteredAtoms );
- instance._sort();
- instance.reLayout();
- instance._revealAppended( $newFilteredAtoms, callback );
- });
-
- },
-
- // convienence method for working with Infinite Scroll
- appended : function( $content, callback ) {
- var instance = this;
- this.addItems( $content, function( $newAtoms ) {
- instance._addHideAppended( $newAtoms );
- instance.layout( $newAtoms );
- instance._revealAppended( $newAtoms, callback );
- });
- },
-
- // adds new atoms, then hides them before positioning
- _addHideAppended : function( $newAtoms ) {
- this.$filteredAtoms = this.$filteredAtoms.add( $newAtoms );
- $newAtoms.addClass('no-transition');
-
- this._isInserting = true;
-
- // apply hidden styles
- this.styleQueue.push({ $el: $newAtoms, style: this.options.hiddenStyle });
- },
-
- // sets visible style on new atoms
- _revealAppended : function( $newAtoms, callback ) {
- var instance = this;
- // apply visible style after a sec
- setTimeout( function() {
- // enable animation
- $newAtoms.removeClass('no-transition');
- // reveal newly inserted filtered elements
- instance.styleQueue.push({ $el: $newAtoms, style: instance.options.visibleStyle });
- instance._isInserting = false;
- instance._processStyleQueue( $newAtoms, callback );
- }, 10 );
- },
-
- // gathers all atoms
- reloadItems : function() {
- this.$allAtoms = this._getAtoms( this.element.children() );
- },
-
- // removes elements from Isotope widget
- remove: function( $content, callback ) {
- // remove elements immediately from Isotope instance
- this.$allAtoms = this.$allAtoms.not( $content );
- this.$filteredAtoms = this.$filteredAtoms.not( $content );
- // remove() as a callback, for after transition / animation
- var instance = this;
- var removeContent = function() {
- $content.remove();
- if ( callback ) {
- callback.call( instance.element );
- }
- };
-
- if ( $content.filter( ':not(.' + this.options.hiddenClass + ')' ).length ) {
- // if any non-hidden content needs to be removed
- this.styleQueue.push({ $el: $content, style: this.options.hiddenStyle });
- this._sort();
- this.reLayout( removeContent );
- } else {
- // remove it now
- removeContent();
- }
-
- },
-
- shuffle : function( callback ) {
- this.updateSortData( this.$allAtoms );
- this.options.sortBy = 'random';
- this._sort();
- this.reLayout( callback );
- },
-
- // destroys widget, returns elements and container back (close) to original style
- destroy : function() {
-
- var usingTransforms = this.usingTransforms;
- var options = this.options;
-
- this.$allAtoms
- .removeClass( options.hiddenClass + ' ' + options.itemClass )
- .each(function(){
- var style = this.style;
- style.position = '';
- style.top = '';
- style.left = '';
- style.opacity = '';
- if ( usingTransforms ) {
- style[ transformProp ] = '';
- }
- });
-
- // re-apply saved container styles
- var elemStyle = this.element[0].style;
- for ( var prop in this.originalStyle ) {
- elemStyle[ prop ] = this.originalStyle[ prop ];
- }
-
- this.element
- .unbind('.isotope')
- .undelegate( '.' + options.hiddenClass, 'click' )
- .removeClass( options.containerClass )
- .removeData('isotope');
-
- $window.unbind('.isotope');
-
- },
-
-
- // ====================== LAYOUTS ======================
-
- // calculates number of rows or columns
- // requires columnWidth or rowHeight to be set on namespaced object
- // i.e. this.masonry.columnWidth = 200
- _getSegments : function( isRows ) {
- var namespace = this.options.layoutMode,
- measure = isRows ? 'rowHeight' : 'columnWidth',
- size = isRows ? 'height' : 'width',
- segmentsName = isRows ? 'rows' : 'cols',
- containerSize = this.element[ size ](),
- segments,
- // i.e. options.masonry && options.masonry.columnWidth
- segmentSize = this.options[ namespace ] && this.options[ namespace ][ measure ] ||
- // or use the size of the first item, i.e. outerWidth
- this.$filteredAtoms[ 'outer' + capitalize(size) ](true) ||
- // if there's no items, use size of container
- containerSize;
-
- segments = Math.floor( containerSize / segmentSize );
- segments = Math.max( segments, 1 );
-
- // i.e. this.masonry.cols = ....
- this[ namespace ][ segmentsName ] = segments;
- // i.e. this.masonry.columnWidth = ...
- this[ namespace ][ measure ] = segmentSize;
-
- },
-
- _checkIfSegmentsChanged : function( isRows ) {
- var namespace = this.options.layoutMode,
- segmentsName = isRows ? 'rows' : 'cols',
- prevSegments = this[ namespace ][ segmentsName ];
- // update cols/rows
- this._getSegments( isRows );
- // return if updated cols/rows is not equal to previous
- return ( this[ namespace ][ segmentsName ] !== prevSegments );
- },
-
- // ====================== Masonry ======================
-
- _masonryReset : function() {
- // layout-specific props
- this.masonry = {};
- // FIXME shouldn't have to call this again
- this._getSegments();
- var i = this.masonry.cols;
- this.masonry.colYs = [];
- while (i--) {
- this.masonry.colYs.push( 0 );
- }
- },
-
- _masonryLayout : function( $elems ) {
- var instance = this,
- props = instance.masonry;
- $elems.each(function(){
- var $this = $(this),
- //how many columns does this brick span
- colSpan = Math.ceil( $this.outerWidth(true) / props.columnWidth );
- colSpan = Math.min( colSpan, props.cols );
-
- if ( colSpan === 1 ) {
- // if brick spans only one column, just like singleMode
- instance._masonryPlaceBrick( $this, props.colYs );
- } else {
- // brick spans more than one column
- // how many different places could this brick fit horizontally
- var groupCount = props.cols + 1 - colSpan,
- groupY = [],
- groupColY,
- i;
-
- // for each group potential horizontal position
- for ( i=0; i < groupCount; i++ ) {
- // make an array of colY values for that one group
- groupColY = props.colYs.slice( i, i+colSpan );
- // and get the max value of the array
- groupY[i] = Math.max.apply( Math, groupColY );
- }
-
- instance._masonryPlaceBrick( $this, groupY );
- }
- });
- },
-
- // worker method that places brick in the columnSet
- // with the the minY
- _masonryPlaceBrick : function( $brick, setY ) {
- // get the minimum Y value from the columns
- var minimumY = Math.min.apply( Math, setY ),
- shortCol = 0;
-
- // Find index of short column, the first from the left
- for (var i=0, len = setY.length; i < len; i++) {
- if ( setY[i] === minimumY ) {
- shortCol = i;
- break;
- }
- }
-
- // position the brick
- var x = this.masonry.columnWidth * shortCol,
- y = minimumY;
- this._pushPosition( $brick, x, y );
-
- // apply setHeight to necessary columns
- var setHeight = minimumY + $brick.outerHeight(true),
- setSpan = this.masonry.cols + 1 - len;
- for ( i=0; i < setSpan; i++ ) {
- this.masonry.colYs[ shortCol + i ] = setHeight;
- }
-
- },
-
- _masonryGetContainerSize : function() {
- var containerHeight = Math.max.apply( Math, this.masonry.colYs );
- return { height: containerHeight };
- },
-
- _masonryResizeChanged : function() {
- return this._checkIfSegmentsChanged();
- },
-
- // ====================== fitRows ======================
-
- _fitRowsReset : function() {
- this.fitRows = {
- x : 0,
- y : 0,
- height : 0
- };
- },
-
- _fitRowsLayout : function( $elems ) {
- var instance = this,
- containerWidth = this.element.width(),
- props = this.fitRows;
-
- $elems.each( function() {
- var $this = $(this),
- atomW = $this.outerWidth(true),
- atomH = $this.outerHeight(true);
-
- if ( props.x !== 0 && atomW + props.x > containerWidth ) {
- // if this element cannot fit in the current row
- props.x = 0;
- props.y = props.height;
- }
-
- // position the atom
- instance._pushPosition( $this, props.x, props.y );
-
- props.height = Math.max( props.y + atomH, props.height );
- props.x += atomW;
-
- });
- },
-
- _fitRowsGetContainerSize : function () {
- return { height : this.fitRows.height };
- },
-
- _fitRowsResizeChanged : function() {
- return true;
- },
-
-
- // ====================== cellsByRow ======================
-
- _cellsByRowReset : function() {
- this.cellsByRow = {
- index : 0
- };
- // get this.cellsByRow.columnWidth
- this._getSegments();
- // get this.cellsByRow.rowHeight
- this._getSegments(true);
- },
-
- _cellsByRowLayout : function( $elems ) {
- var instance = this,
- props = this.cellsByRow;
- $elems.each( function(){
- var $this = $(this),
- col = props.index % props.cols,
- row = Math.floor( props.index / props.cols ),
- x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
- y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
- instance._pushPosition( $this, x, y );
- props.index ++;
- });
- },
-
- _cellsByRowGetContainerSize : function() {
- return { height : Math.ceil( this.$filteredAtoms.length / this.cellsByRow.cols ) * this.cellsByRow.rowHeight + this.offset.top };
- },
-
- _cellsByRowResizeChanged : function() {
- return this._checkIfSegmentsChanged();
- },
-
-
- // ====================== straightDown ======================
-
- _straightDownReset : function() {
- this.straightDown = {
- y : 0
- };
- },
-
- _straightDownLayout : function( $elems ) {
- var instance = this;
- $elems.each( function( i ){
- var $this = $(this);
- instance._pushPosition( $this, 0, instance.straightDown.y );
- instance.straightDown.y += $this.outerHeight(true);
- });
- },
-
- _straightDownGetContainerSize : function() {
- return { height : this.straightDown.y };
- },
-
- _straightDownResizeChanged : function() {
- return true;
- },
-
-
- // ====================== masonryHorizontal ======================
-
- _masonryHorizontalReset : function() {
- // layout-specific props
- this.masonryHorizontal = {};
- // FIXME shouldn't have to call this again
- this._getSegments( true );
- var i = this.masonryHorizontal.rows;
- this.masonryHorizontal.rowXs = [];
- while (i--) {
- this.masonryHorizontal.rowXs.push( 0 );
- }
- },
-
- _masonryHorizontalLayout : function( $elems ) {
- var instance = this,
- props = instance.masonryHorizontal;
- $elems.each(function(){
- var $this = $(this),
- //how many rows does this brick span
- rowSpan = Math.ceil( $this.outerHeight(true) / props.rowHeight );
- rowSpan = Math.min( rowSpan, props.rows );
-
- if ( rowSpan === 1 ) {
- // if brick spans only one column, just like singleMode
- instance._masonryHorizontalPlaceBrick( $this, props.rowXs );
- } else {
- // brick spans more than one row
- // how many different places could this brick fit horizontally
- var groupCount = props.rows + 1 - rowSpan,
- groupX = [],
- groupRowX, i;
-
- // for each group potential horizontal position
- for ( i=0; i < groupCount; i++ ) {
- // make an array of colY values for that one group
- groupRowX = props.rowXs.slice( i, i+rowSpan );
- // and get the max value of the array
- groupX[i] = Math.max.apply( Math, groupRowX );
- }
-
- instance._masonryHorizontalPlaceBrick( $this, groupX );
- }
- });
- },
-
- _masonryHorizontalPlaceBrick : function( $brick, setX ) {
- // get the minimum Y value from the columns
- var minimumX = Math.min.apply( Math, setX ),
- smallRow = 0;
- // Find index of smallest row, the first from the top
- for (var i=0, len = setX.length; i < len; i++) {
- if ( setX[i] === minimumX ) {
- smallRow = i;
- break;
- }
- }
-
- // position the brick
- var x = minimumX,
- y = this.masonryHorizontal.rowHeight * smallRow;
- this._pushPosition( $brick, x, y );
-
- // apply setHeight to necessary columns
- var setWidth = minimumX + $brick.outerWidth(true),
- setSpan = this.masonryHorizontal.rows + 1 - len;
- for ( i=0; i < setSpan; i++ ) {
- this.masonryHorizontal.rowXs[ smallRow + i ] = setWidth;
- }
- },
-
- _masonryHorizontalGetContainerSize : function() {
- var containerWidth = Math.max.apply( Math, this.masonryHorizontal.rowXs );
- return { width: containerWidth };
- },
-
- _masonryHorizontalResizeChanged : function() {
- return this._checkIfSegmentsChanged(true);
- },
-
-
- // ====================== fitColumns ======================
-
- _fitColumnsReset : function() {
- this.fitColumns = {
- x : 0,
- y : 0,
- width : 0
- };
- },
-
- _fitColumnsLayout : function( $elems ) {
- var instance = this,
- containerHeight = this.element.height(),
- props = this.fitColumns;
- $elems.each( function() {
- var $this = $(this),
- atomW = $this.outerWidth(true),
- atomH = $this.outerHeight(true);
-
- if ( props.y !== 0 && atomH + props.y > containerHeight ) {
- // if this element cannot fit in the current column
- props.x = props.width;
- props.y = 0;
- }
-
- // position the atom
- instance._pushPosition( $this, props.x, props.y );
-
- props.width = Math.max( props.x + atomW, props.width );
- props.y += atomH;
-
- });
- },
-
- _fitColumnsGetContainerSize : function () {
- return { width : this.fitColumns.width };
- },
-
- _fitColumnsResizeChanged : function() {
- return true;
- },
-
-
-
- // ====================== cellsByColumn ======================
-
- _cellsByColumnReset : function() {
- this.cellsByColumn = {
- index : 0
- };
- // get this.cellsByColumn.columnWidth
- this._getSegments();
- // get this.cellsByColumn.rowHeight
- this._getSegments(true);
- },
-
- _cellsByColumnLayout : function( $elems ) {
- var instance = this,
- props = this.cellsByColumn;
- $elems.each( function(){
- var $this = $(this),
- col = Math.floor( props.index / props.rows ),
- row = props.index % props.rows,
- x = ( col + 0.5 ) * props.columnWidth - $this.outerWidth(true) / 2,
- y = ( row + 0.5 ) * props.rowHeight - $this.outerHeight(true) / 2;
- instance._pushPosition( $this, x, y );
- props.index ++;
- });
- },
-
- _cellsByColumnGetContainerSize : function() {
- return { width : Math.ceil( this.$filteredAtoms.length / this.cellsByColumn.rows ) * this.cellsByColumn.columnWidth };
- },
-
- _cellsByColumnResizeChanged : function() {
- return this._checkIfSegmentsChanged(true);
- },
-
- // ====================== straightAcross ======================
-
- _straightAcrossReset : function() {
- this.straightAcross = {
- x : 0
- };
- },
-
- _straightAcrossLayout : function( $elems ) {
- var instance = this;
- $elems.each( function( i ){
- var $this = $(this);
- instance._pushPosition( $this, instance.straightAcross.x, 0 );
- instance.straightAcross.x += $this.outerWidth(true);
- });
- },
-
- _straightAcrossGetContainerSize : function() {
- return { width : this.straightAcross.x };
- },
-
- _straightAcrossResizeChanged : function() {
- return true;
- }
-
- };
-
-
- // ======================= imagesLoaded Plugin ===============================
- /*!
- * jQuery imagesLoaded plugin v1.1.0
- * http://github.com/desandro/imagesloaded
- *
- * MIT License. by Paul Irish et al.
- */
-
-
- // $('#my-container').imagesLoaded(myFunction)
- // or
- // $('img').imagesLoaded(myFunction)
-
- // execute a callback when all images have loaded.
- // needed because .load() doesn't work on cached images
-
- // callback function gets image collection as argument
- // `this` is the container
-
- $.fn.imagesLoaded = function( callback ) {
- var $this = this,
- $images = $this.find('img').add( $this.filter('img') ),
- len = $images.length,
- blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==',
- loaded = [];
-
- function triggerCallback() {
- callback.call( $this, $images );
- }
-
- function imgLoaded( event ) {
- var img = event.target;
- if ( img.src !== blank && $.inArray( img, loaded ) === -1 ){
- loaded.push( img );
- if ( --len <= 0 ){
- setTimeout( triggerCallback );
- $images.unbind( '.imagesLoaded', imgLoaded );
- }
- }
- }
-
- // if no images, trigger immediately
- if ( !len ) {
- triggerCallback();
- }
-
- $images.bind( 'load.imagesLoaded error.imagesLoaded', imgLoaded ).each( function() {
- // cached images don't fire load sometimes, so we reset src.
- var src = this.src;
- // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
- // data uri bypasses webkit log warning (thx doug jones)
- this.src = blank;
- this.src = src;
- });
-
- return $this;
- };
-
-
- // helper function for logging errors
- // $.error breaks jQuery chaining
- var logError = function( message ) {
- if ( window.console ) {
- window.console.error( message );
- }
- };
-
- // ======================= Plugin bridge ===============================
- // leverages data method to either create or return $.Isotope constructor
- // A bit from jQuery UI
- // https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js
- // A bit from jcarousel
- // https://github.com/jsor/jcarousel/blob/master/lib/jquery.jcarousel.js
-
- $.fn.isotope = function( options, callback ) {
- if ( typeof options === 'string' ) {
- // call method
- var args = Array.prototype.slice.call( arguments, 1 );
-
- this.each(function(){
- var instance = $.data( this, 'isotope' );
- if ( !instance ) {
- logError( "cannot call methods on isotope prior to initialization; " +
- "attempted to call method '" + options + "'" );
- return;
- }
- if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
- logError( "no such method '" + options + "' for isotope instance" );
- return;
- }
- // apply method
- instance[ options ].apply( instance, args );
- });
- } else {
- this.each(function() {
- var instance = $.data( this, 'isotope' );
- if ( instance ) {
- // apply options & init
- instance.option( options );
- instance._init( callback );
- } else {
- // initialize new instance
- $.data( this, 'isotope', new $.Isotope( options, this, callback ) );
- }
- });
- }
- // return jQuery object
- // so plugin methods do not have to
- return this;
- };
-
- })( window, jQuery );
-
-
-
-});
diff --git a/jquery.isotope.min.js b/jquery.isotope.min.js
deleted file mode 100644
index ea4afad..0000000
--- a/jquery.isotope.min.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Isotope v1.5.25
- * An exquisite jQuery plugin for magical layouts
- * http://isotope.metafizzy.co
- *
- * Commercial use requires one-time purchase of a commercial license
- * http://isotope.metafizzy.co/docs/license.html
- *
- * Non-commercial use is licensed under the MIT License
- *
- * Copyright 2013 Metafizzy
- */
-(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e"+d+"{#modernizr{height:3px}}"+"").appendTo("head"),f=b('
').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;fg?1:f0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;id&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;id&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery);
\ No newline at end of file
diff --git a/js/fake-element.js b/js/fake-element.js
deleted file mode 100644
index 8a3eaa0..0000000
--- a/js/fake-element.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var fakeElement = {};
-
-fakeElement.constanants = 'b c d f g k l m n p q r s t v x z'.split(' ');
-fakeElement.vowels = 'a e i o u y'.split(' ');
-fakeElement.categories = 'alkali alkaline-earth lanthanoid actinoid transition post-transition'.split(' ');
-fakeElement.suffices = 'on ium ogen'.split(' ');
-
-fakeElement.getRandom = function( property ) {
- var values = fakeElement[ property ];
- return values[ Math.floor( Math.random() * values.length ) ];
-};
-
-fakeElement.create = function() {
- var widthClass = Math.random()*10 > 6 ? 'width2' : 'width1';
- heightClass = Math.random()*10 > 6 ? 'height2' : 'height1';
- category = fakeElement.getRandom('categories');
- className = 'element fake metal ' + category + ' ' + widthClass + ' ' + heightClass;
- letter1 = fakeElement.getRandom('constanants').toUpperCase();
- letter2 = fakeElement.getRandom('constanants');
- symbol = letter1 + letter2;
- name = letter1 + fakeElement.getRandom('vowels') + letter2 + fakeElement.getRandom('vowels') + fakeElement.getRandom('constanants') + fakeElement.getRandom('suffices');
- number = ~~( 21 + Math.random() * 100 );
- weight = ~~( number * 2 + Math.random() * 15 );
-
- return '' + number +
- '
' + symbol + ' ' + name +
- ' ' + weight + '
';
-};
-
-fakeElement.getGroup = function() {
- var i = Math.ceil( Math.random()*3 + 1 ),
- newEls = '';
- while ( i-- ) {
- newEls += fakeElement.create();
- }
- return newEls;
-};
\ No newline at end of file
diff --git a/js/isotope.js b/js/isotope.js
new file mode 100644
index 0000000..c44df89
--- /dev/null
+++ b/js/isotope.js
@@ -0,0 +1,603 @@
+/*!
+ * Isotope v2.0.0
+ * Filter & sort magical layouts
+ * http://isotope.metafizzy.co
+ */
+
+( function( window ) {
+
+'use strict';
+
+// -------------------------- vars -------------------------- //
+
+var jQuery = window.jQuery;
+
+// -------------------------- helpers -------------------------- //
+
+// extend objects
+function extend( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+ return a;
+}
+
+var trim = String.prototype.trim ?
+ function( str ) {
+ return str.trim();
+ } :
+ function( str ) {
+ return str.replace( /^\s+|\s+$/g, '' );
+ };
+
+var docElem = document.documentElement;
+
+var getText = docElem.textContent ?
+ function( elem ) {
+ return elem.textContent;
+ } :
+ function( elem ) {
+ return elem.innerText;
+ };
+
+var objToString = Object.prototype.toString;
+function isArray( obj ) {
+ return objToString.call( obj ) === '[object Array]';
+}
+
+// index of helper cause IE8
+var indexOf = Array.prototype.indexOf ? function( ary, obj ) {
+ return ary.indexOf( obj );
+ } : function( ary, obj ) {
+ for ( var i=0, len = ary.length; i < len; i++ ) {
+ if ( ary[i] === obj ) {
+ return i;
+ }
+ }
+ return -1;
+ };
+
+// turn element or nodeList into an array
+function makeArray( obj ) {
+ var ary = [];
+ if ( isArray( obj ) ) {
+ // use object if already an array
+ ary = obj;
+ } else if ( obj && typeof obj.length === 'number' ) {
+ // convert nodeList to array
+ for ( var i=0, len = obj.length; i < len; i++ ) {
+ ary.push( obj[i] );
+ }
+ } else {
+ // array of single index
+ ary.push( obj );
+ }
+ return ary;
+}
+
+function removeFrom( obj, ary ) {
+ var index = indexOf( ary, obj );
+ if ( index !== -1 ) {
+ ary.splice( index, 1 );
+ }
+}
+
+// -------------------------- isotopeDefinition -------------------------- //
+
+// used for AMD definition and requires
+function isotopeDefinition( Outlayer, getSize, matchesSelector, Item, LayoutMode ) {
+ // create an Outlayer layout class
+ var Isotope = Outlayer.create( 'isotope', {
+ layoutMode: "masonry",
+ isJQueryFiltering: true,
+ sortAscending: true
+ });
+
+ Isotope.Item = Item;
+ Isotope.LayoutMode = LayoutMode;
+
+ Isotope.prototype._create = function() {
+ this.itemGUID = 0;
+ // functions that sort items
+ this._sorters = {};
+ this._getSorters();
+ // call super
+ Outlayer.prototype._create.call( this );
+
+ // create layout modes
+ this.modes = {};
+ // start filteredItems with all items
+ this.filteredItems = this.items;
+ // keep of track of sortBys
+ this.sortHistory = [ 'original-order' ];
+ // create from registered layout modes
+ for ( var name in LayoutMode.modes ) {
+ this._initLayoutMode( name );
+ }
+ };
+
+ Isotope.prototype.reloadItems = function() {
+ // reset item ID counter
+ this.itemGUID = 0;
+ // call super
+ Outlayer.prototype.reloadItems.call( this );
+ };
+
+ Isotope.prototype._itemize = function() {
+ var items = Outlayer.prototype._itemize.apply( this, arguments );
+ // assign ID for original-order
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ item.id = this.itemGUID++;
+ }
+ this._updateItemsSortData( items );
+ return items;
+ };
+
+
+ // -------------------------- layout -------------------------- //
+
+ Isotope.prototype._initLayoutMode = function( name ) {
+ var Mode = LayoutMode.modes[ name ];
+ // set mode options
+ // HACK extend initial options, back-fill in default options
+ var initialOpts = this.options[ name ] || {};
+ this.options[ name ] = Mode.options ?
+ extend( Mode.options, initialOpts ) : initialOpts;
+ // init layout mode instance
+ this.modes[ name ] = new Mode( this );
+ };
+
+
+ Isotope.prototype.layout = function() {
+ // if first time doing layout, do all magic
+ if ( !this._isLayoutInited && this.options.isInitLayout ) {
+ this.arrange();
+ return;
+ }
+ this._layout();
+ };
+
+ // private method to be used in layout() & magic()
+ Isotope.prototype._layout = function() {
+ // don't animate first layout
+ var isInstant = this._getIsInstant();
+ // layout flow
+ this._resetLayout();
+ this._manageStamps();
+ this.layoutItems( this.filteredItems, isInstant );
+
+ // flag for initalized
+ this._isLayoutInited = true;
+ };
+
+ // filter + sort + layout
+ Isotope.prototype.arrange = function( opts ) {
+ // set any options pass
+ this.option( opts );
+ this._getIsInstant();
+ // filter, sort, and layout
+ this.filteredItems = this._filter( this.items );
+ this._sort();
+ this._layout();
+ };
+ // alias to _init for main plugin method
+ Isotope.prototype._init = Isotope.prototype.arrange;
+
+ // HACK
+ // Don't animate/transition first layout
+ // Or don't animate/transition other layouts
+ Isotope.prototype._getIsInstant = function() {
+ var isInstant = this.options.isLayoutInstant !== undefined ?
+ this.options.isLayoutInstant : !this._isLayoutInited;
+ this._isInstant = isInstant;
+ return isInstant;
+ };
+
+ // -------------------------- filter -------------------------- //
+
+ Isotope.prototype._filter = function( items ) {
+ var filter = this.options.filter;
+ filter = filter || '*';
+ var matches = [];
+ var hiddenMatched = [];
+ var visibleUnmatched = [];
+
+ var test = this._getFilterTest( filter );
+
+ // test each item
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ if ( item.isIgnored ) {
+ continue;
+ }
+ // add item to either matched or unmatched group
+ var isMatched = test( item );
+ // item.isFilterMatched = isMatched;
+ // add to matches if its a match
+ if ( isMatched ) {
+ matches.push( item );
+ }
+ // add to additional group if item needs to be hidden or revealed
+ if ( isMatched && item.isHidden ) {
+ hiddenMatched.push( item );
+ } else if ( !isMatched && !item.isHidden ) {
+ visibleUnmatched.push( item );
+ }
+ }
+
+ var _this = this;
+ function hideReveal() {
+ _this.reveal( hiddenMatched );
+ _this.hide( visibleUnmatched );
+ }
+
+ if ( this._isInstant ) {
+ this._noTransition( hideReveal );
+ } else {
+ hideReveal();
+ }
+
+ return matches;
+ };
+
+ // get a jQuery, function, or a matchesSelector test given the filter
+ Isotope.prototype._getFilterTest = function( filter ) {
+ if ( jQuery && this.options.isJQueryFiltering ) {
+ // use jQuery
+ return function( item ) {
+ return jQuery( item.element ).is( filter );
+ };
+ }
+ if ( typeof filter === 'function' ) {
+ // use filter as function
+ return function( item ) {
+ return filter( item.element );
+ };
+ }
+ // default, use filter as selector string
+ return function( item ) {
+ return matchesSelector( item.element, filter );
+ };
+ };
+
+ // -------------------------- sorting -------------------------- //
+
+ /**
+ * @params {Array} elems
+ * @public
+ */
+ Isotope.prototype.updateSortData = function( elems ) {
+ this._getSorters();
+ // update item sort data
+ // default to all items if none are passed in
+ elems = makeArray( elems );
+ var items = this.getItems( elems );
+ // if no items found, update all items
+ items = items.length ? items : this.items;
+ this._updateItemsSortData( items );
+ };
+
+ Isotope.prototype._getSorters = function() {
+ var getSortData = this.options.getSortData;
+ for ( var key in getSortData ) {
+ var sorter = getSortData[ key ];
+ this._sorters[ key ] = mungeSorter( sorter );
+ }
+ };
+
+ /**
+ * @params {Array} items - of Isotope.Items
+ * @private
+ */
+ Isotope.prototype._updateItemsSortData = function( items ) {
+ for ( var i=0, len = items.length; i < len; i++ ) {
+ var item = items[i];
+ item.updateSortData();
+ }
+ };
+
+ // ----- munge sorter ----- //
+
+ // encapsulate this, as we just need mungeSorter
+ // other functions in here are just for munging
+ var mungeSorter = ( function() {
+ // add a magic layer to sorters for convienent shorthands
+ // `.foo-bar` will use the text of .foo-bar querySelector
+ // `[foo-bar]` will use attribute
+ // you can also add parser
+ // `.foo-bar parseInt` will parse that as a number
+ function mungeSorter( sorter ) {
+ // if not a string, return function or whatever it is
+ if ( typeof sorter !== 'string' ) {
+ return sorter;
+ }
+ // parse the sorter string
+ var args = trim( sorter ).split(' ');
+ var query = args[0];
+ // check if query looks like [an-attribute]
+ var attrMatch = query.match( /^\[(.+)\]$/ );
+ var attr = attrMatch && attrMatch[1];
+ var getValue = getValueGetter( attr, query );
+ // use second argument as a parser
+ var parser = Isotope.sortDataParsers[ args[1] ];
+ // parse the value, if there was a parser
+ sorter = parser ? function( elem ) {
+ return elem && parser( getValue( elem ) );
+ } :
+ // otherwise just return value
+ function( elem ) {
+ return elem && getValue( elem );
+ };
+
+ return sorter;
+ }
+
+ // get an attribute getter, or get text of the querySelector
+ function getValueGetter( attr, query ) {
+ var getValue;
+ // if query looks like [foo-bar], get attribute
+ if ( attr ) {
+ getValue = function( elem ) {
+ return elem.getAttribute( attr );
+ };
+ } else {
+ // otherwise, assume its a querySelector, and get its text
+ getValue = function( elem ) {
+ var child = elem.querySelector( query );
+ return child && getText( child );
+ };
+ }
+ return getValue;
+ }
+
+ return mungeSorter;
+ })();
+
+ // parsers used in getSortData shortcut strings
+ Isotope.sortDataParsers = {
+ 'parseInt': function( val ) {
+ return parseInt( val, 10 );
+ },
+ 'parseFloat': function( val ) {
+ return parseFloat( val );
+ }
+ };
+
+ // ----- sort method ----- //
+
+ // sort filteredItem order
+ Isotope.prototype._sort = function() {
+ var sortByOpt = this.options.sortBy;
+ if ( !sortByOpt ) {
+ return;
+ }
+ // concat all sortBy and sortHistory
+ var sortBys = [].concat.apply( sortByOpt, this.sortHistory );
+ // sort magic
+ var itemSorter = getItemSorter( sortBys, this.options.sortAscending );
+ this.filteredItems.sort( itemSorter );
+ // keep track of sortBy History
+ if ( sortByOpt !== this.sortHistory[0] ) {
+ // add to front, oldest goes in last
+ this.sortHistory.unshift( sortByOpt );
+ }
+ };
+
+ // returns a function used for sorting
+ function getItemSorter( sortBys, sortAsc ) {
+ return function sorter( itemA, itemB ) {
+ // cycle through all sortKeys
+ for ( var i = 0, len = sortBys.length; i < len; i++ ) {
+ var sortBy = sortBys[i];
+ var a = itemA.sortData[ sortBy ];
+ var b = itemB.sortData[ sortBy ];
+ if ( a > b || a < b ) {
+ // if sortAsc is an object, use the value given the sortBy key
+ var isAscending = sortAsc[ sortBy ] !== undefined ? sortAsc[ sortBy ] : sortAsc;
+ var direction = isAscending ? 1 : -1;
+ return ( a > b ? 1 : -1 ) * direction;
+ }
+ }
+ return 0;
+ };
+ }
+
+ // -------------------------- methods -------------------------- //
+
+ // get layout mode
+ Isotope.prototype._mode = function() {
+ var layoutMode = this.options.layoutMode;
+ var mode = this.modes[ layoutMode ];
+ if ( !mode ) {
+ // TODO console.error
+ throw new Error( 'No layout mode: ' + layoutMode );
+ }
+ // HACK sync mode's options
+ // any options set after init for layout mode need to be synced
+ mode.options = this.options[ layoutMode ];
+ return mode;
+ };
+
+ Isotope.prototype._resetLayout = function() {
+ // trigger original reset layout
+ Outlayer.prototype._resetLayout.call( this );
+ this._mode()._resetLayout();
+ };
+
+ Isotope.prototype._getItemLayoutPosition = function( item ) {
+ return this._mode()._getItemLayoutPosition( item );
+ };
+
+ Isotope.prototype._manageStamp = function( stamp ) {
+ this._mode()._manageStamp( stamp );
+ };
+
+ Isotope.prototype._getContainerSize = function() {
+ return this._mode()._getContainerSize();
+ };
+
+ Isotope.prototype.needsResizeLayout = function() {
+ return this._mode().needsResizeLayout();
+ };
+
+ // -------------------------- adding & removing -------------------------- //
+
+ // HEADS UP overwrites default Outlayer appended
+ Isotope.prototype.appended = function( elems ) {
+ var items = this.addItems( elems );
+ if ( !items.length ) {
+ return;
+ }
+ var filteredItems = this._filterRevealAdded( items );
+ // add to filteredItems
+ this.filteredItems = this.filteredItems.concat( filteredItems );
+ };
+
+ // HEADS UP overwrites default Outlayer prepended
+ Isotope.prototype.prepended = function( elems ) {
+ var items = this._itemize( elems );
+ if ( !items.length ) {
+ return;
+ }
+ // add items to beginning of collection
+ var previousItems = this.items.slice(0);
+ this.items = items.concat( previousItems );
+ // start new layout
+ this._resetLayout();
+ this._manageStamps();
+ // layout new stuff without transition
+ var filteredItems = this._filterRevealAdded( items );
+ // layout previous items
+ this.layoutItems( previousItems );
+ // add to filteredItems
+ this.filteredItems = filteredItems.concat( this.filteredItems );
+ };
+
+ Isotope.prototype._filterRevealAdded = function( items ) {
+ var filteredItems = this._noTransition( function() {
+ return this._filter( items );
+ });
+ // layout and reveal just the new items
+ this.layoutItems( filteredItems, true );
+ this.reveal( filteredItems );
+ return items;
+ };
+
+ /**
+ * Filter, sort, and layout newly-appended item elements
+ * @param {Array or NodeList or Element} elems
+ */
+ Isotope.prototype.insert = function( elems ) {
+ var items = this.addItems( elems );
+ if ( !items.length ) {
+ return;
+ }
+ // append item elements
+ var i, item;
+ var len = items.length;
+ for ( i=0; i < len; i++ ) {
+ item = items[i];
+ this.element.appendChild( item.element );
+ }
+ // filter new stuff
+ /*
+ // this way adds hides new filtered items with NO transition
+ // so user can't see if new hidden items have been inserted
+ var filteredInsertItems;
+ this._noTransition( function() {
+ filteredInsertItems = this._filter( items );
+ // hide all new items
+ this.hide( filteredInsertItems );
+ });
+ // */
+ // this way hides new filtered items with transition
+ // so user at least sees that something has been added
+ var filteredInsertItems = this._filter( items );
+ // hide all newitems
+ this._noTransition( function() {
+ this.hide( filteredInsertItems );
+ });
+ // */
+ // set flag
+ for ( i=0; i < len; i++ ) {
+ items[i].isLayoutInstant = true;
+ }
+ this.arrange();
+ // reset flag
+ for ( i=0; i < len; i++ ) {
+ delete items[i].isLayoutInstant;
+ }
+ this.reveal( filteredInsertItems );
+ };
+
+ var _remove = Isotope.prototype.remove;
+ Isotope.prototype.remove = function( elems ) {
+ elems = makeArray( elems );
+ var removeItems = this.getItems( elems );
+ // do regular thing
+ _remove.call( this, elems );
+ // bail if no items to remove
+ if ( !removeItems || !removeItems.length ) {
+ return;
+ }
+ // remove elems from filteredItems
+ for ( var i=0, len = removeItems.length; i < len; i++ ) {
+ var item = removeItems[i];
+ // remove item from collection
+ removeFrom( item, this.filteredItems );
+ }
+ };
+
+ /**
+ * trigger fn without transition
+ * kind of hacky to have this in the first place
+ * @param {Function} fn
+ * @returns ret
+ * @private
+ */
+ Isotope.prototype._noTransition = function( fn ) {
+ // save transitionDuration before disabling
+ var transitionDuration = this.options.transitionDuration;
+ // disable transition
+ this.options.transitionDuration = 0;
+ // do it
+ var returnValue = fn.call( this );
+ // re-enable transition for reveal
+ this.options.transitionDuration = transitionDuration;
+ return returnValue;
+ };
+
+ // ----- ----- //
+
+ return Isotope;
+}
+
+// -------------------------- transport -------------------------- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'outlayer/outlayer',
+ 'get-size/get-size',
+ 'matches-selector/matches-selector',
+ './item',
+ './layout-mode',
+ // include default layout modes
+ './layout-modes/masonry',
+ './layout-modes/fit-rows',
+ './layout-modes/vertical'
+ ],
+ isotopeDefinition );
+} else {
+ // browser global
+ window.Isotope = isotopeDefinition(
+ window.Outlayer,
+ window.getSize,
+ window.matchesSelector,
+ window.Isotope.Item,
+ window.Isotope.LayoutMode
+ );
+}
+
+})( window );
diff --git a/js/item.js b/js/item.js
new file mode 100644
index 0000000..de5bac5
--- /dev/null
+++ b/js/item.js
@@ -0,0 +1,65 @@
+/**
+ * Isotope Item
+**/
+
+( function( window ) {
+
+'use strict';
+
+// -------------------------- Item -------------------------- //
+
+function itemDefinition( Outlayer ) {
+
+// sub-class Outlayer Item
+function Item() {
+ Outlayer.Item.apply( this, arguments );
+}
+
+Item.prototype = new Outlayer.Item();
+
+Item.prototype._create = function() {
+ // assign id, used for original-order sorting
+ this.id = this.layout.itemGUID++;
+ Outlayer.Item.prototype._create.call( this );
+ this.sortData = {};
+};
+
+Item.prototype.updateSortData = function() {
+ if ( this.isIgnored ) {
+ return;
+ }
+ // default sorters
+ this.sortData.id = this.id;
+ // for backward compatibility
+ this.sortData['original-order'] = this.id;
+ this.sortData.random = Math.random();
+ // go thru getSortData obj and apply the sorters
+ var getSortData = this.layout.options.getSortData;
+ var sorters = this.layout._sorters;
+ for ( var key in getSortData ) {
+ var sorter = sorters[ key ];
+ this.sortData[ key ] = sorter( this.element, this );
+ }
+};
+
+return Item;
+
+}
+
+// -------------------------- transport -------------------------- //
+
+if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'outlayer/outlayer'
+ ],
+ itemDefinition );
+} else {
+ // browser global
+ window.Isotope = window.Isotope || {};
+ window.Isotope.Item = itemDefinition(
+ window.Outlayer
+ );
+}
+
+})( window );
diff --git a/js/jquery-1.7.1.min.js b/js/jquery-1.7.1.min.js
deleted file mode 100644
index ee02337..0000000
--- a/js/jquery-1.7.1.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v1.7.1 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(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(;g=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)?parseFloat(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.1",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&&typeof a=="object"&&"setInterval"in a},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){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=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.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:q.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},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o=""+"",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});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;e-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.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];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=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(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),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&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?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));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|canvas|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:]+)/,$=/",""],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){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},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.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){if(a===b)return this[0]&&this[0].nodeType===1?this[0].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(var c=0,d=this.length;c1&&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||!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;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.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(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$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)));return c}),c.documentElement.currentStyle&&(bB=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)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,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)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Isotope tests
+
+
+
+ Sorting
+
+
+
B 4
+
B 2
+
A 4
+
A 1
+
B 1
+
A 3
+
A 2
+
+
+ getSortData
+
+
+
+ watermelon
+ 3.14
+ 42
+
+
+
+ Filtering
+
+
+
5
+
3
+
2
+
9
+
7
+
1
+
8
+
+
+ layoutComplete
+
+
+
a1 b1
+
a2 b1
+
a3 b1
+
a1 b2
+
a2 b2
+
a3 b2
+
a1 b3
+
a2 b3
+
a3 b3
+
+
+ LayoutMode.getSegmentSize
+
+
+
+ Masonry
+
+
+
+ Masonry stamp
+
+
+
+
+
diff --git a/test/layout-complete.js b/test/layout-complete.js
new file mode 100644
index 0000000..82a1ec4
--- /dev/null
+++ b/test/layout-complete.js
@@ -0,0 +1,73 @@
+test( 'layoutComplete', function() {
+
+ 'use strict';
+
+ var iso = new Isotope( '#layout-complete', {
+ layoutMode: 'fitRows',
+ transitionDuration: '0.1s'
+ });
+
+ var tests = [
+ function() {
+ iso.once( 'layoutComplete', function() {
+ ok( true, 'layoutComplete after some were filtered' );
+ next();
+ });
+
+ iso.arrange({
+ filter: '.a1'
+ });
+ },
+ function() {
+ iso.once( 'layoutComplete', function() {
+ ok( true, 'after some revealed, some hidden, some same' );
+ next();
+ });
+
+ iso.arrange({
+ filter: '.b2'
+ });
+ },
+ function() {
+ iso.once( 'layoutComplete', function() {
+ ok( true, 'after random sort' );
+ next();
+ });
+
+ iso.arrange({
+ sortBy: 'random'
+ });
+ },
+ function() {
+ iso.once( 'layoutComplete', function() {
+ ok( true, 'after layout mid-way thru transition' );
+ next();
+ });
+
+ iso.arrange({
+ filter: '.a2',
+ transitionDuration: '0.6s'
+ });
+
+ setTimeout( function() {
+ iso.arrange({
+ filter: '.b2'
+ });
+ }, 300 );
+ }
+ ];
+
+ function next() {
+ if ( tests.length ) {
+ var nextTest = tests.shift();
+ // HACK for consecutive layoutComplete calls
+ setTimeout( nextTest );
+ } else {
+ start();
+ }
+ }
+
+ next();
+ stop();
+
+});
diff --git a/test/masonry-measure-columns.js b/test/masonry-measure-columns.js
new file mode 100644
index 0000000..7f1afcd
--- /dev/null
+++ b/test/masonry-measure-columns.js
@@ -0,0 +1,39 @@
+( function() {
+
+'use strict';
+
+test( 'Masonry.measureColumns', function() {
+
+ var iso = new Isotope( '#masonry-measure-columns', {
+ itemSelector: '.item',
+ layoutMode: 'masonry',
+ transitionDuration: 0
+ });
+
+ var msnryMode = iso.modes.masonry;
+ equal( msnryMode.columnWidth, 60, 'after layout, measured first element' );
+
+ iso.modes.masonry._getMeasurement( 'columnWidth', 'outerWidth' );
+ equal( msnryMode.columnWidth, 0, '_getMeasurement, no option' );
+
+ iso.modes.masonry.measureColumns();
+ equal( msnryMode.columnWidth, 60, 'measureColumns, no option' );
+
+ iso.arrange({ filter: '.c' });
+
+ iso.modes.masonry.measureColumns();
+ equal( msnryMode.columnWidth, 60, 'measureColumns after filter first item, no option' );
+
+ iso.arrange({
+ masonry: { columnWidth: 80 }
+ });
+ equal( msnryMode.columnWidth, 80, '.arrange() masonry.columnWidth option set number' );
+
+ iso.arrange({
+ masonry: { columnWidth: '.grid-sizer' }
+ });
+ equal( msnryMode.columnWidth, 70, '.arrange() masonry.columnWidth option set selector string' );
+
+});
+
+})();
diff --git a/test/masonry-stamp.js b/test/masonry-stamp.js
new file mode 100644
index 0000000..e37c887
--- /dev/null
+++ b/test/masonry-stamp.js
@@ -0,0 +1,27 @@
+( function() {
+
+'use strict';
+
+test( 'Masonry stamp', function() {
+
+ var iso = new Isotope( '#masonry-stamp', {
+ layoutMode: 'masonry',
+ itemSelector: '.item',
+ stamp: '.stamp'
+ });
+
+ function checkPosition( item, x, y ) {
+ var elem = item.element;
+ var left = parseInt( elem.style.left, 10 );
+ var top = parseInt( elem.style.top, 10 );
+ deepEqual( [ left, top ], [ x, y ], 'item position ' + x + ', ' + y );
+ }
+
+ checkPosition( iso.items[0], 0, 0 );
+ checkPosition( iso.items[1], 0, 30 );
+ checkPosition( iso.items[2], 60, 45 );
+ checkPosition( iso.items[3], 120, 45 );
+
+});
+
+})();
diff --git a/test/sorting.js b/test/sorting.js
new file mode 100644
index 0000000..6c0dacf
--- /dev/null
+++ b/test/sorting.js
@@ -0,0 +1,69 @@
+( function() {
+
+'use strict';
+
+function getItemsText( iso ) {
+ var texts = [];
+ for ( var i=0, len = iso.filteredItems.length; i < len; i++ ) {
+ var item = iso.filteredItems[i];
+ texts.push( getText( item.element ) );
+ }
+ return texts.join(',');
+}
+
+test( 'sorting', function() {
+
+ // sorting with history
+ ( function() {
+ var iso = new Isotope( '#sorting1', {
+ layoutMode: 'fitRows',
+ transitionDuration: 0,
+ getSortData: {
+ letter: 'b',
+ number: 'i'
+ },
+ sortBy: 'number'
+ });
+
+ iso.arrange({ sortBy: 'letter' });
+
+ var texts = getItemsText( iso );
+
+ equal( texts, 'A1,A2,A3,A4,B1,B2,B4', 'items sorted by letter, then number, via history' );
+
+ iso.destroy();
+ })();
+
+ // sorting with array
+ ( function() {
+ var iso = new Isotope( '#sorting1', {
+ layoutMode: 'fitRows',
+ transitionDuration: 0,
+ getSortData: {
+ letter: 'b',
+ number: 'i'
+ },
+ sortBy: [ 'letter', 'number' ]
+ });
+
+ equal( getItemsText( iso ), 'A1,A2,A3,A4,B1,B2,B4', 'sortBy array' );
+
+ iso.arrange({
+ sortAscending: false
+ });
+ equal( getItemsText( iso ), 'B4,B2,B1,A4,A3,A2,A1', 'sortAscending false' );
+
+ iso.arrange({
+ sortAscending: {
+ letter: true,
+ number: false
+ }
+ });
+ equal( getItemsText( iso ), 'A4,A3,A2,A1,B4,B2,B1', 'sortAscending with object' );
+
+ iso.destroy();
+ })();
+
+});
+
+})();
diff --git a/test/tests.css b/test/tests.css
new file mode 100644
index 0000000..c70d409
--- /dev/null
+++ b/test/tests.css
@@ -0,0 +1,76 @@
+* {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: sans-serif;
+}
+
+.container {
+ background: #EEE;
+ width: 180px;
+ margin-bottom: 20px;
+ position: relative;
+}
+
+.container:after {
+ content: '';
+ display: block;
+ clear: both;
+}
+
+.item {
+ width: 60px;
+ height: 30px;
+ float: left;
+ border: 1px solid;
+ background: #3BF;
+}
+
+.item.w2 { width: 120px; }
+.item.w3 { width: 180px; }
+
+.item.h2 { height: 50px; }
+.item.h3 { height: 70px; }
+.item.h4 { height: 90px; }
+.item.h5 { height: 110px; }
+
+/* ---- stamp ---- */
+
+
+.stamp {
+ background: red;
+ opacity: 0.75;
+ position: absolute;
+ border: 1px solid;
+}
+
+.has-stamp {
+ position: relative;
+}
+
+/* ---- get segment size ---- */
+
+#get-segment-size .grid-sizer {
+ /* 57 outer width */
+ width: 52px;
+ margin-right: 5px;
+ /* 47 outer height */
+ height: 40px;
+ margin-bottom: 7px;
+}
+
+#masonry-measure-columns .grid-sizer {
+ width: 70px;
+}
+
+/* ---- masonry stamp ---- */
+
+#masonry-stamp .stamp1 {
+ width: 80px;
+ height: 30px;
+ right: 25px;
+ top: 15px;
+}