diff --git a/lms/askbot/skins/README b/lms/askbot/skins/README
new file mode 100644
index 0000000000..3fbc8c331e
--- /dev/null
+++ b/lms/askbot/skins/README
@@ -0,0 +1,71 @@
+=============================
+Customization of Askbot skins
+=============================
+
+The default skin at the moment is in the development, however
+it is already possible to start customizing your site without
+incurring much maintenance overhead.
+
+Current status of templates
+===========================
+The two busiest templates are - the "main" page and the "question" page,
+the main page is more or less complete. "Question" page will be significantly
+refactored in the near future.
+
+How skins work in Askbot
+========================
+
+The skins reside in up to two directories:
+
+* `askbot/skins` in the source code (contains any stock skins)
+* directory pointed to by a ASKBOT_EXTRA_SKINS_DIR in your settings.py
+ with any other skins
+
+Currently, the skin is selected by the site administrator in the live settings.
+Also, at the moment skin default is special - it serves any resources
+absent in other skins. In a way - all other skins inherit from the "default".
+
+Templates and media are resolved in the following way:
+* check in skin named as in settings.ASKBOT_DEFAULT_SKIN
+* then skin named 'default'
+
+How to customize a skin
+=======================
+
+There are three options:
+
+* edit custom css via the settings interface - good for small tweaks
+ (no need to directly log in to the server)
+* create a new skin in separate files (need direct access to the server
+ files, more maintenance overhead)
+* directly modify the "default" skin (as in the previous option - need
+ direct access to the server, less maintenance overhead, some
+ knowledge of git system is required)
+
+The first option only allows to modify css and add custom javascript.
+The latter two options allow changing the templates as well.
+
+If you wish to follow the second option, create a directory named the same
+way as the skin you are building and start adding files with the same names
+and relative locations as those in the "default" skin.
+
+NO NEED TO CREATE ALL TEMPLATES/MEDIA FILES AT ONCE as your skin will inherit
+pieces from the "default".
+
+The disadvantage of thil second approach is that you will be on your own maintaining
+the synchrony of your template, stylesheet and the core code.
+
+Third approach is the best, but it requires (the most basic) use of
+git source code management software. With git you will easily merge the updates
+from the development repository.
+
+Structure of the skin directories
+=================================
+Todo.
+
+To simplify maintenance of the css as the skin is being developed,
+populate css file `media/style/extra.css` with any rules that will
+override those in the `media/style/style.css` file. If you do that
+
+media does not have to be composed of files named the same way as in default skin
+whatever media you link to from your templates - will be in operation
diff --git a/lms/askbot/skins/__init__.py b/lms/askbot/skins/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/lms/askbot/skins/common/media/images/anon.png b/lms/askbot/skins/common/media/images/anon.png
new file mode 100644
index 0000000000..a204159021
Binary files /dev/null and b/lms/askbot/skins/common/media/images/anon.png differ
diff --git a/lms/askbot/skins/common/media/images/bigbutton.png b/lms/askbot/skins/common/media/images/bigbutton.png
new file mode 100644
index 0000000000..2a7c0f0585
Binary files /dev/null and b/lms/askbot/skins/common/media/images/bigbutton.png differ
diff --git a/lms/askbot/skins/common/media/images/bigbuttonhover.png b/lms/askbot/skins/common/media/images/bigbuttonhover.png
new file mode 100644
index 0000000000..cf4bacca69
Binary files /dev/null and b/lms/askbot/skins/common/media/images/bigbuttonhover.png differ
diff --git a/lms/askbot/skins/common/media/images/blue-up-arrow-h18px.png b/lms/askbot/skins/common/media/images/blue-up-arrow-h18px.png
new file mode 100755
index 0000000000..e1f29e8633
Binary files /dev/null and b/lms/askbot/skins/common/media/images/blue-up-arrow-h18px.png differ
diff --git a/lms/askbot/skins/common/media/images/box-arrow.gif b/lms/askbot/skins/common/media/images/box-arrow.gif
new file mode 100755
index 0000000000..89dcf5b3dd
Binary files /dev/null and b/lms/askbot/skins/common/media/images/box-arrow.gif differ
diff --git a/lms/askbot/skins/common/media/images/bullet_green.gif b/lms/askbot/skins/common/media/images/bullet_green.gif
new file mode 100755
index 0000000000..fa530910f9
Binary files /dev/null and b/lms/askbot/skins/common/media/images/bullet_green.gif differ
diff --git a/lms/askbot/skins/common/media/images/cc-88x31.png b/lms/askbot/skins/common/media/images/cc-88x31.png
new file mode 100755
index 0000000000..0f2a0f1072
Binary files /dev/null and b/lms/askbot/skins/common/media/images/cc-88x31.png differ
diff --git a/lms/askbot/skins/common/media/images/cc-by-sa.png b/lms/askbot/skins/common/media/images/cc-by-sa.png
new file mode 100644
index 0000000000..f0a944e0b8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/cc-by-sa.png differ
diff --git a/lms/askbot/skins/common/media/images/close-small-dark.png b/lms/askbot/skins/common/media/images/close-small-dark.png
new file mode 100755
index 0000000000..280c1fc74e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/close-small-dark.png differ
diff --git a/lms/askbot/skins/common/media/images/close-small-hover.png b/lms/askbot/skins/common/media/images/close-small-hover.png
new file mode 100755
index 0000000000..7899aec721
Binary files /dev/null and b/lms/askbot/skins/common/media/images/close-small-hover.png differ
diff --git a/lms/askbot/skins/common/media/images/close-small.png b/lms/askbot/skins/common/media/images/close-small.png
new file mode 100755
index 0000000000..5a99d31f17
Binary files /dev/null and b/lms/askbot/skins/common/media/images/close-small.png differ
diff --git a/lms/askbot/skins/common/media/images/contributorsback.png b/lms/askbot/skins/common/media/images/contributorsback.png
new file mode 100644
index 0000000000..dd72838396
Binary files /dev/null and b/lms/askbot/skins/common/media/images/contributorsback.png differ
diff --git a/lms/askbot/skins/common/media/images/dash.gif b/lms/askbot/skins/common/media/images/dash.gif
new file mode 100755
index 0000000000..d1ddc507fe
Binary files /dev/null and b/lms/askbot/skins/common/media/images/dash.gif differ
diff --git a/lms/askbot/skins/common/media/images/dialog-warning-off.png b/lms/askbot/skins/common/media/images/dialog-warning-off.png
new file mode 100644
index 0000000000..258e4d86c0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/dialog-warning-off.png differ
diff --git a/lms/askbot/skins/common/media/images/dialog-warning.png b/lms/askbot/skins/common/media/images/dialog-warning.png
new file mode 100644
index 0000000000..a9e4ff3991
Binary files /dev/null and b/lms/askbot/skins/common/media/images/dialog-warning.png differ
diff --git a/lms/askbot/skins/common/media/images/djangomade124x25_grey.gif b/lms/askbot/skins/common/media/images/djangomade124x25_grey.gif
new file mode 100755
index 0000000000..d34bb31161
Binary files /dev/null and b/lms/askbot/skins/common/media/images/djangomade124x25_grey.gif differ
diff --git a/lms/askbot/skins/common/media/images/dot-g.gif b/lms/askbot/skins/common/media/images/dot-g.gif
new file mode 100755
index 0000000000..5d6bb28e56
Binary files /dev/null and b/lms/askbot/skins/common/media/images/dot-g.gif differ
diff --git a/lms/askbot/skins/common/media/images/dot-list.gif b/lms/askbot/skins/common/media/images/dot-list.gif
new file mode 100755
index 0000000000..f6a6b86531
Binary files /dev/null and b/lms/askbot/skins/common/media/images/dot-list.gif differ
diff --git a/lms/askbot/skins/common/media/images/edit.png b/lms/askbot/skins/common/media/images/edit.png
new file mode 100755
index 0000000000..dcb09be064
Binary files /dev/null and b/lms/askbot/skins/common/media/images/edit.png differ
diff --git a/lms/askbot/skins/common/media/images/expander-arrow-hide.gif b/lms/askbot/skins/common/media/images/expander-arrow-hide.gif
new file mode 100755
index 0000000000..feb6a6187c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/expander-arrow-hide.gif differ
diff --git a/lms/askbot/skins/common/media/images/expander-arrow-show.gif b/lms/askbot/skins/common/media/images/expander-arrow-show.gif
new file mode 100755
index 0000000000..6825c56ee4
Binary files /dev/null and b/lms/askbot/skins/common/media/images/expander-arrow-show.gif differ
diff --git a/lms/askbot/skins/common/media/images/favicon.gif b/lms/askbot/skins/common/media/images/favicon.gif
new file mode 100644
index 0000000000..d106e5da96
Binary files /dev/null and b/lms/askbot/skins/common/media/images/favicon.gif differ
diff --git a/lms/askbot/skins/common/media/images/favicon.ico b/lms/askbot/skins/common/media/images/favicon.ico
new file mode 100644
index 0000000000..67203a5c95
Binary files /dev/null and b/lms/askbot/skins/common/media/images/favicon.ico differ
diff --git a/lms/askbot/skins/common/media/images/feed-icon-small.png b/lms/askbot/skins/common/media/images/feed-icon-small.png
new file mode 100644
index 0000000000..2794b0f54d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/feed-icon-small.png differ
diff --git a/lms/askbot/skins/common/media/images/flags/ad.gif b/lms/askbot/skins/common/media/images/flags/ad.gif
new file mode 100755
index 0000000000..57b499733f
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ad.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ae.gif b/lms/askbot/skins/common/media/images/flags/ae.gif
new file mode 100755
index 0000000000..78d15b67dc
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ae.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/af.gif b/lms/askbot/skins/common/media/images/flags/af.gif
new file mode 100755
index 0000000000..9889408211
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/af.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ag.gif b/lms/askbot/skins/common/media/images/flags/ag.gif
new file mode 100755
index 0000000000..48f8e7bc72
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ag.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ai.gif b/lms/askbot/skins/common/media/images/flags/ai.gif
new file mode 100755
index 0000000000..1cbc57958b
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ai.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/al.gif b/lms/askbot/skins/common/media/images/flags/al.gif
new file mode 100755
index 0000000000..c44fe0a0ae
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/al.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/am.gif b/lms/askbot/skins/common/media/images/flags/am.gif
new file mode 100755
index 0000000000..2915e30cb2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/am.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/an.gif b/lms/askbot/skins/common/media/images/flags/an.gif
new file mode 100755
index 0000000000..cb570c6799
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/an.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ao.gif b/lms/askbot/skins/common/media/images/flags/ao.gif
new file mode 100644
index 0000000000..8c854fa108
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ao.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ar.gif b/lms/askbot/skins/common/media/images/flags/ar.gif
new file mode 100755
index 0000000000..a9f71f7d6d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ar.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/as.gif b/lms/askbot/skins/common/media/images/flags/as.gif
new file mode 100755
index 0000000000..d776ec2711
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/as.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/at.gif b/lms/askbot/skins/common/media/images/flags/at.gif
new file mode 100755
index 0000000000..87e1217365
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/at.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/au.gif b/lms/askbot/skins/common/media/images/flags/au.gif
new file mode 100755
index 0000000000..5269c6a0e0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/au.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/aw.gif b/lms/askbot/skins/common/media/images/flags/aw.gif
new file mode 100755
index 0000000000..27fdb4d139
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/aw.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ax.gif b/lms/askbot/skins/common/media/images/flags/ax.gif
new file mode 100755
index 0000000000..0ceb6849f4
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ax.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/az.gif b/lms/askbot/skins/common/media/images/flags/az.gif
new file mode 100755
index 0000000000..d771618498
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/az.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ba.gif b/lms/askbot/skins/common/media/images/flags/ba.gif
new file mode 100755
index 0000000000..9bf5f0ac7e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ba.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bb.gif b/lms/askbot/skins/common/media/images/flags/bb.gif
new file mode 100755
index 0000000000..b7d08e57e3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bb.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bd.gif b/lms/askbot/skins/common/media/images/flags/bd.gif
new file mode 100755
index 0000000000..0fd27ecabe
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bd.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/be.gif b/lms/askbot/skins/common/media/images/flags/be.gif
new file mode 100755
index 0000000000..ae09bfbe14
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/be.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bf.gif b/lms/askbot/skins/common/media/images/flags/bf.gif
new file mode 100755
index 0000000000..9d6772cd0c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bf.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bg.gif b/lms/askbot/skins/common/media/images/flags/bg.gif
new file mode 100755
index 0000000000..11cf8ff3b3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bh.gif b/lms/askbot/skins/common/media/images/flags/bh.gif
new file mode 100755
index 0000000000..56aa72b2b6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bh.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bi.gif b/lms/askbot/skins/common/media/images/flags/bi.gif
new file mode 100755
index 0000000000..6e2cbe1216
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bi.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bj.gif b/lms/askbot/skins/common/media/images/flags/bj.gif
new file mode 100755
index 0000000000..e676116f8e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bj.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bm.gif b/lms/askbot/skins/common/media/images/flags/bm.gif
new file mode 100755
index 0000000000..9feb87bc9e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bn.gif b/lms/askbot/skins/common/media/images/flags/bn.gif
new file mode 100755
index 0000000000..b7b6b0f919
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bo.gif b/lms/askbot/skins/common/media/images/flags/bo.gif
new file mode 100755
index 0000000000..4844f85692
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bo.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/br.gif b/lms/askbot/skins/common/media/images/flags/br.gif
new file mode 100755
index 0000000000..8c8661626b
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/br.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bs.gif b/lms/askbot/skins/common/media/images/flags/bs.gif
new file mode 100755
index 0000000000..c0a741e5ca
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bs.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bt.gif b/lms/askbot/skins/common/media/images/flags/bt.gif
new file mode 100755
index 0000000000..abe2f3ccb0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bt.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bv.gif b/lms/askbot/skins/common/media/images/flags/bv.gif
new file mode 100755
index 0000000000..6202d1f3a2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bv.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bw.gif b/lms/askbot/skins/common/media/images/flags/bw.gif
new file mode 100755
index 0000000000..986ab63c27
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bw.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/by.gif b/lms/askbot/skins/common/media/images/flags/by.gif
new file mode 100755
index 0000000000..43ffcd4c71
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/by.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/bz.gif b/lms/askbot/skins/common/media/images/flags/bz.gif
new file mode 100755
index 0000000000..791737f0bd
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/bz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ca.gif b/lms/askbot/skins/common/media/images/flags/ca.gif
new file mode 100755
index 0000000000..457d9662d5
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ca.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/catalonia.gif b/lms/askbot/skins/common/media/images/flags/catalonia.gif
new file mode 100644
index 0000000000..73df9a0498
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/catalonia.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cc.gif b/lms/askbot/skins/common/media/images/flags/cc.gif
new file mode 100755
index 0000000000..3f7832702d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cc.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cd.gif b/lms/askbot/skins/common/media/images/flags/cd.gif
new file mode 100644
index 0000000000..1df717ae5c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cd.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cf.gif b/lms/askbot/skins/common/media/images/flags/cf.gif
new file mode 100755
index 0000000000..35787ca489
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cf.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cg.gif b/lms/askbot/skins/common/media/images/flags/cg.gif
new file mode 100755
index 0000000000..e0a62a51ca
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ch.gif b/lms/askbot/skins/common/media/images/flags/ch.gif
new file mode 100755
index 0000000000..d5c0e5b7fa
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ch.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ci.gif b/lms/askbot/skins/common/media/images/flags/ci.gif
new file mode 100755
index 0000000000..844120a52b
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ci.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ck.gif b/lms/askbot/skins/common/media/images/flags/ck.gif
new file mode 100755
index 0000000000..2edb73994c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ck.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cl.gif b/lms/askbot/skins/common/media/images/flags/cl.gif
new file mode 100755
index 0000000000..cbc370e6ca
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cl.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cm.gif b/lms/askbot/skins/common/media/images/flags/cm.gif
new file mode 100755
index 0000000000..1fb102b295
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cn.gif b/lms/askbot/skins/common/media/images/flags/cn.gif
new file mode 100755
index 0000000000..b052530978
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/co.gif b/lms/askbot/skins/common/media/images/flags/co.gif
new file mode 100755
index 0000000000..d0e15cafea
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/co.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cr.gif b/lms/askbot/skins/common/media/images/flags/cr.gif
new file mode 100755
index 0000000000..0728dd6a49
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cs.gif b/lms/askbot/skins/common/media/images/flags/cs.gif
new file mode 100755
index 0000000000..101db64939
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cs.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cu.gif b/lms/askbot/skins/common/media/images/flags/cu.gif
new file mode 100755
index 0000000000..291255ca3f
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cu.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cv.gif b/lms/askbot/skins/common/media/images/flags/cv.gif
new file mode 100755
index 0000000000..43c6c6cb6e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cv.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cx.gif b/lms/askbot/skins/common/media/images/flags/cx.gif
new file mode 100755
index 0000000000..a5b43089b0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cx.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cy.gif b/lms/askbot/skins/common/media/images/flags/cy.gif
new file mode 100755
index 0000000000..35c661e161
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cy.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/cz.gif b/lms/askbot/skins/common/media/images/flags/cz.gif
new file mode 100755
index 0000000000..0a605e581d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/cz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/de.gif b/lms/askbot/skins/common/media/images/flags/de.gif
new file mode 100755
index 0000000000..75728ddf21
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/de.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/dj.gif b/lms/askbot/skins/common/media/images/flags/dj.gif
new file mode 100755
index 0000000000..212406d973
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/dj.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/dk.gif b/lms/askbot/skins/common/media/images/flags/dk.gif
new file mode 100755
index 0000000000..03e75bd297
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/dk.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/dm.gif b/lms/askbot/skins/common/media/images/flags/dm.gif
new file mode 100755
index 0000000000..2f87f3ca6a
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/dm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/do.gif b/lms/askbot/skins/common/media/images/flags/do.gif
new file mode 100755
index 0000000000..f7d0bad39e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/do.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/dz.gif b/lms/askbot/skins/common/media/images/flags/dz.gif
new file mode 100755
index 0000000000..ed580a7cec
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/dz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ec.gif b/lms/askbot/skins/common/media/images/flags/ec.gif
new file mode 100755
index 0000000000..9e41e0ec8c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ec.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ee.gif b/lms/askbot/skins/common/media/images/flags/ee.gif
new file mode 100755
index 0000000000..9397a2d084
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ee.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/eg.gif b/lms/askbot/skins/common/media/images/flags/eg.gif
new file mode 100755
index 0000000000..6857c7dd57
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/eg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/eh.gif b/lms/askbot/skins/common/media/images/flags/eh.gif
new file mode 100755
index 0000000000..dd0391c280
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/eh.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/england.gif b/lms/askbot/skins/common/media/images/flags/england.gif
new file mode 100755
index 0000000000..933a4f0b3d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/england.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/er.gif b/lms/askbot/skins/common/media/images/flags/er.gif
new file mode 100755
index 0000000000..3d4d612c77
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/er.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/es.gif b/lms/askbot/skins/common/media/images/flags/es.gif
new file mode 100755
index 0000000000..c27d65e5f1
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/es.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/et.gif b/lms/askbot/skins/common/media/images/flags/et.gif
new file mode 100755
index 0000000000..f77995d0ab
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/et.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/europeanunion.gif b/lms/askbot/skins/common/media/images/flags/europeanunion.gif
new file mode 100644
index 0000000000..28a762a59c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/europeanunion.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/fam.gif b/lms/askbot/skins/common/media/images/flags/fam.gif
new file mode 100755
index 0000000000..7d528852dc
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/fam.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/fi.gif b/lms/askbot/skins/common/media/images/flags/fi.gif
new file mode 100755
index 0000000000..8d3a191828
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/fi.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/fj.gif b/lms/askbot/skins/common/media/images/flags/fj.gif
new file mode 100755
index 0000000000..486151cb8d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/fj.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/fk.gif b/lms/askbot/skins/common/media/images/flags/fk.gif
new file mode 100755
index 0000000000..37b5ecf303
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/fk.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/fm.gif b/lms/askbot/skins/common/media/images/flags/fm.gif
new file mode 100755
index 0000000000..7f8723b7da
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/fm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/fo.gif b/lms/askbot/skins/common/media/images/flags/fo.gif
new file mode 100755
index 0000000000..4a90fc043d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/fo.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/fr.gif b/lms/askbot/skins/common/media/images/flags/fr.gif
new file mode 100755
index 0000000000..43d0b80172
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/fr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ga.gif b/lms/askbot/skins/common/media/images/flags/ga.gif
new file mode 100755
index 0000000000..23fd5f0d2d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ga.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gb.gif b/lms/askbot/skins/common/media/images/flags/gb.gif
new file mode 100644
index 0000000000..3c6bce15c4
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gb.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gd.gif b/lms/askbot/skins/common/media/images/flags/gd.gif
new file mode 100755
index 0000000000..25ea312318
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gd.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ge.gif b/lms/askbot/skins/common/media/images/flags/ge.gif
new file mode 100755
index 0000000000..faa7f126a7
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ge.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gf.gif b/lms/askbot/skins/common/media/images/flags/gf.gif
new file mode 100755
index 0000000000..43d0b80172
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gf.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gh.gif b/lms/askbot/skins/common/media/images/flags/gh.gif
new file mode 100755
index 0000000000..273fb7d1a9
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gh.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gi.gif b/lms/askbot/skins/common/media/images/flags/gi.gif
new file mode 100755
index 0000000000..7b1984bc69
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gi.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gl.gif b/lms/askbot/skins/common/media/images/flags/gl.gif
new file mode 100755
index 0000000000..ef445be003
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gl.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gm.gif b/lms/askbot/skins/common/media/images/flags/gm.gif
new file mode 100755
index 0000000000..6847c5a8c0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gn.gif b/lms/askbot/skins/common/media/images/flags/gn.gif
new file mode 100755
index 0000000000..a982ac6f56
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gp.gif b/lms/askbot/skins/common/media/images/flags/gp.gif
new file mode 100755
index 0000000000..31166db665
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gp.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gq.gif b/lms/askbot/skins/common/media/images/flags/gq.gif
new file mode 100755
index 0000000000..8b4e0cc41e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gq.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gr.gif b/lms/askbot/skins/common/media/images/flags/gr.gif
new file mode 100755
index 0000000000..b4c8c04e53
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gs.gif b/lms/askbot/skins/common/media/images/flags/gs.gif
new file mode 100755
index 0000000000..ccc96ec009
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gs.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gt.gif b/lms/askbot/skins/common/media/images/flags/gt.gif
new file mode 100755
index 0000000000..7e94d1dda0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gt.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gu.gif b/lms/askbot/skins/common/media/images/flags/gu.gif
new file mode 100755
index 0000000000..eafef683d5
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gu.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gw.gif b/lms/askbot/skins/common/media/images/flags/gw.gif
new file mode 100755
index 0000000000..55f7571150
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gw.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/gy.gif b/lms/askbot/skins/common/media/images/flags/gy.gif
new file mode 100755
index 0000000000..1cb4cd71d6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/gy.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/hk.gif b/lms/askbot/skins/common/media/images/flags/hk.gif
new file mode 100755
index 0000000000..798af96da8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/hk.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/hm.gif b/lms/askbot/skins/common/media/images/flags/hm.gif
new file mode 100755
index 0000000000..5269c6a0e0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/hm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/hn.gif b/lms/askbot/skins/common/media/images/flags/hn.gif
new file mode 100755
index 0000000000..6c4ffe8e84
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/hn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/hr.gif b/lms/askbot/skins/common/media/images/flags/hr.gif
new file mode 100755
index 0000000000..557c660202
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/hr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ht.gif b/lms/askbot/skins/common/media/images/flags/ht.gif
new file mode 100755
index 0000000000..059604ab20
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ht.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/hu.gif b/lms/askbot/skins/common/media/images/flags/hu.gif
new file mode 100755
index 0000000000..6142d86817
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/hu.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/id.gif b/lms/askbot/skins/common/media/images/flags/id.gif
new file mode 100755
index 0000000000..865161b030
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/id.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ie.gif b/lms/askbot/skins/common/media/images/flags/ie.gif
new file mode 100755
index 0000000000..506ad28590
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ie.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/il.gif b/lms/askbot/skins/common/media/images/flags/il.gif
new file mode 100755
index 0000000000..c8483ae52f
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/il.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/in.gif b/lms/askbot/skins/common/media/images/flags/in.gif
new file mode 100755
index 0000000000..1cd80272e8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/in.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/io.gif b/lms/askbot/skins/common/media/images/flags/io.gif
new file mode 100755
index 0000000000..de7e7ab385
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/io.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/iq.gif b/lms/askbot/skins/common/media/images/flags/iq.gif
new file mode 100755
index 0000000000..c34fe3c44a
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/iq.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ir.gif b/lms/askbot/skins/common/media/images/flags/ir.gif
new file mode 100755
index 0000000000..156040fc57
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ir.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/is.gif b/lms/askbot/skins/common/media/images/flags/is.gif
new file mode 100755
index 0000000000..b42502de4b
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/is.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/it.gif b/lms/askbot/skins/common/media/images/flags/it.gif
new file mode 100755
index 0000000000..d79e90e99e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/it.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/jm.gif b/lms/askbot/skins/common/media/images/flags/jm.gif
new file mode 100755
index 0000000000..0bed67c239
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/jm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/jo.gif b/lms/askbot/skins/common/media/images/flags/jo.gif
new file mode 100755
index 0000000000..03daf8af67
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/jo.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/jp.gif b/lms/askbot/skins/common/media/images/flags/jp.gif
new file mode 100755
index 0000000000..444c1d05c5
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/jp.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ke.gif b/lms/askbot/skins/common/media/images/flags/ke.gif
new file mode 100755
index 0000000000..c2b5d45c43
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ke.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/kg.gif b/lms/askbot/skins/common/media/images/flags/kg.gif
new file mode 100755
index 0000000000..72a4d412c8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/kg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/kh.gif b/lms/askbot/skins/common/media/images/flags/kh.gif
new file mode 100755
index 0000000000..30a183158d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/kh.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ki.gif b/lms/askbot/skins/common/media/images/flags/ki.gif
new file mode 100755
index 0000000000..4a0751a221
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ki.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/km.gif b/lms/askbot/skins/common/media/images/flags/km.gif
new file mode 100755
index 0000000000..5859595e80
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/km.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/kn.gif b/lms/askbot/skins/common/media/images/flags/kn.gif
new file mode 100755
index 0000000000..bb9cc34a92
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/kn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/kp.gif b/lms/askbot/skins/common/media/images/flags/kp.gif
new file mode 100755
index 0000000000..6e0ca09e0b
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/kp.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/kr.gif b/lms/askbot/skins/common/media/images/flags/kr.gif
new file mode 100755
index 0000000000..1cddbe75b3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/kr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/kw.gif b/lms/askbot/skins/common/media/images/flags/kw.gif
new file mode 100755
index 0000000000..1efc7347ec
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/kw.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ky.gif b/lms/askbot/skins/common/media/images/flags/ky.gif
new file mode 100755
index 0000000000..d3d02ee4d3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ky.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/kz.gif b/lms/askbot/skins/common/media/images/flags/kz.gif
new file mode 100755
index 0000000000..24baebe05c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/kz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/la.gif b/lms/askbot/skins/common/media/images/flags/la.gif
new file mode 100755
index 0000000000..d14cf4d82c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/la.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/lb.gif b/lms/askbot/skins/common/media/images/flags/lb.gif
new file mode 100755
index 0000000000..003d83af5e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/lb.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/lc.gif b/lms/askbot/skins/common/media/images/flags/lc.gif
new file mode 100644
index 0000000000..f5fe5bffd2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/lc.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/li.gif b/lms/askbot/skins/common/media/images/flags/li.gif
new file mode 100755
index 0000000000..713c58e1df
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/li.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/lk.gif b/lms/askbot/skins/common/media/images/flags/lk.gif
new file mode 100755
index 0000000000..1b3ee7f572
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/lk.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/lr.gif b/lms/askbot/skins/common/media/images/flags/lr.gif
new file mode 100755
index 0000000000..435af9e506
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/lr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ls.gif b/lms/askbot/skins/common/media/images/flags/ls.gif
new file mode 100755
index 0000000000..427ae957e5
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ls.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/lt.gif b/lms/askbot/skins/common/media/images/flags/lt.gif
new file mode 100755
index 0000000000..dee9c601ad
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/lt.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/lu.gif b/lms/askbot/skins/common/media/images/flags/lu.gif
new file mode 100755
index 0000000000..7d7293edd6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/lu.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/lv.gif b/lms/askbot/skins/common/media/images/flags/lv.gif
new file mode 100755
index 0000000000..17e71b7eb6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/lv.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ly.gif b/lms/askbot/skins/common/media/images/flags/ly.gif
new file mode 100755
index 0000000000..a654c30afa
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ly.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ma.gif b/lms/askbot/skins/common/media/images/flags/ma.gif
new file mode 100755
index 0000000000..fc784119d3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ma.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mc.gif b/lms/askbot/skins/common/media/images/flags/mc.gif
new file mode 100755
index 0000000000..02a7c8e1bd
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mc.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/md.gif b/lms/askbot/skins/common/media/images/flags/md.gif
new file mode 100755
index 0000000000..e4b8a7e3f6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/md.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/me.gif b/lms/askbot/skins/common/media/images/flags/me.gif
new file mode 100644
index 0000000000..a260453c2f
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/me.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mg.gif b/lms/askbot/skins/common/media/images/flags/mg.gif
new file mode 100755
index 0000000000..a91b577d13
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mh.gif b/lms/askbot/skins/common/media/images/flags/mh.gif
new file mode 100755
index 0000000000..92f5f485c3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mh.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mk.gif b/lms/askbot/skins/common/media/images/flags/mk.gif
new file mode 100755
index 0000000000..7aeb8311b2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mk.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ml.gif b/lms/askbot/skins/common/media/images/flags/ml.gif
new file mode 100755
index 0000000000..53d6f490c1
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ml.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mm.gif b/lms/askbot/skins/common/media/images/flags/mm.gif
new file mode 100755
index 0000000000..9e0a2756d2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mn.gif b/lms/askbot/skins/common/media/images/flags/mn.gif
new file mode 100755
index 0000000000..dff8ea5a63
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mo.gif b/lms/askbot/skins/common/media/images/flags/mo.gif
new file mode 100755
index 0000000000..66cf5b4f05
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mo.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mp.gif b/lms/askbot/skins/common/media/images/flags/mp.gif
new file mode 100755
index 0000000000..73b7147e9c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mp.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mq.gif b/lms/askbot/skins/common/media/images/flags/mq.gif
new file mode 100755
index 0000000000..570bc5dd18
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mq.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mr.gif b/lms/askbot/skins/common/media/images/flags/mr.gif
new file mode 100755
index 0000000000..f52fcf0933
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ms.gif b/lms/askbot/skins/common/media/images/flags/ms.gif
new file mode 100755
index 0000000000..5e5a67aa88
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ms.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mt.gif b/lms/askbot/skins/common/media/images/flags/mt.gif
new file mode 100755
index 0000000000..45c709f2bc
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mt.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mu.gif b/lms/askbot/skins/common/media/images/flags/mu.gif
new file mode 100755
index 0000000000..081ab45336
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mu.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mv.gif b/lms/askbot/skins/common/media/images/flags/mv.gif
new file mode 100755
index 0000000000..46b63875b1
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mv.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mw.gif b/lms/askbot/skins/common/media/images/flags/mw.gif
new file mode 100755
index 0000000000..ad045a09c1
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mw.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mx.gif b/lms/askbot/skins/common/media/images/flags/mx.gif
new file mode 100755
index 0000000000..ddc75d04d8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mx.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/my.gif b/lms/askbot/skins/common/media/images/flags/my.gif
new file mode 100755
index 0000000000..fc7d523614
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/my.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/mz.gif b/lms/askbot/skins/common/media/images/flags/mz.gif
new file mode 100755
index 0000000000..7d635082a6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/mz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/na.gif b/lms/askbot/skins/common/media/images/flags/na.gif
new file mode 100755
index 0000000000..c0babe7231
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/na.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/nc.gif b/lms/askbot/skins/common/media/images/flags/nc.gif
new file mode 100755
index 0000000000..b1e91b9a80
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/nc.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ne.gif b/lms/askbot/skins/common/media/images/flags/ne.gif
new file mode 100755
index 0000000000..ff4eaf074e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ne.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/nf.gif b/lms/askbot/skins/common/media/images/flags/nf.gif
new file mode 100755
index 0000000000..c83424c2c3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/nf.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ng.gif b/lms/askbot/skins/common/media/images/flags/ng.gif
new file mode 100755
index 0000000000..bdde7cb3bf
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ng.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ni.gif b/lms/askbot/skins/common/media/images/flags/ni.gif
new file mode 100755
index 0000000000..d05894d0cb
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ni.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/nl.gif b/lms/askbot/skins/common/media/images/flags/nl.gif
new file mode 100755
index 0000000000..c1c8f46d0c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/nl.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/no.gif b/lms/askbot/skins/common/media/images/flags/no.gif
new file mode 100755
index 0000000000..6202d1f3a2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/no.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/np.gif b/lms/askbot/skins/common/media/images/flags/np.gif
new file mode 100755
index 0000000000..1096893a70
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/np.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/nr.gif b/lms/askbot/skins/common/media/images/flags/nr.gif
new file mode 100755
index 0000000000..2e4c0c5cad
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/nr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/nu.gif b/lms/askbot/skins/common/media/images/flags/nu.gif
new file mode 100755
index 0000000000..618210a755
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/nu.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/nz.gif b/lms/askbot/skins/common/media/images/flags/nz.gif
new file mode 100755
index 0000000000..028a5dc6e4
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/nz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/om.gif b/lms/askbot/skins/common/media/images/flags/om.gif
new file mode 100755
index 0000000000..2b8c77501d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/om.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pa.gif b/lms/askbot/skins/common/media/images/flags/pa.gif
new file mode 100755
index 0000000000..d518b2f978
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pa.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pe.gif b/lms/askbot/skins/common/media/images/flags/pe.gif
new file mode 100755
index 0000000000..3bc7639057
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pe.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pf.gif b/lms/askbot/skins/common/media/images/flags/pf.gif
new file mode 100755
index 0000000000..849297a570
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pf.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pg.gif b/lms/askbot/skins/common/media/images/flags/pg.gif
new file mode 100755
index 0000000000..2d20b07856
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ph.gif b/lms/askbot/skins/common/media/images/flags/ph.gif
new file mode 100755
index 0000000000..12b380acd3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ph.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pk.gif b/lms/askbot/skins/common/media/images/flags/pk.gif
new file mode 100755
index 0000000000..f3f62c2ebc
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pk.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pl.gif b/lms/askbot/skins/common/media/images/flags/pl.gif
new file mode 100755
index 0000000000..bf10646366
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pl.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pm.gif b/lms/askbot/skins/common/media/images/flags/pm.gif
new file mode 100755
index 0000000000..99bf6fdb60
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pn.gif b/lms/askbot/skins/common/media/images/flags/pn.gif
new file mode 100755
index 0000000000..4bc86a1d86
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pr.gif b/lms/askbot/skins/common/media/images/flags/pr.gif
new file mode 100755
index 0000000000..6d5d589670
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ps.gif b/lms/askbot/skins/common/media/images/flags/ps.gif
new file mode 100755
index 0000000000..6afa3b718c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ps.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pt.gif b/lms/askbot/skins/common/media/images/flags/pt.gif
new file mode 100755
index 0000000000..e735f740e1
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pt.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/pw.gif b/lms/askbot/skins/common/media/images/flags/pw.gif
new file mode 100755
index 0000000000..5854510fa9
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/pw.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/py.gif b/lms/askbot/skins/common/media/images/flags/py.gif
new file mode 100755
index 0000000000..f2e66af75d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/py.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/qa.gif b/lms/askbot/skins/common/media/images/flags/qa.gif
new file mode 100755
index 0000000000..2e843ff9eb
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/qa.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/re.gif b/lms/askbot/skins/common/media/images/flags/re.gif
new file mode 100755
index 0000000000..43d0b80172
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/re.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ro.gif b/lms/askbot/skins/common/media/images/flags/ro.gif
new file mode 100755
index 0000000000..f5d5f125b8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ro.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/rs.gif b/lms/askbot/skins/common/media/images/flags/rs.gif
new file mode 100644
index 0000000000..3bd1fb2fd8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/rs.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ru.gif b/lms/askbot/skins/common/media/images/flags/ru.gif
new file mode 100755
index 0000000000..b525c46233
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ru.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/rw.gif b/lms/askbot/skins/common/media/images/flags/rw.gif
new file mode 100755
index 0000000000..0d095f7aed
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/rw.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sa.gif b/lms/askbot/skins/common/media/images/flags/sa.gif
new file mode 100755
index 0000000000..179961b692
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sa.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sb.gif b/lms/askbot/skins/common/media/images/flags/sb.gif
new file mode 100755
index 0000000000..8f5ff837fe
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sb.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sc.gif b/lms/askbot/skins/common/media/images/flags/sc.gif
new file mode 100755
index 0000000000..31b47677e0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sc.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/scotland.gif b/lms/askbot/skins/common/media/images/flags/scotland.gif
new file mode 100755
index 0000000000..03f3f1de2c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/scotland.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sd.gif b/lms/askbot/skins/common/media/images/flags/sd.gif
new file mode 100755
index 0000000000..53ae214fa1
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sd.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/se.gif b/lms/askbot/skins/common/media/images/flags/se.gif
new file mode 100755
index 0000000000..80f6285228
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/se.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sg.gif b/lms/askbot/skins/common/media/images/flags/sg.gif
new file mode 100755
index 0000000000..5663d39f86
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sh.gif b/lms/askbot/skins/common/media/images/flags/sh.gif
new file mode 100755
index 0000000000..dcc7f3bcff
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sh.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/si.gif b/lms/askbot/skins/common/media/images/flags/si.gif
new file mode 100755
index 0000000000..23852b50e3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/si.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sj.gif b/lms/askbot/skins/common/media/images/flags/sj.gif
new file mode 100755
index 0000000000..6202d1f3a2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sj.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sk.gif b/lms/askbot/skins/common/media/images/flags/sk.gif
new file mode 100755
index 0000000000..1b3f22baf9
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sk.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sl.gif b/lms/askbot/skins/common/media/images/flags/sl.gif
new file mode 100755
index 0000000000..f0f34923dc
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sl.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sm.gif b/lms/askbot/skins/common/media/images/flags/sm.gif
new file mode 100755
index 0000000000..04d98de5a5
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sn.gif b/lms/askbot/skins/common/media/images/flags/sn.gif
new file mode 100755
index 0000000000..6dac8709d4
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/so.gif b/lms/askbot/skins/common/media/images/flags/so.gif
new file mode 100755
index 0000000000..f1961694ab
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/so.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sr.gif b/lms/askbot/skins/common/media/images/flags/sr.gif
new file mode 100755
index 0000000000..0f7499ad95
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/st.gif b/lms/askbot/skins/common/media/images/flags/st.gif
new file mode 100755
index 0000000000..4f1e6e092b
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/st.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sv.gif b/lms/askbot/skins/common/media/images/flags/sv.gif
new file mode 100755
index 0000000000..2d7b159a12
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sv.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sy.gif b/lms/askbot/skins/common/media/images/flags/sy.gif
new file mode 100755
index 0000000000..dc8bd50948
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sy.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/sz.gif b/lms/askbot/skins/common/media/images/flags/sz.gif
new file mode 100755
index 0000000000..f37aaf8011
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/sz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tc.gif b/lms/askbot/skins/common/media/images/flags/tc.gif
new file mode 100755
index 0000000000..11a8c232fc
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tc.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/td.gif b/lms/askbot/skins/common/media/images/flags/td.gif
new file mode 100755
index 0000000000..7aa8a10dfc
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/td.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tf.gif b/lms/askbot/skins/common/media/images/flags/tf.gif
new file mode 100755
index 0000000000..51a4325096
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tf.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tg.gif b/lms/askbot/skins/common/media/images/flags/tg.gif
new file mode 100755
index 0000000000..ca6b4e7744
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/th.gif b/lms/askbot/skins/common/media/images/flags/th.gif
new file mode 100755
index 0000000000..0130792409
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/th.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tj.gif b/lms/askbot/skins/common/media/images/flags/tj.gif
new file mode 100755
index 0000000000..2fe38d4ab9
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tj.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tk.gif b/lms/askbot/skins/common/media/images/flags/tk.gif
new file mode 100755
index 0000000000..3d3a727fde
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tk.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tl.gif b/lms/askbot/skins/common/media/images/flags/tl.gif
new file mode 100755
index 0000000000..df22d58239
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tl.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tm.gif b/lms/askbot/skins/common/media/images/flags/tm.gif
new file mode 100755
index 0000000000..36d0994fb9
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tn.gif b/lms/askbot/skins/common/media/images/flags/tn.gif
new file mode 100755
index 0000000000..917d4288c9
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/to.gif b/lms/askbot/skins/common/media/images/flags/to.gif
new file mode 100755
index 0000000000..d7ed4d1164
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/to.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tr.gif b/lms/askbot/skins/common/media/images/flags/tr.gif
new file mode 100755
index 0000000000..e407d553d2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tr.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tt.gif b/lms/askbot/skins/common/media/images/flags/tt.gif
new file mode 100755
index 0000000000..47d3b806b5
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tt.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tv.gif b/lms/askbot/skins/common/media/images/flags/tv.gif
new file mode 100755
index 0000000000..3c33827789
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tv.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tw.gif b/lms/askbot/skins/common/media/images/flags/tw.gif
new file mode 100755
index 0000000000..cacfd9b7aa
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tw.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/tz.gif b/lms/askbot/skins/common/media/images/flags/tz.gif
new file mode 100755
index 0000000000..82b52ca298
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/tz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ua.gif b/lms/askbot/skins/common/media/images/flags/ua.gif
new file mode 100755
index 0000000000..5d6cd83f59
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ua.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ug.gif b/lms/askbot/skins/common/media/images/flags/ug.gif
new file mode 100755
index 0000000000..58b731ad5c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ug.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/um.gif b/lms/askbot/skins/common/media/images/flags/um.gif
new file mode 100755
index 0000000000..3b4c848393
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/um.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/us.gif b/lms/askbot/skins/common/media/images/flags/us.gif
new file mode 100755
index 0000000000..8f198f73a7
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/us.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/uy.gif b/lms/askbot/skins/common/media/images/flags/uy.gif
new file mode 100755
index 0000000000..12848c7413
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/uy.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/uz.gif b/lms/askbot/skins/common/media/images/flags/uz.gif
new file mode 100755
index 0000000000..dc9daecaa8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/uz.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/va.gif b/lms/askbot/skins/common/media/images/flags/va.gif
new file mode 100755
index 0000000000..2bd74468d6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/va.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/vc.gif b/lms/askbot/skins/common/media/images/flags/vc.gif
new file mode 100755
index 0000000000..48213816af
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/vc.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ve.gif b/lms/askbot/skins/common/media/images/flags/ve.gif
new file mode 100755
index 0000000000..19ce6c1466
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ve.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/vg.gif b/lms/askbot/skins/common/media/images/flags/vg.gif
new file mode 100755
index 0000000000..1fc0f96eed
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/vg.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/vi.gif b/lms/askbot/skins/common/media/images/flags/vi.gif
new file mode 100755
index 0000000000..66f9e746b6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/vi.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/vn.gif b/lms/askbot/skins/common/media/images/flags/vn.gif
new file mode 100755
index 0000000000..f1e20c9412
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/vn.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/vu.gif b/lms/askbot/skins/common/media/images/flags/vu.gif
new file mode 100755
index 0000000000..8a8b2b065f
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/vu.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/wales.gif b/lms/askbot/skins/common/media/images/flags/wales.gif
new file mode 100755
index 0000000000..901d17507d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/wales.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/wf.gif b/lms/askbot/skins/common/media/images/flags/wf.gif
new file mode 100755
index 0000000000..eaa954b136
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/wf.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ws.gif b/lms/askbot/skins/common/media/images/flags/ws.gif
new file mode 100755
index 0000000000..a51f939ede
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ws.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/ye.gif b/lms/askbot/skins/common/media/images/flags/ye.gif
new file mode 100755
index 0000000000..7b0183d0e1
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/ye.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/yt.gif b/lms/askbot/skins/common/media/images/flags/yt.gif
new file mode 100755
index 0000000000..a2267c0546
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/yt.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/za.gif b/lms/askbot/skins/common/media/images/flags/za.gif
new file mode 100755
index 0000000000..ede5258919
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/za.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/zm.gif b/lms/askbot/skins/common/media/images/flags/zm.gif
new file mode 100755
index 0000000000..b2851d2b40
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/zm.gif differ
diff --git a/lms/askbot/skins/common/media/images/flags/zw.gif b/lms/askbot/skins/common/media/images/flags/zw.gif
new file mode 100755
index 0000000000..02901f627d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/flags/zw.gif differ
diff --git a/lms/askbot/skins/common/media/images/go-up-grey.png b/lms/askbot/skins/common/media/images/go-up-grey.png
new file mode 100644
index 0000000000..763bb799ed
Binary files /dev/null and b/lms/askbot/skins/common/media/images/go-up-grey.png differ
diff --git a/lms/askbot/skins/common/media/images/go-up-orange.png b/lms/askbot/skins/common/media/images/go-up-orange.png
new file mode 100644
index 0000000000..eca3579d35
Binary files /dev/null and b/lms/askbot/skins/common/media/images/go-up-orange.png differ
diff --git a/lms/askbot/skins/common/media/images/gray-up-arrow-h18px.png b/lms/askbot/skins/common/media/images/gray-up-arrow-h18px.png
new file mode 100755
index 0000000000..78767445ec
Binary files /dev/null and b/lms/askbot/skins/common/media/images/gray-up-arrow-h18px.png differ
diff --git a/lms/askbot/skins/common/media/images/grippie.png b/lms/askbot/skins/common/media/images/grippie.png
new file mode 100755
index 0000000000..6524d4167d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/grippie.png differ
diff --git a/lms/askbot/skins/common/media/images/indicator.gif b/lms/askbot/skins/common/media/images/indicator.gif
new file mode 100755
index 0000000000..1c72ebb554
Binary files /dev/null and b/lms/askbot/skins/common/media/images/indicator.gif differ
diff --git a/lms/askbot/skins/common/media/images/logo.gif b/lms/askbot/skins/common/media/images/logo.gif
new file mode 100644
index 0000000000..ac4ceda66e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/logo.gif differ
diff --git a/lms/askbot/skins/common/media/images/logo.png b/lms/askbot/skins/common/media/images/logo.png
new file mode 100644
index 0000000000..10559161a3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/logo.png differ
diff --git a/lms/askbot/skins/common/media/images/logo1.png b/lms/askbot/skins/common/media/images/logo1.png
new file mode 100755
index 0000000000..d79a627174
Binary files /dev/null and b/lms/askbot/skins/common/media/images/logo1.png differ
diff --git a/lms/askbot/skins/common/media/images/logo2.png b/lms/askbot/skins/common/media/images/logo2.png
new file mode 100755
index 0000000000..bd3cccd9f4
Binary files /dev/null and b/lms/askbot/skins/common/media/images/logo2.png differ
diff --git a/lms/askbot/skins/common/media/images/mail-envelope-empty.png b/lms/askbot/skins/common/media/images/mail-envelope-empty.png
new file mode 100644
index 0000000000..0fde87dc9d
Binary files /dev/null and b/lms/askbot/skins/common/media/images/mail-envelope-empty.png differ
diff --git a/lms/askbot/skins/common/media/images/mail-envelope-full.png b/lms/askbot/skins/common/media/images/mail-envelope-full.png
new file mode 100644
index 0000000000..2277e91977
Binary files /dev/null and b/lms/askbot/skins/common/media/images/mail-envelope-full.png differ
diff --git a/lms/askbot/skins/common/media/images/medala.gif b/lms/askbot/skins/common/media/images/medala.gif
new file mode 100755
index 0000000000..93dd1a3960
Binary files /dev/null and b/lms/askbot/skins/common/media/images/medala.gif differ
diff --git a/lms/askbot/skins/common/media/images/medala_on.gif b/lms/askbot/skins/common/media/images/medala_on.gif
new file mode 100755
index 0000000000..a18f9e8562
Binary files /dev/null and b/lms/askbot/skins/common/media/images/medala_on.gif differ
diff --git a/lms/askbot/skins/common/media/images/new.gif b/lms/askbot/skins/common/media/images/new.gif
new file mode 100755
index 0000000000..8a220b5312
Binary files /dev/null and b/lms/askbot/skins/common/media/images/new.gif differ
diff --git a/lms/askbot/skins/common/media/images/nophoto.png b/lms/askbot/skins/common/media/images/nophoto.png
new file mode 100755
index 0000000000..2daf0ffd43
Binary files /dev/null and b/lms/askbot/skins/common/media/images/nophoto.png differ
diff --git a/lms/askbot/skins/common/media/images/openid.gif b/lms/askbot/skins/common/media/images/openid.gif
new file mode 100755
index 0000000000..8540e12bcd
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid.gif differ
diff --git a/lms/askbot/skins/common/media/images/openid/aol.gif b/lms/askbot/skins/common/media/images/openid/aol.gif
new file mode 100755
index 0000000000..decc4f1236
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/aol.gif differ
diff --git a/lms/askbot/skins/common/media/images/openid/blogger.ico b/lms/askbot/skins/common/media/images/openid/blogger.ico
new file mode 100755
index 0000000000..1b9730b01c
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/blogger.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/claimid.ico b/lms/askbot/skins/common/media/images/openid/claimid.ico
new file mode 100755
index 0000000000..2b80f49183
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/claimid.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/facebook.gif b/lms/askbot/skins/common/media/images/openid/facebook.gif
new file mode 100755
index 0000000000..b997b358f7
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/facebook.gif differ
diff --git a/lms/askbot/skins/common/media/images/openid/flickr.ico b/lms/askbot/skins/common/media/images/openid/flickr.ico
new file mode 100755
index 0000000000..11f6e07f68
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/flickr.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/google.gif b/lms/askbot/skins/common/media/images/openid/google.gif
new file mode 100755
index 0000000000..1b6cd07bd8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/google.gif differ
diff --git a/lms/askbot/skins/common/media/images/openid/livejournal.ico b/lms/askbot/skins/common/media/images/openid/livejournal.ico
new file mode 100755
index 0000000000..f3d21ec5e8
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/livejournal.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/myopenid.ico b/lms/askbot/skins/common/media/images/openid/myopenid.ico
new file mode 100755
index 0000000000..ceb06e6a3f
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/myopenid.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/openid-inputicon.gif b/lms/askbot/skins/common/media/images/openid/openid-inputicon.gif
new file mode 100755
index 0000000000..cde836c893
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/openid-inputicon.gif differ
diff --git a/lms/askbot/skins/common/media/images/openid/openid.gif b/lms/askbot/skins/common/media/images/openid/openid.gif
new file mode 100755
index 0000000000..c718b0e6f3
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/openid.gif differ
diff --git a/lms/askbot/skins/common/media/images/openid/technorati.ico b/lms/askbot/skins/common/media/images/openid/technorati.ico
new file mode 100755
index 0000000000..fa1083c116
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/technorati.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/twitter.png b/lms/askbot/skins/common/media/images/openid/twitter.png
new file mode 100755
index 0000000000..9a6552d184
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/twitter.png differ
diff --git a/lms/askbot/skins/common/media/images/openid/verisign.ico b/lms/askbot/skins/common/media/images/openid/verisign.ico
new file mode 100755
index 0000000000..3953af9319
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/verisign.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/vidoop.ico b/lms/askbot/skins/common/media/images/openid/vidoop.ico
new file mode 100755
index 0000000000..bbd9a0d50f
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/vidoop.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/wordpress.ico b/lms/askbot/skins/common/media/images/openid/wordpress.ico
new file mode 100755
index 0000000000..31b7d2c2b7
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/wordpress.ico differ
diff --git a/lms/askbot/skins/common/media/images/openid/yahoo.gif b/lms/askbot/skins/common/media/images/openid/yahoo.gif
new file mode 100755
index 0000000000..0f0eb8efe7
Binary files /dev/null and b/lms/askbot/skins/common/media/images/openid/yahoo.gif differ
diff --git a/lms/askbot/skins/common/media/images/print.png b/lms/askbot/skins/common/media/images/print.png
new file mode 100644
index 0000000000..37bf88afb2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/print.png differ
diff --git a/lms/askbot/skins/common/media/images/pw-login.gif b/lms/askbot/skins/common/media/images/pw-login.gif
new file mode 100644
index 0000000000..f88b1bcf0b
Binary files /dev/null and b/lms/askbot/skins/common/media/images/pw-login.gif differ
diff --git a/lms/askbot/skins/common/media/images/quest-bg.gif b/lms/askbot/skins/common/media/images/quest-bg.gif
new file mode 100755
index 0000000000..b754023882
Binary files /dev/null and b/lms/askbot/skins/common/media/images/quest-bg.gif differ
diff --git a/lms/askbot/skins/common/media/images/scopearrow.png b/lms/askbot/skins/common/media/images/scopearrow.png
new file mode 100644
index 0000000000..73dc674452
Binary files /dev/null and b/lms/askbot/skins/common/media/images/scopearrow.png differ
diff --git a/lms/askbot/skins/common/media/images/sprite.png b/lms/askbot/skins/common/media/images/sprite.png
new file mode 100644
index 0000000000..1a0fbc78df
Binary files /dev/null and b/lms/askbot/skins/common/media/images/sprite.png differ
diff --git a/lms/askbot/skins/common/media/images/sprites.png b/lms/askbot/skins/common/media/images/sprites.png
new file mode 100644
index 0000000000..e7244673e6
Binary files /dev/null and b/lms/askbot/skins/common/media/images/sprites.png differ
diff --git a/lms/askbot/skins/common/media/images/sprites_source/sprites.svg b/lms/askbot/skins/common/media/images/sprites_source/sprites.svg
new file mode 100644
index 0000000000..34898e3037
--- /dev/null
+++ b/lms/askbot/skins/common/media/images/sprites_source/sprites.svg
@@ -0,0 +1,732 @@
+
+
+
+
diff --git a/lms/askbot/skins/common/media/images/summary-background.png b/lms/askbot/skins/common/media/images/summary-background.png
new file mode 100644
index 0000000000..58c3855abb
Binary files /dev/null and b/lms/askbot/skins/common/media/images/summary-background.png differ
diff --git a/lms/askbot/skins/common/media/images/tag-left.png b/lms/askbot/skins/common/media/images/tag-left.png
new file mode 100644
index 0000000000..5a9d8a0d38
Binary files /dev/null and b/lms/askbot/skins/common/media/images/tag-left.png differ
diff --git a/lms/askbot/skins/common/media/images/tag-right.png b/lms/askbot/skins/common/media/images/tag-right.png
new file mode 100644
index 0000000000..871664c301
Binary files /dev/null and b/lms/askbot/skins/common/media/images/tag-right.png differ
diff --git a/lms/askbot/skins/common/media/images/vote-accepted-on.png b/lms/askbot/skins/common/media/images/vote-accepted-on.png
new file mode 100755
index 0000000000..2026f3bcc5
Binary files /dev/null and b/lms/askbot/skins/common/media/images/vote-accepted-on.png differ
diff --git a/lms/askbot/skins/common/media/images/vote-accepted.png b/lms/askbot/skins/common/media/images/vote-accepted.png
new file mode 100755
index 0000000000..ecd185515a
Binary files /dev/null and b/lms/askbot/skins/common/media/images/vote-accepted.png differ
diff --git a/lms/askbot/skins/common/media/images/vote-arrow-down-on.png b/lms/askbot/skins/common/media/images/vote-arrow-down-on.png
new file mode 100755
index 0000000000..048dbb44dc
Binary files /dev/null and b/lms/askbot/skins/common/media/images/vote-arrow-down-on.png differ
diff --git a/lms/askbot/skins/common/media/images/vote-arrow-down.png b/lms/askbot/skins/common/media/images/vote-arrow-down.png
new file mode 100755
index 0000000000..e4fdec0ab0
Binary files /dev/null and b/lms/askbot/skins/common/media/images/vote-arrow-down.png differ
diff --git a/lms/askbot/skins/common/media/images/vote-arrow-up-on.png b/lms/askbot/skins/common/media/images/vote-arrow-up-on.png
new file mode 100755
index 0000000000..56ad0c2591
Binary files /dev/null and b/lms/askbot/skins/common/media/images/vote-arrow-up-on.png differ
diff --git a/lms/askbot/skins/common/media/images/vote-arrow-up.png b/lms/askbot/skins/common/media/images/vote-arrow-up.png
new file mode 100755
index 0000000000..6e9a51c7df
Binary files /dev/null and b/lms/askbot/skins/common/media/images/vote-arrow-up.png differ
diff --git a/lms/askbot/skins/common/media/images/vote-favorite-off.png b/lms/askbot/skins/common/media/images/vote-favorite-off.png
new file mode 100755
index 0000000000..c1bef0745e
Binary files /dev/null and b/lms/askbot/skins/common/media/images/vote-favorite-off.png differ
diff --git a/lms/askbot/skins/common/media/images/vote-favorite-on.png b/lms/askbot/skins/common/media/images/vote-favorite-on.png
new file mode 100755
index 0000000000..1f9c14ab08
Binary files /dev/null and b/lms/askbot/skins/common/media/images/vote-favorite-on.png differ
diff --git a/lms/askbot/skins/common/media/images/wiki.png b/lms/askbot/skins/common/media/images/wiki.png
new file mode 100644
index 0000000000..06d487f3e2
Binary files /dev/null and b/lms/askbot/skins/common/media/images/wiki.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/aol.gif b/lms/askbot/skins/common/media/jquery-openid/images/aol.gif
new file mode 100755
index 0000000000..24d1e152c9
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/aol.gif differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/blogger-1.png b/lms/askbot/skins/common/media/jquery-openid/images/blogger-1.png
new file mode 100755
index 0000000000..8b360ea562
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/blogger-1.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/blogger.ico b/lms/askbot/skins/common/media/jquery-openid/images/blogger.ico
new file mode 100755
index 0000000000..1b9730b01c
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/blogger.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/claimid-0.png b/lms/askbot/skins/common/media/jquery-openid/images/claimid-0.png
new file mode 100755
index 0000000000..4a0ea1b35a
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/claimid-0.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/claimid.ico b/lms/askbot/skins/common/media/jquery-openid/images/claimid.ico
new file mode 100755
index 0000000000..2b80f49183
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/claimid.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/facebook.gif b/lms/askbot/skins/common/media/jquery-openid/images/facebook.gif
new file mode 100755
index 0000000000..c558645522
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/facebook.gif differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/flickr.ico b/lms/askbot/skins/common/media/jquery-openid/images/flickr.ico
new file mode 100755
index 0000000000..11f6e07f68
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/flickr.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/flickr.png b/lms/askbot/skins/common/media/jquery-openid/images/flickr.png
new file mode 100755
index 0000000000..142405a6e6
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/flickr.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/google.gif b/lms/askbot/skins/common/media/jquery-openid/images/google.gif
new file mode 100755
index 0000000000..653953658f
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/google.gif differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/identica.png b/lms/askbot/skins/common/media/jquery-openid/images/identica.png
new file mode 100644
index 0000000000..2b607db163
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/identica.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/linkedin.gif b/lms/askbot/skins/common/media/jquery-openid/images/linkedin.gif
new file mode 100644
index 0000000000..36e049ac7f
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/linkedin.gif differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/livejournal-1.png b/lms/askbot/skins/common/media/jquery-openid/images/livejournal-1.png
new file mode 100755
index 0000000000..e643608186
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/livejournal-1.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/livejournal.ico b/lms/askbot/skins/common/media/jquery-openid/images/livejournal.ico
new file mode 100755
index 0000000000..f3d21ec5e8
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/livejournal.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/myopenid-2.png b/lms/askbot/skins/common/media/jquery-openid/images/myopenid-2.png
new file mode 100755
index 0000000000..f64fb8e81b
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/myopenid-2.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/myopenid.ico b/lms/askbot/skins/common/media/jquery-openid/images/myopenid.ico
new file mode 100755
index 0000000000..ceb06e6a3f
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/myopenid.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/openid-inputicon.gif b/lms/askbot/skins/common/media/jquery-openid/images/openid-inputicon.gif
new file mode 100755
index 0000000000..cde836c893
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/openid-inputicon.gif differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/openid.gif b/lms/askbot/skins/common/media/jquery-openid/images/openid.gif
new file mode 100755
index 0000000000..19eb7c6f68
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/openid.gif differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/openidico.png b/lms/askbot/skins/common/media/jquery-openid/images/openidico.png
new file mode 100755
index 0000000000..ab622669df
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/openidico.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/openidico16.png b/lms/askbot/skins/common/media/jquery-openid/images/openidico16.png
new file mode 100755
index 0000000000..ad718ac5a6
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/openidico16.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/technorati-1.png b/lms/askbot/skins/common/media/jquery-openid/images/technorati-1.png
new file mode 100755
index 0000000000..f719524034
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/technorati-1.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/technorati.ico b/lms/askbot/skins/common/media/jquery-openid/images/technorati.ico
new file mode 100755
index 0000000000..fa1083c116
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/technorati.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/twitter.gif b/lms/askbot/skins/common/media/jquery-openid/images/twitter.gif
new file mode 100644
index 0000000000..173cace1cb
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/twitter.gif differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/verisign-2.png b/lms/askbot/skins/common/media/jquery-openid/images/verisign-2.png
new file mode 100755
index 0000000000..c14670084a
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/verisign-2.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/verisign.ico b/lms/askbot/skins/common/media/jquery-openid/images/verisign.ico
new file mode 100755
index 0000000000..3953af9319
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/verisign.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/vidoop.ico b/lms/askbot/skins/common/media/jquery-openid/images/vidoop.ico
new file mode 100755
index 0000000000..bbd9a0d50f
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/vidoop.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/vidoop.png b/lms/askbot/skins/common/media/jquery-openid/images/vidoop.png
new file mode 100755
index 0000000000..032c9e9897
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/vidoop.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/wordpress.ico b/lms/askbot/skins/common/media/jquery-openid/images/wordpress.ico
new file mode 100755
index 0000000000..31b7d2c2b7
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/wordpress.ico differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/wordpress.png b/lms/askbot/skins/common/media/jquery-openid/images/wordpress.png
new file mode 100755
index 0000000000..ee29f0cf1a
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/wordpress.png differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/images/yahoo.gif b/lms/askbot/skins/common/media/jquery-openid/images/yahoo.gif
new file mode 100755
index 0000000000..614910a9d3
Binary files /dev/null and b/lms/askbot/skins/common/media/jquery-openid/images/yahoo.gif differ
diff --git a/lms/askbot/skins/common/media/jquery-openid/jquery.openid.js b/lms/askbot/skins/common/media/jquery-openid/jquery.openid.js
new file mode 100644
index 0000000000..249413b919
--- /dev/null
+++ b/lms/askbot/skins/common/media/jquery-openid/jquery.openid.js
@@ -0,0 +1,440 @@
+$.fn.authenticator = function() {
+ var signin_page = $(this);
+ var signin_form = $('#signin-form');
+ var openid_login_token_input = $('input[name=openid_login_token]');
+ var openid_login_token_input_fields = $('#openid-fs');
+ var provider_name_input = $('input[name=login_provider_name]');
+ var email_input_fields = $('#email-input-fs');
+ var account_recovery_heading = $('#account-recovery-heading');
+ var account_recovery_hint = $('#account-recovery-form>.hint');
+ var account_recovery_link = $('#account-recovery-form>.hint>span.link');
+ var account_recovery_text_span = $('#account-recovery-form>.hint>span.text');
+ var password_input_fields = $('#password-fs');
+ var existing_login_methods_div = $('#existing-login-methods');
+ var openid_submit_button = $('input[name=openid_login_with_extra_token]');
+ var existing_login_methods = {};
+
+ var account_recovery_question_text = account_recovery_heading.html();
+ var account_recovery_prompt_text = account_recovery_text_span.html();
+
+ var setup_click_handler = function(elements, handler_function){
+ elements.unbind('click').click(handler_function);
+ };
+
+ var setup_enter_key_handler = function(elements, handler_function){
+ elements.each(
+ function(index, element){
+ $(element).unbind('keypress').keypress(
+ function(e){
+ if ((e.which && e.which == 13)||(e.keyCode && e.keyCode == 13)){
+ if (handler_function){
+ return handler_function();
+ }
+ else {
+ element.click();
+ return false;
+ }
+ }
+ }
+ );
+ }
+ );
+ };
+
+ var setup_event_handlers = function(elements, handler_function){
+ setup_click_handler(elements, handler_function);
+ setup_enter_key_handler(elements);
+ };
+
+ var get_provider_name = function(row_el){
+ var row = $(row_el);
+ var name_span = row.find('.ab-provider-name');
+ return provider_name = $.trim(name_span.html());
+ };
+
+ var read_existing_login_methods = function(){
+ $('.ab-provider-row').each(
+ function(i, provider_row){
+ var provider_name = get_provider_name(provider_row);
+ existing_login_methods[provider_name] = true;
+ }
+ );
+ };
+
+ var setup_login_method_deleters = function(){
+ $('.ab-provider-row').each(
+ function(i, provider_row){
+ var provider_name = get_provider_name(provider_row);
+ var remove_button = $(
+ provider_row
+ ).find('button');
+ remove_button.click(
+ function(){
+ var message = interpolate(gettext('Are you sure you want to remove your %s login?'), [provider_name]);
+ if (confirm(message)){
+ $.ajax({
+ type: 'POST',
+ url: authUrl + 'delete_login_method/',//url!!!
+ data: {provider_name: provider_name},
+ success: function(data, text_status, xhr){
+ $(provider_row).remove();
+ delete existing_login_methods[provider_name];
+ provider_count -=1;
+ if (provider_count < 0){
+ provider_count === 0;
+ }
+ if (provider_count === 0){
+ $('#ab-existing-login-methods').remove();
+ $('#ab-show-login-methods').remove();
+ $('h1').html(
+ gettext("Please add one or more login methods.")
+ );
+ $('#login-intro').html(
+ gettext("You don\'t have a method to log in right now, please add one or more by clicking any of the icons below.")
+ );
+ existing_login_methods = null;
+ }
+ }
+ });
+ }
+ }
+ );
+ }
+ );
+ }
+
+ var submit_login_with_password = function(){
+ var username = $('#id_username');
+ var password = $('#id_password');
+
+ if (username.val().length < 1){
+ username.focus();
+ return false;
+ }
+ if (password.val().length < 1){
+ password.focus();
+ return false;
+ }
+ return true;
+ };
+
+ var submit_change_password = function(){
+ var newpass = $('#id_new_password');
+ var newpass_retyped = $('#id_new_password_retyped');
+ if (newpass.val().length < 1){
+ newpass.focus();
+ return false
+ }
+ if (newpass_retyped.val().length < 1){
+ newpass_retyped.focus();
+ return false;
+ }
+ if (newpass.val() !== newpass_retyped.val()){
+ newpass_retyped.after(
+ '' +
+ gettext('passwords do not match') +
+ ''
+ );
+ newpass.val('').focus();
+ newpass_retyped.val('');
+ return false;
+ }
+ return true;
+ };
+
+ //validator, may be extended to check url for openid
+ var submit_with_extra_openid_token = function() {
+ if (openid_login_token_input.val().length < 1) {
+ openid_login_token_input.focus();
+ return false;
+ }
+ return true;
+ };
+
+ var insert_login_list_enabler = function(){
+ var enabler = $('#login-list-enabler');
+ if (enabler.is('p#login-list-enabler')){
+ enabler.show();
+ }
+ else {
+ enabler = $(
+ '
');
+ var i, result, $li, extraWidth, first = false, $first = false;
+ var numResults = results.length;
+ for (i = 0; i < numResults; i++) {
+ result = results[i];
+ $li = $('
").html(data).evalScripts()}return data}});
+/**
+ * Upload call. Used only once in the wmd file upload
+ * this is "tightly coupled" with the wmd file uploader
+ * @param {Object} jquery object imageUrl - where the
+ * uploaded url must be inserted on successful upload
+ * @param {Function} handler that is run upon change
+ * of the file upload field
+ */
+function ajaxFileUpload(imageUrl, startUploadHandler)
+{
+ $("#loading").ajaxStart(function(){
+ $(this).show();
+ }).ajaxComplete(function(){
+ $(this).hide();
+ });
+
+ $("#upload").ajaxStart(function(){
+ $(this).hide();
+ }).ajaxComplete(function(){
+ $(this).show();
+ });
+
+ $.ajaxFileUpload
+ (
+ {
+ url: askbot['urls']['upload'],
+ secureuri:false,
+ fileElementId:'file-upload',
+ dataType: 'xml',
+ success: function (data, status)
+ {
+ var fileURL = $(data).find('file_url').text();
+ var error = $(data).find('error').text();
+ if(error != ''){
+ alert(error);
+ if (startUploadHandler){
+ /* re-install this as the upload extension
+ * will remove the handler to prevent double uploading */
+ $('#file-upload').change(startUploadHandler);
+ }
+ }else{
+ imageUrl.attr('value', fileURL);
+ }
+
+ },
+ error: function (data, status, e)
+ {
+ alert(e);
+ if (startUploadHandler){
+ /* re-install this as the upload extension
+ * will remove the handler to prevent double uploading */
+ $('#file-upload').change(startUploadHandler);
+ }
+ }
+ }
+ )
+
+ return false;
+};
diff --git a/lms/askbot/skins/common/media/js/excanvas.min.js b/lms/askbot/skins/common/media/js/excanvas.min.js
new file mode 100644
index 0000000000..12c74f7bea
--- /dev/null
+++ b/lms/askbot/skins/common/media/js/excanvas.min.js
@@ -0,0 +1 @@
+if(!document.createElement("canvas").getContext){(function(){var z=Math;var K=z.round;var J=z.sin;var U=z.cos;var b=z.abs;var k=z.sqrt;var D=10;var F=D/2;function T(){return this.context_||(this.context_=new W(this))}var O=Array.prototype.slice;function G(i,j,m){var Z=O.call(arguments,2);return function(){return i.apply(j,Z.concat(O.call(arguments)))}}function AD(Z){return String(Z).replace(/&/g,"&").replace(/"/g,""")}function r(i){if(!i.namespaces.g_vml_){i.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!i.namespaces.g_o_){i.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!i.styleSheets.ex_canvas_){var Z=i.createStyleSheet();Z.owningElement.id="ex_canvas_";Z.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}r(document);var E={init:function(Z){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=Z||document;i.createElement("canvas");i.attachEvent("onreadystatechange",G(this.init_,this,i))}},init_:function(m){var j=m.getElementsByTagName("canvas");for(var Z=0;Z1){j--}if(6*j<1){return i+(Z-i)*6*j}else{if(2*j<1){return Z}else{if(3*j<2){return i+(Z-i)*(2/3-j)*6}else{return i}}}}function Y(Z){var AE,p=1;Z=String(Z);if(Z.charAt(0)=="#"){AE=Z}else{if(/^rgb/.test(Z)){var m=g(Z);var AE="#",AF;for(var j=0;j<3;j++){if(m[j].indexOf("%")!=-1){AF=Math.floor(C(m[j])*255)}else{AF=Number(m[j])}AE+=I[N(AF,0,255)]}p=m[3]}else{if(/^hsl/.test(Z)){var m=g(Z);AE=c(m);p=m[3]}else{AE=B[Z]||Z}}}return{color:AE,alpha:p}}var L={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var f={};function X(Z){if(f[Z]){return f[Z]}var m=document.createElement("div");var j=m.style;try{j.font=Z}catch(i){}return f[Z]={style:j.fontStyle||L.style,variant:j.fontVariant||L.variant,weight:j.fontWeight||L.weight,size:j.fontSize||L.size,family:j.fontFamily||L.family}}function P(j,i){var Z={};for(var AF in j){Z[AF]=j[AF]}var AE=parseFloat(i.currentStyle.fontSize),m=parseFloat(j.size);if(typeof j.size=="number"){Z.size=j.size}else{if(j.size.indexOf("px")!=-1){Z.size=m}else{if(j.size.indexOf("em")!=-1){Z.size=AE*m}else{if(j.size.indexOf("%")!=-1){Z.size=(AE/100)*m}else{if(j.size.indexOf("pt")!=-1){Z.size=m/0.75}else{Z.size=AE}}}}}Z.size*=0.981;return Z}function AA(Z){return Z.style+" "+Z.variant+" "+Z.weight+" "+Z.size+"px "+Z.family}function t(Z){switch(Z){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function W(i){this.m_=V();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=D*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var Z=i.ownerDocument.createElement("div");Z.style.width=i.clientWidth+"px";Z.style.height=i.clientHeight+"px";Z.style.overflow="hidden";Z.style.position="absolute";i.appendChild(Z);this.element_=Z;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var M=W.prototype;M.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};M.beginPath=function(){this.currentPath_=[]};M.moveTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"moveTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.lineTo=function(i,Z){var j=this.getCoords_(i,Z);this.currentPath_.push({type:"lineTo",x:j.x,y:j.y});this.currentX_=j.x;this.currentY_=j.y};M.bezierCurveTo=function(j,i,AI,AH,AG,AE){var Z=this.getCoords_(AG,AE);var AF=this.getCoords_(j,i);var m=this.getCoords_(AI,AH);e(this,AF,m,Z)};function e(Z,m,j,i){Z.currentPath_.push({type:"bezierCurveTo",cp1x:m.x,cp1y:m.y,cp2x:j.x,cp2y:j.y,x:i.x,y:i.y});Z.currentX_=i.x;Z.currentY_=i.y}M.quadraticCurveTo=function(AG,j,i,Z){var AF=this.getCoords_(AG,j);var AE=this.getCoords_(i,Z);var AH={x:this.currentX_+2/3*(AF.x-this.currentX_),y:this.currentY_+2/3*(AF.y-this.currentY_)};var m={x:AH.x+(AE.x-this.currentX_)/3,y:AH.y+(AE.y-this.currentY_)/3};e(this,AH,m,AE)};M.arc=function(AJ,AH,AI,AE,i,j){AI*=D;var AN=j?"at":"wa";var AK=AJ+U(AE)*AI-F;var AM=AH+J(AE)*AI-F;var Z=AJ+U(i)*AI-F;var AL=AH+J(i)*AI-F;if(AK==Z&&!j){AK+=0.125}var m=this.getCoords_(AJ,AH);var AG=this.getCoords_(AK,AM);var AF=this.getCoords_(Z,AL);this.currentPath_.push({type:AN,x:m.x,y:m.y,radius:AI,xStart:AG.x,yStart:AG.y,xEnd:AF.x,yEnd:AF.y})};M.rect=function(j,i,Z,m){this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath()};M.strokeRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.stroke();this.currentPath_=p};M.fillRect=function(j,i,Z,m){var p=this.currentPath_;this.beginPath();this.moveTo(j,i);this.lineTo(j+Z,i);this.lineTo(j+Z,i+m);this.lineTo(j,i+m);this.closePath();this.fill();this.currentPath_=p};M.createLinearGradient=function(i,m,Z,j){var p=new v("gradient");p.x0_=i;p.y0_=m;p.x1_=Z;p.y1_=j;return p};M.createRadialGradient=function(m,AE,j,i,p,Z){var AF=new v("gradientradial");AF.x0_=m;AF.y0_=AE;AF.r0_=j;AF.x1_=i;AF.y1_=p;AF.r1_=Z;return AF};M.drawImage=function(AO,j){var AH,AF,AJ,AV,AM,AK,AQ,AX;var AI=AO.runtimeStyle.width;var AN=AO.runtimeStyle.height;AO.runtimeStyle.width="auto";AO.runtimeStyle.height="auto";var AG=AO.width;var AT=AO.height;AO.runtimeStyle.width=AI;AO.runtimeStyle.height=AN;if(arguments.length==3){AH=arguments[1];AF=arguments[2];AM=AK=0;AQ=AJ=AG;AX=AV=AT}else{if(arguments.length==5){AH=arguments[1];AF=arguments[2];AJ=arguments[3];AV=arguments[4];AM=AK=0;AQ=AG;AX=AT}else{if(arguments.length==9){AM=arguments[1];AK=arguments[2];AQ=arguments[3];AX=arguments[4];AH=arguments[5];AF=arguments[6];AJ=arguments[7];AV=arguments[8]}else{throw Error("Invalid number of arguments")}}}var AW=this.getCoords_(AH,AF);var m=AQ/2;var i=AX/2;var AU=[];var Z=10;var AE=10;AU.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",AU.join(""))};M.stroke=function(AM){var m=10;var AN=10;var AE=5000;var AG={x:null,y:null};var AL={x:null,y:null};for(var AH=0;AHAL.x){AL.x=Z.x}if(AG.y==null||Z.yAL.y){AL.y=Z.y}}}AK.push(' ">');if(!AM){R(this,AK)}else{a(this,AK,AG,AL)}AK.push("");this.element_.insertAdjacentHTML("beforeEnd",AK.join(""))}};function R(j,AE){var i=Y(j.strokeStyle);var m=i.color;var p=i.alpha*j.globalAlpha;var Z=j.lineScale_*j.lineWidth;if(Z<1){p*=Z}AE.push("')}function a(AO,AG,Ah,AP){var AH=AO.fillStyle;var AY=AO.arcScaleX_;var AX=AO.arcScaleY_;var Z=AP.x-Ah.x;var m=AP.y-Ah.y;if(AH instanceof v){var AL=0;var Ac={x:0,y:0};var AU=0;var AK=1;if(AH.type_=="gradient"){var AJ=AH.x0_/AY;var j=AH.y0_/AX;var AI=AH.x1_/AY;var Aj=AH.y1_/AX;var Ag=AO.getCoords_(AJ,j);var Af=AO.getCoords_(AI,Aj);var AE=Af.x-Ag.x;var p=Af.y-Ag.y;AL=Math.atan2(AE,p)*180/Math.PI;if(AL<0){AL+=360}if(AL<0.000001){AL=0}}else{var Ag=AO.getCoords_(AH.x0_,AH.y0_);Ac={x:(Ag.x-Ah.x)/Z,y:(Ag.y-Ah.y)/m};Z/=AY*D;m/=AX*D;var Aa=z.max(Z,m);AU=2*AH.r0_/Aa;AK=2*AH.r1_/Aa-AU}var AS=AH.colors_;AS.sort(function(Ak,i){return Ak.offset-i.offset});var AN=AS.length;var AR=AS[0].color;var AQ=AS[AN-1].color;var AW=AS[0].alpha*AO.globalAlpha;var AV=AS[AN-1].alpha*AO.globalAlpha;var Ab=[];for(var Ae=0;Ae')}else{if(AH instanceof u){if(Z&&m){var AF=-Ah.x;var AZ=-Ah.y;AG.push("')}}else{var Ai=Y(AO.fillStyle);var AT=Ai.color;var Ad=Ai.alpha*AO.globalAlpha;AG.push('')}}}M.fill=function(){this.stroke(true)};M.closePath=function(){this.currentPath_.push({type:"close"})};M.getCoords_=function(j,i){var Z=this.m_;return{x:D*(j*Z[0][0]+i*Z[1][0]+Z[2][0])-F,y:D*(j*Z[0][1]+i*Z[1][1]+Z[2][1])-F}};M.save=function(){var Z={};Q(this,Z);this.aStack_.push(Z);this.mStack_.push(this.m_);this.m_=d(V(),this.m_)};M.restore=function(){if(this.aStack_.length){Q(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function H(Z){return isFinite(Z[0][0])&&isFinite(Z[0][1])&&isFinite(Z[1][0])&&isFinite(Z[1][1])&&isFinite(Z[2][0])&&isFinite(Z[2][1])}function y(i,Z,j){if(!H(Z)){return }i.m_=Z;if(j){var p=Z[0][0]*Z[1][1]-Z[0][1]*Z[1][0];i.lineScale_=k(b(p))}}M.translate=function(j,i){var Z=[[1,0,0],[0,1,0],[j,i,1]];y(this,d(Z,this.m_),false)};M.rotate=function(i){var m=U(i);var j=J(i);var Z=[[m,j,0],[-j,m,0],[0,0,1]];y(this,d(Z,this.m_),false)};M.scale=function(j,i){this.arcScaleX_*=j;this.arcScaleY_*=i;var Z=[[j,0,0],[0,i,0],[0,0,1]];y(this,d(Z,this.m_),true)};M.transform=function(p,m,AF,AE,i,Z){var j=[[p,m,0],[AF,AE,0],[i,Z,1]];y(this,d(j,this.m_),true)};M.setTransform=function(AE,p,AG,AF,j,i){var Z=[[AE,p,0],[AG,AF,0],[j,i,1]];y(this,Z,true)};M.drawText_=function(AK,AI,AH,AN,AG){var AM=this.m_,AQ=1000,i=0,AP=AQ,AF={x:0,y:0},AE=[];var Z=P(X(this.font),this.element_);var j=AA(Z);var AR=this.element_.currentStyle;var p=this.textAlign.toLowerCase();switch(p){case"left":case"center":case"right":break;case"end":p=AR.direction=="ltr"?"right":"left";break;case"start":p=AR.direction=="rtl"?"right":"left";break;default:p="left"}switch(this.textBaseline){case"hanging":case"top":AF.y=Z.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":AF.y=-Z.size/2.25;break}switch(p){case"right":i=AQ;AP=0.05;break;case"center":i=AP=AQ/2;break}var AO=this.getCoords_(AI+AF.x,AH+AF.y);AE.push('');if(AG){R(this,AE)}else{a(this,AE,{x:-i,y:0},{x:AP,y:Z.size})}var AL=AM[0][0].toFixed(3)+","+AM[1][0].toFixed(3)+","+AM[0][1].toFixed(3)+","+AM[1][1].toFixed(3)+",0,0";var AJ=K(AO.x/D)+","+K(AO.y/D);AE.push('','','');this.element_.insertAdjacentHTML("beforeEnd",AE.join(""))};M.fillText=function(j,Z,m,i){this.drawText_(j,Z,m,i,false)};M.strokeText=function(j,Z,m,i){this.drawText_(j,Z,m,i,true)};M.measureText=function(j){if(!this.textMeasureEl_){var Z='';this.element_.insertAdjacentHTML("beforeEnd",Z);this.textMeasureEl_=this.element_.lastChild}var i=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(i.createTextNode(j));return{width:this.textMeasureEl_.offsetWidth}};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(i,Z){return new u(i,Z)};function v(Z){this.type_=Z;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}v.prototype.addColorStop=function(i,Z){Z=Y(Z);this.colors_.push({offset:i,color:Z.color,alpha:Z.alpha})};function u(i,Z){q(i);switch(Z){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=Z;break;default:n("SYNTAX_ERR")}this.src_=i.src;this.width_=i.width;this.height_=i.height}function n(Z){throw new o(Z)}function q(Z){if(!Z||Z.nodeType!=1||Z.tagName!="IMG"){n("TYPE_MISMATCH_ERR")}if(Z.readyState!="complete"){n("INVALID_STATE_ERR")}}function o(Z){this.code=this[Z];this.message=Z+": DOM Exception "+this.code}var x=o.prototype=new Error;x.INDEX_SIZE_ERR=1;x.DOMSTRING_SIZE_ERR=2;x.HIERARCHY_REQUEST_ERR=3;x.WRONG_DOCUMENT_ERR=4;x.INVALID_CHARACTER_ERR=5;x.NO_DATA_ALLOWED_ERR=6;x.NO_MODIFICATION_ALLOWED_ERR=7;x.NOT_FOUND_ERR=8;x.NOT_SUPPORTED_ERR=9;x.INUSE_ATTRIBUTE_ERR=10;x.INVALID_STATE_ERR=11;x.SYNTAX_ERR=12;x.INVALID_MODIFICATION_ERR=13;x.NAMESPACE_ERR=14;x.INVALID_ACCESS_ERR=15;x.VALIDATION_ERR=16;x.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=E;CanvasRenderingContext2D=W;CanvasGradient=v;CanvasPattern=u;DOMException=o})()};
\ No newline at end of file
diff --git a/lms/askbot/skins/common/media/js/flot-build.bat b/lms/askbot/skins/common/media/js/flot-build.bat
new file mode 100644
index 0000000000..f9f32cb790
--- /dev/null
+++ b/lms/askbot/skins/common/media/js/flot-build.bat
@@ -0,0 +1,3 @@
+java -jar yuicompressor-2.4.2.jar --type js --charset utf-8 jquery.flot.js -o jquery.flot.pack.js
+
+pause
diff --git a/lms/askbot/skins/common/media/js/jquery-1.4.3.js b/lms/askbot/skins/common/media/js/jquery-1.4.3.js
new file mode 100644
index 0000000000..ad9a79c433
--- /dev/null
+++ b/lms/askbot/skins/common/media/js/jquery-1.4.3.js
@@ -0,0 +1,6883 @@
+/*!
+ * jQuery JavaScript Library v1.4.3
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Thu Oct 14 23:10:06 2010 -0400
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
+
+ // Is it a simple selector
+ isSimple = /^.[^:#\[\.,]*$/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+ rwhite = /\s/,
+
+ // Used for trimming whitespace
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Check for non-word characters
+ rnonword = /\W/,
+
+ // Check for digits
+ rdigit = /\d/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // Has the ready events already been bound?
+ readyBound = false,
+
+ // The functions to execute on DOM ready
+ readyList = [],
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ init: function( selector, context ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context && document.body ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = "body";
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ match = quickExpr.exec( selector );
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ doc = (context ? context.ownerDocument || context : document);
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+ selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $("#id")
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $("TAG")
+ } else if ( !context && !rnonword.test( selector ) ) {
+ this.selector = selector;
+ this.context = document;
+ selector = document.getElementsByTagName( selector );
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return (context || rootjQuery).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return jQuery( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if (selector.selector !== undefined) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.4.3",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = jQuery();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // If the DOM is already ready
+ if ( jQuery.isReady ) {
+ // Execute the function immediately
+ fn.call( document, jQuery );
+
+ // Otherwise, remember the function for later
+ } else if ( readyList ) {
+ // Add the function to the wait list
+ readyList.push( fn );
+ }
+
+ return this;
+ },
+
+ eq: function( i ) {
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, +i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || jQuery(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ // copy reference to target object
+ var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy, copyIsArray;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ window.$ = _$;
+
+ if ( deep ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+ // A third-party is pushing the ready event forwards
+ if ( wait === true ) {
+ jQuery.readyWait--;
+ }
+
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ if ( readyList ) {
+ // Execute all of them
+ var fn, i = 0;
+ while ( (fn = readyList[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Reset the list of functions
+ readyList = null;
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyBound ) {
+ return;
+ }
+
+ readyBound = true;
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ // A crude way of determining if an object is a window
+ isWindow: function( obj ) {
+ return obj && typeof obj === "object" && "setInterval" in obj;
+ },
+
+ isNaN: function( obj ) {
+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
+ },
+
+ type: function( obj ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call(obj, "constructor") &&
+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw msg;
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test(data.replace(rvalidescape, "@")
+ .replace(rvalidtokens, "]")
+ .replace(rvalidbraces, "")) ) {
+
+ // Try to use the native JSON parser first
+ return window.JSON && window.JSON.parse ?
+ window.JSON.parse( data ) :
+ (new Function("return " + data))();
+
+ } else {
+ jQuery.error( "Invalid JSON: " + data );
+ }
+ },
+
+ noop: function() {},
+
+ // Evalulates a script in a global context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test(data) ) {
+ // Inspired by code by Andrea Giammarchi
+ // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+ var head = document.getElementsByTagName("head")[0] || document.documentElement,
+ script = document.createElement("script");
+
+ script.type = "text/javascript";
+
+ if ( jQuery.support.scriptEval ) {
+ script.appendChild( document.createTextNode( data ) );
+ } else {
+ script.text = data;
+ }
+
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709).
+ head.insertBefore( script, head.firstChild );
+ head.removeChild( script );
+ }
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction(object);
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( var value = object[0];
+ i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
+ }
+ }
+
+ return object;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // The extra typeof function check is to prevent crashes
+ // in Safari 2 (See: #3039)
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type(array);
+
+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var i = first.length, j = 0;
+
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var ret = [], retVal;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var ret = [], value;
+
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ proxy: function( fn, proxy, thisObject ) {
+ if ( arguments.length === 2 ) {
+ if ( typeof proxy === "string" ) {
+ thisObject = fn;
+ fn = thisObject[ proxy ];
+ proxy = undefined;
+
+ } else if ( proxy && !jQuery.isFunction( proxy ) ) {
+ thisObject = proxy;
+ proxy = undefined;
+ }
+ }
+
+ if ( !proxy && fn ) {
+ proxy = function() {
+ return fn.apply( thisObject || this, arguments );
+ };
+ }
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ if ( fn ) {
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+ }
+
+ // So proxy can be declared as an argument
+ return proxy;
+ },
+
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can be optionally by executed if its a function
+ access: function( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ jQuery.access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+ },
+
+ now: function() {
+ return (new Date()).getTime();
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+if ( indexOf ) {
+ jQuery.inArray = function( elem, array ) {
+ return indexOf.call( array, elem );
+ };
+}
+
+// Verify that \s matches non-breaking spaces
+// (IE fails on this test)
+if ( !rwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch(e) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+// Expose jQuery to the global object
+return (window.jQuery = window.$ = jQuery);
+
+})();
+
+
+(function() {
+
+ jQuery.support = {};
+
+ var root = document.documentElement,
+ script = document.createElement("script"),
+ div = document.createElement("div"),
+ id = "script" + jQuery.now();
+
+ div.style.display = "none";
+ div.innerHTML = "
a";
+
+ var all = div.getElementsByTagName("*"),
+ a = div.getElementsByTagName("a")[0],
+ select = document.createElement("select"),
+ opt = select.appendChild( document.createElement("option") );
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return;
+ }
+
+ jQuery.support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText insted)
+ style: /red/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55$/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Will be defined later
+ optDisabled: false,
+ checkClone: false,
+ scriptEval: false,
+ noCloneEvent: true,
+ boxModel: null,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableHiddenOffsets: true
+ };
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as diabled)
+ select.disabled = true;
+ jQuery.support.optDisabled = !opt.disabled;
+
+ script.type = "text/javascript";
+ try {
+ script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+ } catch(e) {}
+
+ root.insertBefore( script, root.firstChild );
+
+ // Make sure that the execution of code works by injecting a script
+ // tag with appendChild/createTextNode
+ // (IE doesn't support this, fails, and uses .text instead)
+ if ( window[ id ] ) {
+ jQuery.support.scriptEval = true;
+ delete window[ id ];
+ }
+
+ root.removeChild( script );
+
+ if ( div.attachEvent && div.fireEvent ) {
+ div.attachEvent("onclick", function click() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ jQuery.support.noCloneEvent = false;
+ div.detachEvent("onclick", click);
+ });
+ div.cloneNode(true).fireEvent("onclick");
+ }
+
+ div = document.createElement("div");
+ div.innerHTML = "";
+
+ var fragment = document.createDocumentFragment();
+ fragment.appendChild( div.firstChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ jQuery.support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+ // Figure out if the W3C box model works as expected
+ // document.body must exist before we can do this
+ jQuery(function() {
+ var div = document.createElement("div");
+ div.style.width = div.style.paddingLeft = "1px";
+
+ document.body.appendChild( div );
+ jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
+
+ if ( "zoom" in div.style ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.style.display = "inline";
+ div.style.zoom = 1;
+ jQuery.support.inlineBlockNeedsLayout = div.offsetWidth === 2;
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "";
+ div.innerHTML = "";
+ jQuery.support.shrinkWrapBlocks = div.offsetWidth !== 2;
+ }
+
+ div.innerHTML = "
t
";
+ var tds = div.getElementsByTagName("td");
+
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ // (only IE 8 fails this test)
+ jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;
+
+ tds[0].style.display = "";
+ tds[1].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE < 8 fail this test)
+ jQuery.support.reliableHiddenOffsets = jQuery.support.reliableHiddenOffsets && tds[0].offsetHeight === 0;
+ div.innerHTML = "";
+
+ document.body.removeChild( div ).style.display = "none";
+ div = tds = null;
+ });
+
+ // Technique from Juriy Zaytsev
+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
+
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
+
+ return isSupported;
+ };
+
+ jQuery.support.submitBubbles = eventSupported("submit");
+ jQuery.support.changeBubbles = eventSupported("change");
+
+ // release memory in IE
+ root = script = div = all = a = null;
+})();
+
+jQuery.props = {
+ "for": "htmlFor",
+ "class": "className",
+ readonly: "readOnly",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ tabindex: "tabIndex",
+ usemap: "useMap",
+ frameborder: "frameBorder"
+};
+
+
+
+
+var windowData = {},
+ rbrace = /^(?:\{.*\}|\[.*\])$/;
+
+jQuery.extend({
+ cache: {},
+
+ // Please use with caution
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + jQuery.now(),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ data: function( elem, name, data ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ elem = elem == window ?
+ windowData :
+ elem;
+
+ var isNode = elem.nodeType,
+ id = isNode ? elem[ jQuery.expando ] : null,
+ cache = jQuery.cache, thisCache;
+
+ if ( isNode && !id && typeof name === "string" && data === undefined ) {
+ return;
+ }
+
+ // Get the data from the object directly
+ if ( !isNode ) {
+ cache = elem;
+
+ // Compute a unique ID for the element
+ } else if ( !id ) {
+ elem[ jQuery.expando ] = id = ++jQuery.uuid;
+ }
+
+ // Avoid generating a new cache unless none exists and we
+ // want to manipulate it.
+ if ( typeof name === "object" ) {
+ if ( isNode ) {
+ cache[ id ] = jQuery.extend(cache[ id ], name);
+
+ } else {
+ jQuery.extend( cache, name );
+ }
+
+ } else if ( isNode && !cache[ id ] ) {
+ cache[ id ] = {};
+ }
+
+ thisCache = isNode ? cache[ id ] : cache;
+
+ // Prevent overriding the named cache with undefined values
+ if ( data !== undefined ) {
+ thisCache[ name ] = data;
+ }
+
+ return typeof name === "string" ? thisCache[ name ] : thisCache;
+ },
+
+ removeData: function( elem, name ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ elem = elem == window ?
+ windowData :
+ elem;
+
+ var isNode = elem.nodeType,
+ id = isNode ? elem[ jQuery.expando ] : elem,
+ cache = jQuery.cache,
+ thisCache = isNode ? cache[ id ] : id;
+
+ // If we want to remove a specific section of the element's data
+ if ( name ) {
+ if ( thisCache ) {
+ // Remove the section of cache data
+ delete thisCache[ name ];
+
+ // If we've removed all the data, remove the element's cache
+ if ( isNode && jQuery.isEmptyObject(thisCache) ) {
+ jQuery.removeData( elem );
+ }
+ }
+
+ // Otherwise, we want to remove all of the element's data
+ } else {
+ if ( isNode && jQuery.support.deleteExpando ) {
+ delete elem[ jQuery.expando ];
+
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( jQuery.expando );
+
+ // Completely remove the data cache
+ } else if ( isNode ) {
+ delete cache[ id ];
+
+ // Remove all fields from the object
+ } else {
+ for ( var n in elem ) {
+ delete elem[ n ];
+ }
+ }
+ }
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ if ( elem.nodeName ) {
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ if ( match ) {
+ return !(match === true || elem.getAttribute("classid") !== match);
+ }
+ }
+
+ return true;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ if ( typeof key === "undefined" ) {
+ return this.length ? jQuery.data( this[0] ) : null;
+
+ } else if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ var parts = key.split(".");
+ parts[1] = parts[1] ? "." + parts[1] : "";
+
+ if ( value === undefined ) {
+ var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+ // Try to fetch any internally stored data first
+ if ( data === undefined && this.length ) {
+ data = jQuery.data( this[0], key );
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && this[0].nodeType === 1 ) {
+ data = this[0].getAttribute( "data-" + key );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ !jQuery.isNaN( data ) ? parseFloat( data ) :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ } else {
+ data = undefined;
+ }
+ }
+ }
+
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+
+ } else {
+ return this.each(function() {
+ var $this = jQuery( this ), args = [ parts[0], value ];
+
+ $this.triggerHandler( "setData" + parts[1] + "!", args );
+ jQuery.data( this, key, value );
+ $this.triggerHandler( "changeData" + parts[1] + "!", args );
+ });
+ }
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+
+
+
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ if ( !elem ) {
+ return;
+ }
+
+ type = (type || "fx") + "queue";
+ var q = jQuery.data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( !data ) {
+ return q || [];
+ }
+
+ if ( !q || jQuery.isArray(data) ) {
+ q = jQuery.data( elem, type, jQuery.makeArray(data) );
+
+ } else {
+ q.push( data );
+ }
+
+ return q;
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ), fn = queue.shift();
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ }
+
+ if ( fn ) {
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift("inprogress");
+ }
+
+ fn.call(elem, function() {
+ jQuery.dequeue(elem, type);
+ });
+ }
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ }
+
+ if ( data === undefined ) {
+ return jQuery.queue( this[0], type );
+ }
+ return this.each(function( i ) {
+ var queue = jQuery.queue( this, type, data );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function() {
+ var elem = this;
+ setTimeout(function() {
+ jQuery.dequeue( elem, type );
+ }, time );
+ });
+ },
+
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ }
+});
+
+
+
+
+var rclass = /[\n\t]/g,
+ rspaces = /\s+/,
+ rreturn = /\r/g,
+ rspecialurl = /^(?:href|src|style)$/,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea)?$/i,
+ rradiocheck = /^(?:radio|checkbox)$/i;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, name, value, true, jQuery.attr );
+ },
+
+ removeAttr: function( name, fn ) {
+ return this.each(function(){
+ jQuery.attr( this, name, "" );
+ if ( this.nodeType === 1 ) {
+ this.removeAttribute( name );
+ }
+ });
+ },
+
+ addClass: function( value ) {
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.addClass( value.call(this, i, self.attr("class")) );
+ });
+ }
+
+ if ( value && typeof value === "string" ) {
+ var classNames = (value || "").split( rspaces );
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var elem = this[i];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className ) {
+ elem.className = value;
+
+ } else {
+ var className = " " + elem.className + " ", setClass = elem.className;
+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
+ setClass += " " + classNames[c];
+ }
+ }
+ elem.className = jQuery.trim( setClass );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ if ( jQuery.isFunction(value) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.removeClass( value.call(this, i, self.attr("class")) );
+ });
+ }
+
+ if ( (value && typeof value === "string") || value === undefined ) {
+ var classNames = (value || "").split( rspaces );
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ var elem = this[i];
+
+ if ( elem.nodeType === 1 && elem.className ) {
+ if ( value ) {
+ var className = (" " + elem.className + " ").replace(rclass, " ");
+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
+ className = className.replace(" " + classNames[c] + " ", " ");
+ }
+ elem.className = jQuery.trim( className );
+
+ } else {
+ elem.className = "";
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value, isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function(i) {
+ var self = jQuery(this);
+ self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className, i = 0, self = jQuery(this),
+ state = stateVal,
+ classNames = value.split( rspaces );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space seperated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery.data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ";
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ if ( !arguments.length ) {
+ var elem = this[0];
+
+ if ( elem ) {
+ if ( jQuery.nodeName( elem, "option" ) ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+
+ // We need to handle select boxes special
+ if ( jQuery.nodeName( elem, "select" ) ) {
+ var index = elem.selectedIndex,
+ values = [],
+ options = elem.options,
+ one = elem.type === "select-one";
+
+ // Nothing was selected
+ if ( index < 0 ) {
+ return null;
+ }
+
+ // Loop through all the selected options
+ for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
+ var option = options[ i ];
+
+ // Don't return options that are disabled or in a disabled optgroup
+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+ (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+ // Get the specific value for the option
+ value = jQuery(option).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ }
+
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+
+
+ // Everything else, we just grab the value
+ return (elem.value || "").replace(rreturn, "");
+
+ }
+
+ return undefined;
+ }
+
+ var isFunction = jQuery.isFunction(value);
+
+ return this.each(function(i) {
+ var self = jQuery(this), val = value;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call(this, i, self.val());
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray(val) ) {
+ val = jQuery.map(val, function (value) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
+ this.checked = jQuery.inArray( self.val(), val ) >= 0;
+
+ } else if ( jQuery.nodeName( this, "select" ) ) {
+ var values = jQuery.makeArray(val);
+
+ jQuery( "option", this ).each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ this.selectedIndex = -1;
+ }
+
+ } else {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ attrFn: {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true
+ },
+
+ attr: function( elem, name, value, pass ) {
+ // don't set attributes on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
+
+ if ( pass && name in jQuery.attrFn ) {
+ return jQuery(elem)[name](value);
+ }
+
+ var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
+ // Whether we are setting (or getting)
+ set = value !== undefined;
+
+ // Try to normalize/fix the name
+ name = notxml && jQuery.props[ name ] || name;
+
+ // Only do all the following if this is a node (faster for style)
+ if ( elem.nodeType === 1 ) {
+ // These attributes require special treatment
+ var special = rspecialurl.test( name );
+
+ // Safari mis-reports the default selected property of an option
+ // Accessing the parent's selectedIndex property fixes it
+ if ( name === "selected" && !jQuery.support.optSelected ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ }
+
+ // If applicable, access the attribute via the DOM 0 way
+ // 'in' checks fail in Blackberry 4.7 #6931
+ if ( (name in elem || elem[ name ] !== undefined) && notxml && !special ) {
+ if ( set ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ }
+
+ if ( value === null ) {
+ if ( elem.nodeType === 1 ) {
+ elem.removeAttribute( name );
+ }
+
+ } else {
+ elem[ name ] = value;
+ }
+ }
+
+ // browsers index elements by id/name on forms, give priority to attributes.
+ if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
+ return elem.getAttributeNode( name ).nodeValue;
+ }
+
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ if ( name === "tabIndex" ) {
+ var attributeNode = elem.getAttributeNode( "tabIndex" );
+
+ return attributeNode && attributeNode.specified ?
+ attributeNode.value :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+
+ return elem[ name ];
+ }
+
+ if ( !jQuery.support.style && notxml && name === "style" ) {
+ if ( set ) {
+ elem.style.cssText = "" + value;
+ }
+
+ return elem.style.cssText;
+ }
+
+ if ( set ) {
+ // convert the value to a string (all browsers do this but IE) see #1070
+ elem.setAttribute( name, "" + value );
+ }
+
+ // Ensure that missing attributes return undefined
+ // Blackberry 4.7 returns "" from getAttribute #6938
+ if ( !elem.attributes[ name ] && (elem.hasAttribute && !elem.hasAttribute( name )) ) {
+ return undefined;
+ }
+
+ var attr = !jQuery.support.hrefNormalized && notxml && special ?
+ // Some attributes require a special call on IE
+ elem.getAttribute( name, 2 ) :
+ elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return attr === null ? undefined : attr;
+ }
+ }
+});
+
+
+
+
+var rnamespaces = /\.(.*)$/,
+ rformElems = /^(?:textarea|input|select)$/i,
+ rperiod = /\./g,
+ rspace = / /g,
+ rescape = /[^\w\s.|`]/g,
+ fcleanup = function( nm ) {
+ return nm.replace(rescape, "\\$&");
+ },
+ focusCounts = { focusin: 0, focusout: 0 };
+
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code originated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+ // Bind an event to an element
+ // Original by Dean Edwards
+ add: function( elem, types, handler, data ) {
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // For whatever reason, IE has trouble passing the window object
+ // around, causing it to be cloned in the process
+ if ( jQuery.isWindow( elem ) && ( elem !== window && !elem.frameElement ) ) {
+ elem = window;
+ }
+
+ if ( handler === false ) {
+ handler = returnFalse;
+ }
+
+ var handleObjIn, handleObj;
+
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ }
+
+ // Make sure that the function being executed has a unique ID
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure
+ var elemData = jQuery.data( elem );
+
+ // If no elemData is found then we must be trying to bind to one of the
+ // banned noData elements
+ if ( !elemData ) {
+ return;
+ }
+
+ // Use a key less likely to result in collisions for plain JS objects.
+ // Fixes bug #7150.
+ var eventKey = elem.nodeType ? "events" : "__events__",
+ events = elemData[ eventKey ],
+ eventHandle = elemData.handle;
+
+ if ( typeof events === "function" ) {
+ // On plain objects events is a fn that holds the the data
+ // which prevents this data from being JSON serialized
+ // the function does not need to be called, it just contains the data
+ eventHandle = events.handle;
+ events = events.events;
+
+ } else if ( !events ) {
+ if ( !elem.nodeType ) {
+ // On plain objects, create a fn that acts as the holder
+ // of the values to avoid JSON serialization of event data
+ elemData[ eventKey ] = elemData = function(){};
+ }
+
+ elemData.events = events = {};
+ }
+
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = function() {
+ // Handle the second event of a trigger and when
+ // an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
+ jQuery.event.handle.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ }
+
+ // Add elem as a property of the handle function
+ // This is to prevent a memory leak with non-native events in IE.
+ eventHandle.elem = elem;
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = types.split(" ");
+
+ var type, i = 0, namespaces;
+
+ while ( (type = types[ i++ ]) ) {
+ handleObj = handleObjIn ?
+ jQuery.extend({}, handleObjIn) :
+ { handler: handler, data: data };
+
+ // Namespaced event handlers
+ if ( type.indexOf(".") > -1 ) {
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ handleObj.namespace = namespaces.slice(0).sort().join(".");
+
+ } else {
+ namespaces = [];
+ handleObj.namespace = "";
+ }
+
+ handleObj.type = type;
+ if ( !handleObj.guid ) {
+ handleObj.guid = handler.guid;
+ }
+
+ // Get the current list of functions bound to this event
+ var handlers = events[ type ],
+ special = jQuery.event.special[ type ] || {};
+
+ // Init the event handler queue
+ if ( !handlers ) {
+ handlers = events[ type ] = [];
+
+ // Check for a special event handler
+ // Only use addEventListener/attachEvent if the special
+ // events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add the function to the element's handler list
+ handlers.push( handleObj );
+
+ // Keep track of which events have been used, for global triggering
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, pos ) {
+ // don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ if ( handler === false ) {
+ handler = returnFalse;
+ }
+
+ var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
+ eventKey = elem.nodeType ? "events" : "__events__",
+ elemData = jQuery.data( elem ),
+ events = elemData && elemData[ eventKey ];
+
+ if ( !elemData || !events ) {
+ return;
+ }
+
+ if ( typeof events === "function" ) {
+ elemData = events;
+ events = events.events;
+ }
+
+ // types is actually an event object here
+ if ( types && types.type ) {
+ handler = types.handler;
+ types = types.type;
+ }
+
+ // Unbind all events for the element
+ if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
+ types = types || "";
+
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types );
+ }
+
+ return;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).unbind("mouseover mouseout", fn);
+ types = types.split(" ");
+
+ while ( (type = types[ i++ ]) ) {
+ origType = type;
+ handleObj = null;
+ all = type.indexOf(".") < 0;
+ namespaces = [];
+
+ if ( !all ) {
+ // Namespaced event handlers
+ namespaces = type.split(".");
+ type = namespaces.shift();
+
+ namespace = new RegExp("(^|\\.)" +
+ jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ eventType = events[ type ];
+
+ if ( !eventType ) {
+ continue;
+ }
+
+ if ( !handler ) {
+ for ( j = 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( all || namespace.test( handleObj.namespace ) ) {
+ jQuery.event.remove( elem, origType, handleObj.handler, j );
+ eventType.splice( j--, 1 );
+ }
+ }
+
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+
+ for ( j = pos || 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( handler.guid === handleObj.guid ) {
+ // remove the given handler for the given type
+ if ( all || namespace.test( handleObj.namespace ) ) {
+ if ( pos == null ) {
+ eventType.splice( j--, 1 );
+ }
+
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+
+ if ( pos != null ) {
+ break;
+ }
+ }
+ }
+
+ // remove generic event handler if no more handlers exist
+ if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ ret = null;
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ var handle = elemData.handle;
+ if ( handle ) {
+ handle.elem = null;
+ }
+
+ delete elemData.events;
+ delete elemData.handle;
+
+ if ( typeof elemData === "function" ) {
+ jQuery.removeData( elem, eventKey );
+
+ } else if ( jQuery.isEmptyObject( elemData ) ) {
+ jQuery.removeData( elem );
+ }
+ }
+ },
+
+ // bubbling is internal
+ trigger: function( event, data, elem /*, bubbling */ ) {
+ // Event object or event type
+ var type = event.type || event,
+ bubbling = arguments[3];
+
+ if ( !bubbling ) {
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[ jQuery.expando ] ? event :
+ // Object literal
+ jQuery.extend( jQuery.Event(type), event ) :
+ // Just the event type (string)
+ jQuery.Event(type);
+
+ if ( type.indexOf("!") >= 0 ) {
+ event.type = type = type.slice(0, -1);
+ event.exclusive = true;
+ }
+
+ // Handle a global trigger
+ if ( !elem ) {
+ // Don't bubble custom events when global (to avoid too much overhead)
+ event.stopPropagation();
+
+ // Only trigger if we've ever bound an event for it
+ if ( jQuery.event.global[ type ] ) {
+ jQuery.each( jQuery.cache, function() {
+ if ( this.events && this.events[type] ) {
+ jQuery.event.trigger( event, data, this.handle.elem );
+ }
+ });
+ }
+ }
+
+ // Handle triggering a single element
+
+ // don't do events on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return undefined;
+ }
+
+ // Clean up in case it is reused
+ event.result = undefined;
+ event.target = elem;
+
+ // Clone the incoming data, if any
+ data = jQuery.makeArray( data );
+ data.unshift( event );
+ }
+
+ event.currentTarget = elem;
+
+ // Trigger the event, it is assumed that "handle" is a function
+ var handle = elem.nodeType ?
+ jQuery.data( elem, "handle" ) :
+ (jQuery.data( elem, "__events__" ) || {}).handle;
+
+ if ( handle ) {
+ handle.apply( elem, data );
+ }
+
+ var parent = elem.parentNode || elem.ownerDocument;
+
+ // Trigger an inline bound script
+ try {
+ if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
+ if ( elem[ "on" + type ] && elem[ "on" + type ].apply( elem, data ) === false ) {
+ event.result = false;
+ event.preventDefault();
+ }
+ }
+
+ // prevent IE from throwing an error for some elements with some event types, see #3533
+ } catch (inlineError) {}
+
+ if ( !event.isPropagationStopped() && parent ) {
+ jQuery.event.trigger( event, data, parent, true );
+
+ } else if ( !event.isDefaultPrevented() ) {
+ var target = event.target, old, targetType = type.replace(rnamespaces, ""),
+ isClick = jQuery.nodeName(target, "a") && targetType === "click",
+ special = jQuery.event.special[ targetType ] || {};
+
+ if ( (!special._default || special._default.call( elem, event ) === false) &&
+ !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) {
+
+ try {
+ if ( target[ targetType ] ) {
+ // Make sure that we don't accidentally re-trigger the onFOO events
+ old = target[ "on" + targetType ];
+
+ if ( old ) {
+ target[ "on" + targetType ] = null;
+ }
+
+ jQuery.event.triggered = true;
+ target[ targetType ]();
+ }
+
+ // prevent IE from throwing an error for some elements with some event types, see #3533
+ } catch (triggerError) {}
+
+ if ( old ) {
+ target[ "on" + targetType ] = old;
+ }
+
+ jQuery.event.triggered = false;
+ }
+ }
+ },
+
+ handle: function( event ) {
+ var all, handlers, namespaces, namespace_sort = [], namespace_re, events, args = jQuery.makeArray( arguments );
+
+ event = args[0] = jQuery.event.fix( event || window.event );
+ event.currentTarget = this;
+
+ // Namespaced event handlers
+ all = event.type.indexOf(".") < 0 && !event.exclusive;
+
+ if ( !all ) {
+ namespaces = event.type.split(".");
+ event.type = namespaces.shift();
+ namespace_sort = namespaces.slice(0).sort();
+ namespace_re = new RegExp("(^|\\.)" + namespace_sort.join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ event.namespace = event.namespace || namespace_sort.join(".");
+
+ events = jQuery.data(this, this.nodeType ? "events" : "__events__");
+
+ if ( typeof events === "function" ) {
+ events = events.events;
+ }
+
+ handlers = (events || {})[ event.type ];
+
+ if ( events && handlers ) {
+ // Clone the handlers to prevent manipulation
+ handlers = handlers.slice(0);
+
+ for ( var j = 0, l = handlers.length; j < l; j++ ) {
+ var handleObj = handlers[ j ];
+
+ // Filter the functions by class
+ if ( all || namespace_re.test( handleObj.namespace ) ) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ event.handler = handleObj.handler;
+ event.data = handleObj.data;
+ event.handleObj = handleObj;
+
+ var ret = handleObj.handler.apply( this, args );
+
+ if ( ret !== undefined ) {
+ event.result = ret;
+ if ( ret === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+
+ if ( event.isImmediatePropagationStopped() ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // store a copy of the original event object
+ // and "clone" to set read-only properties
+ var originalEvent = event;
+ event = jQuery.Event( originalEvent );
+
+ for ( var i = this.props.length, prop; i; ) {
+ prop = this.props[ --i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Fix target property, if necessary
+ if ( !event.target ) {
+ event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
+ }
+
+ // check if target is a textnode (safari)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && event.fromElement ) {
+ event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
+ }
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && event.clientX != null ) {
+ var doc = document.documentElement, body = document.body;
+ event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
+ event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
+ }
+
+ // Add which for key events
+ if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
+ event.which = event.charCode != null ? event.charCode : event.keyCode;
+ }
+
+ // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
+ if ( !event.metaKey && event.ctrlKey ) {
+ event.metaKey = event.ctrlKey;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && event.button !== undefined ) {
+ event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
+ }
+
+ return event;
+ },
+
+ // Deprecated, use jQuery.guid instead
+ guid: 1E8,
+
+ // Deprecated, use jQuery.proxy instead
+ proxy: jQuery.proxy,
+
+ special: {
+ ready: {
+ // Make sure the ready event is setup
+ setup: jQuery.bindReady,
+ teardown: jQuery.noop
+ },
+
+ live: {
+ add: function( handleObj ) {
+ jQuery.event.add( this,
+ liveConvert( handleObj.origType, handleObj.selector ),
+ jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
+ },
+
+ remove: function( handleObj ) {
+ jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
+ }
+ },
+
+ beforeunload: {
+ setup: function( data, namespaces, eventHandle ) {
+ // We only want to do this special case on windows
+ if ( jQuery.isWindow( this ) ) {
+ this.onbeforeunload = eventHandle;
+ }
+ },
+
+ teardown: function( namespaces, eventHandle ) {
+ if ( this.onbeforeunload === eventHandle ) {
+ this.onbeforeunload = null;
+ }
+ }
+ }
+ }
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ if ( elem.detachEvent ) {
+ elem.detachEvent( "on" + type, handle );
+ }
+ };
+
+jQuery.Event = function( src ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !this.preventDefault ) {
+ return new jQuery.Event( src );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // timeStamp is buggy for some events on Firefox(#3843)
+ // So we won't rely on the native value
+ this.timeStamp = jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+ return false;
+}
+function returnTrue() {
+ return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ preventDefault: function() {
+ this.isDefaultPrevented = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+
+ // if preventDefault exists run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // otherwise set the returnValue property of the original event to false (IE)
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ this.isPropagationStopped = returnTrue;
+
+ var e = this.originalEvent;
+ if ( !e ) {
+ return;
+ }
+ // if stopPropagation exists run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ // otherwise set the cancelBubble property of the original event to true (IE)
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ },
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse
+};
+
+// Checks if an event happened on an element within another element
+// Used in jQuery.event.special.mouseenter and mouseleave handlers
+var withinElement = function( event ) {
+ // Check if mouse(over|out) are still within the same parent element
+ var parent = event.relatedTarget;
+
+ // Firefox sometimes assigns relatedTarget a XUL element
+ // which we cannot access the parentNode property of
+ try {
+ // Traverse up the tree
+ while ( parent && parent !== this ) {
+ parent = parent.parentNode;
+ }
+
+ if ( parent !== this ) {
+ // set the correct event type
+ event.type = event.data;
+
+ // handle event if we actually just moused on to a non sub-element
+ jQuery.event.handle.apply( this, arguments );
+ }
+
+ // assuming we've left the element since we most likely mousedover a xul element
+ } catch(e) { }
+},
+
+// In case of event delegation, we only need to rename the event.type,
+// liveHandler will take care of the rest.
+delegate = function( event ) {
+ event.type = event.data;
+ jQuery.event.handle.apply( this, arguments );
+};
+
+// Create mouseenter and mouseleave events
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ setup: function( data ) {
+ jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
+ },
+ teardown: function( data ) {
+ jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
+ }
+ };
+});
+
+// submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function( data, namespaces ) {
+ if ( this.nodeName.toLowerCase() !== "form" ) {
+ jQuery.event.add(this, "click.specialSubmit", function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
+ e.liveFired = undefined;
+ return trigger( "submit", this, arguments );
+ }
+ });
+
+ jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
+ e.liveFired = undefined;
+ return trigger( "submit", this, arguments );
+ }
+ });
+
+ } else {
+ return false;
+ }
+ },
+
+ teardown: function( namespaces ) {
+ jQuery.event.remove( this, ".specialSubmit" );
+ }
+ };
+
+}
+
+// change delegation, happens here so we have bind.
+if ( !jQuery.support.changeBubbles ) {
+
+ var changeFilters,
+
+ getVal = function( elem ) {
+ var type = elem.type, val = elem.value;
+
+ if ( type === "radio" || type === "checkbox" ) {
+ val = elem.checked;
+
+ } else if ( type === "select-multiple" ) {
+ val = elem.selectedIndex > -1 ?
+ jQuery.map( elem.options, function( elem ) {
+ return elem.selected;
+ }).join("-") :
+ "";
+
+ } else if ( elem.nodeName.toLowerCase() === "select" ) {
+ val = elem.selectedIndex;
+ }
+
+ return val;
+ },
+
+ testChange = function testChange( e ) {
+ var elem = e.target, data, val;
+
+ if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
+ return;
+ }
+
+ data = jQuery.data( elem, "_change_data" );
+ val = getVal(elem);
+
+ // the current data will be also retrieved by beforeactivate
+ if ( e.type !== "focusout" || elem.type !== "radio" ) {
+ jQuery.data( elem, "_change_data", val );
+ }
+
+ if ( data === undefined || val === data ) {
+ return;
+ }
+
+ if ( data != null || val ) {
+ e.type = "change";
+ e.liveFired = undefined;
+ return jQuery.event.trigger( e, arguments[1], elem );
+ }
+ };
+
+ jQuery.event.special.change = {
+ filters: {
+ focusout: testChange,
+
+ beforedeactivate: testChange,
+
+ click: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Change has to be called before submit
+ // Keydown will be called before keypress, which is used in submit-event delegation
+ keydown: function( e ) {
+ var elem = e.target, type = elem.type;
+
+ if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
+ (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
+ type === "select-multiple" ) {
+ return testChange.call( this, e );
+ }
+ },
+
+ // Beforeactivate happens also before the previous element is blurred
+ // with this event you can't trigger a change event, but you can store
+ // information
+ beforeactivate: function( e ) {
+ var elem = e.target;
+ jQuery.data( elem, "_change_data", getVal(elem) );
+ }
+ },
+
+ setup: function( data, namespaces ) {
+ if ( this.type === "file" ) {
+ return false;
+ }
+
+ for ( var type in changeFilters ) {
+ jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
+ }
+
+ return rformElems.test( this.nodeName );
+ },
+
+ teardown: function( namespaces ) {
+ jQuery.event.remove( this, ".specialChange" );
+
+ return rformElems.test( this.nodeName );
+ }
+ };
+
+ changeFilters = jQuery.event.special.change.filters;
+
+ // Handle when the input is .focus()'d
+ changeFilters.focus = changeFilters.beforeactivate;
+}
+
+function trigger( type, elem, args ) {
+ args[0].type = type;
+ return jQuery.event.handle.apply( elem, args );
+}
+
+// Create "bubbling" focus and blur events
+if ( document.addEventListener ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( focusCounts[fix]++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --focusCounts[fix] === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+
+ function handler( e ) {
+ e = jQuery.event.fix( e );
+ e.type = fix;
+ return jQuery.event.trigger( e, null, e.target );
+ }
+ });
+}
+
+jQuery.each(["bind", "one"], function( i, name ) {
+ jQuery.fn[ name ] = function( type, data, fn ) {
+ // Handle object literals
+ if ( typeof type === "object" ) {
+ for ( var key in type ) {
+ this[ name ](key, data, type[key], fn);
+ }
+ return this;
+ }
+
+ if ( jQuery.isFunction( data ) || data === false ) {
+ fn = data;
+ data = undefined;
+ }
+
+ var handler = name === "one" ? jQuery.proxy( fn, function( event ) {
+ jQuery( this ).unbind( event, handler );
+ return fn.apply( this, arguments );
+ }) : fn;
+
+ if ( type === "unload" && name !== "one" ) {
+ this.one( type, data, fn );
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ jQuery.event.add( this[i], type, handler, data );
+ }
+ }
+
+ return this;
+ };
+});
+
+jQuery.fn.extend({
+ unbind: function( type, fn ) {
+ // Handle object literals
+ if ( typeof type === "object" && !type.preventDefault ) {
+ for ( var key in type ) {
+ this.unbind(key, type[key]);
+ }
+
+ } else {
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ jQuery.event.remove( this[i], type, fn );
+ }
+ }
+
+ return this;
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.live( types, data, fn, selector );
+ },
+
+ undelegate: function( selector, types, fn ) {
+ if ( arguments.length === 0 ) {
+ return this.unbind( "live" );
+
+ } else {
+ return this.die( types, null, fn, selector );
+ }
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+
+ triggerHandler: function( type, data ) {
+ if ( this[0] ) {
+ var event = jQuery.Event( type );
+ event.preventDefault();
+ event.stopPropagation();
+ jQuery.event.trigger( event, data, this[0] );
+ return event.result;
+ }
+ },
+
+ toggle: function( fn ) {
+ // Save reference to arguments for access in closure
+ var args = arguments, i = 1;
+
+ // link all the functions, so any of them can unbind this click handler
+ while ( i < args.length ) {
+ jQuery.proxy( fn, args[ i++ ] );
+ }
+
+ return this.click( jQuery.proxy( fn, function( event ) {
+ // Figure out which function to execute
+ var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+ jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+ // Make sure that clicks stop
+ event.preventDefault();
+
+ // and execute the function
+ return args[ lastToggle ].apply( this, arguments ) || false;
+ }));
+ },
+
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ }
+});
+
+var liveMap = {
+ focus: "focusin",
+ blur: "focusout",
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+};
+
+jQuery.each(["live", "die"], function( i, name ) {
+ jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
+ var type, i = 0, match, namespaces, preType,
+ selector = origSelector || this.selector,
+ context = origSelector ? this : jQuery( this.context );
+
+ if ( typeof types === "object" && !types.preventDefault ) {
+ for ( var key in types ) {
+ context[ name ]( key, data, types[key], selector );
+ }
+
+ return this;
+ }
+
+ if ( jQuery.isFunction( data ) ) {
+ fn = data;
+ data = undefined;
+ }
+
+ types = (types || "").split(" ");
+
+ while ( (type = types[ i++ ]) != null ) {
+ match = rnamespaces.exec( type );
+ namespaces = "";
+
+ if ( match ) {
+ namespaces = match[0];
+ type = type.replace( rnamespaces, "" );
+ }
+
+ if ( type === "hover" ) {
+ types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
+ continue;
+ }
+
+ preType = type;
+
+ if ( type === "focus" || type === "blur" ) {
+ types.push( liveMap[ type ] + namespaces );
+ type = type + namespaces;
+
+ } else {
+ type = (liveMap[ type ] || type) + namespaces;
+ }
+
+ if ( name === "live" ) {
+ // bind live handler
+ for ( var j = 0, l = context.length; j < l; j++ ) {
+ jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
+ { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
+ }
+
+ } else {
+ // unbind live handler
+ context.unbind( "live." + liveConvert( type, selector ), fn );
+ }
+ }
+
+ return this;
+ };
+});
+
+function liveHandler( event ) {
+ var stop, maxLevel, elems = [], selectors = [],
+ related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
+ events = jQuery.data( this, this.nodeType ? "events" : "__events__" );
+
+ if ( typeof events === "function" ) {
+ events = events.events;
+ }
+
+ // Make sure we avoid non-left-click bubbling in Firefox (#3861)
+ if ( event.liveFired === this || !events || !events.live || event.button && event.type === "click" ) {
+ return;
+ }
+
+ if ( event.namespace ) {
+ namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
+ }
+
+ event.liveFired = this;
+
+ var live = events.live.slice(0);
+
+ for ( j = 0; j < live.length; j++ ) {
+ handleObj = live[j];
+
+ if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
+ selectors.push( handleObj.selector );
+
+ } else {
+ live.splice( j--, 1 );
+ }
+ }
+
+ match = jQuery( event.target ).closest( selectors, event.currentTarget );
+
+ for ( i = 0, l = match.length; i < l; i++ ) {
+ close = match[i];
+
+ for ( j = 0; j < live.length; j++ ) {
+ handleObj = live[j];
+
+ if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) ) {
+ elem = close.elem;
+ related = null;
+
+ // Those two events require additional checking
+ if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
+ event.type = handleObj.preType;
+ related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
+ }
+
+ if ( !related || related !== elem ) {
+ elems.push({ elem: elem, handleObj: handleObj, level: close.level });
+ }
+ }
+ }
+ }
+
+ for ( i = 0, l = elems.length; i < l; i++ ) {
+ match = elems[i];
+
+ if ( maxLevel && match.level > maxLevel ) {
+ break;
+ }
+
+ event.currentTarget = match.elem;
+ event.data = match.handleObj.data;
+ event.handleObj = match.handleObj;
+
+ ret = match.handleObj.origHandler.apply( match.elem, arguments );
+
+ if ( ret === false || event.isPropagationStopped() ) {
+ maxLevel = match.level;
+
+ if ( ret === false ) {
+ stop = false;
+ }
+ }
+ }
+
+ return stop;
+}
+
+function liveConvert( type, selector ) {
+ return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspace, "&");
+}
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ if ( fn == null ) {
+ fn = data;
+ data = null;
+ }
+
+ return arguments.length > 0 ?
+ this.bind( name, data, fn ) :
+ this.trigger( name );
+ };
+
+ if ( jQuery.attrFn ) {
+ jQuery.attrFn[ name ] = true;
+ }
+});
+
+// Prevent memory leaks in IE
+// Window isn't included so as not to unbind existing unload events
+// More info:
+// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
+if ( window.attachEvent && !window.addEventListener ) {
+ jQuery(window).bind("unload", function() {
+ for ( var id in jQuery.cache ) {
+ if ( jQuery.cache[ id ].handle ) {
+ // Try/Catch is to handle iframes being unloaded, see #4280
+ try {
+ jQuery.event.remove( jQuery.cache[ id ].handle.elem );
+ } catch(e) {}
+ }
+ }
+ });
+}
+
+
+/*!
+ * Sizzle CSS Selector Engine - v1.0
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+ done = 0,
+ toString = Object.prototype.toString,
+ hasDuplicate = false,
+ baseHasDuplicate = true;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+// Thus far that includes Google Chrome.
+[0, 0].sort(function(){
+ baseHasDuplicate = false;
+ return 0;
+});
+
+var Sizzle = function(selector, context, results, seed) {
+ results = results || [];
+ context = context || document;
+
+ var origContext = context;
+
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ var parts = [], m, set, checkSet, extra, prune = true, contextXML = Sizzle.isXML(context),
+ soFar = selector, ret, cur, pop, i;
+
+ // Reset the position of the chunker regexp (start from head)
+ do {
+ chunker.exec("");
+ m = chunker.exec(soFar);
+
+ if ( m ) {
+ soFar = m[3];
+
+ parts.push( m[1] );
+
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
+ }
+ } while ( m );
+
+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+ set = posProcess( parts[0] + parts[1], context );
+ } else {
+ set = Expr.relative[ parts[0] ] ?
+ [ context ] :
+ Sizzle( parts.shift(), context );
+
+ while ( parts.length ) {
+ selector = parts.shift();
+
+ if ( Expr.relative[ selector ] ) {
+ selector += parts.shift();
+ }
+
+ set = posProcess( selector, set );
+ }
+ }
+ } else {
+ // Take a shortcut and set the context if the root selector is an ID
+ // (but not if it'll be faster if the inner selector is an ID)
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+ ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
+ }
+
+ if ( context ) {
+ ret = seed ?
+ { expr: parts.pop(), set: makeArray(seed) } :
+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+ set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
+
+ if ( parts.length > 0 ) {
+ checkSet = makeArray(set);
+ } else {
+ prune = false;
+ }
+
+ while ( parts.length ) {
+ cur = parts.pop();
+ pop = cur;
+
+ if ( !Expr.relative[ cur ] ) {
+ cur = "";
+ } else {
+ pop = parts.pop();
+ }
+
+ if ( pop == null ) {
+ pop = context;
+ }
+
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
+ }
+ } else {
+ checkSet = parts = [];
+ }
+ }
+
+ if ( !checkSet ) {
+ checkSet = set;
+ }
+
+ if ( !checkSet ) {
+ Sizzle.error( cur || selector );
+ }
+
+ if ( toString.call(checkSet) === "[object Array]" ) {
+ if ( !prune ) {
+ results.push.apply( results, checkSet );
+ } else if ( context && context.nodeType === 1 ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+ results.push( set[i] );
+ }
+ }
+ } else {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+ results.push( set[i] );
+ }
+ }
+ }
+ } else {
+ makeArray( checkSet, results );
+ }
+
+ if ( extra ) {
+ Sizzle( extra, origContext, results, seed );
+ Sizzle.uniqueSort( results );
+ }
+
+ return results;
+};
+
+Sizzle.uniqueSort = function(results){
+ if ( sortOrder ) {
+ hasDuplicate = baseHasDuplicate;
+ results.sort(sortOrder);
+
+ if ( hasDuplicate ) {
+ for ( var i = 1; i < results.length; i++ ) {
+ if ( results[i] === results[i-1] ) {
+ results.splice(i--, 1);
+ }
+ }
+ }
+ }
+
+ return results;
+};
+
+Sizzle.matches = function(expr, set){
+ return Sizzle(expr, null, null, set);
+};
+
+Sizzle.matchesSelector = function(node, expr){
+ return Sizzle(expr, null, null, [node]).length > 0;
+};
+
+Sizzle.find = function(expr, context, isXML){
+ var set;
+
+ if ( !expr ) {
+ return [];
+ }
+
+ for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+ var type = Expr.order[i], match;
+
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+ var left = match[1];
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) !== "\\" ) {
+ match[1] = (match[1] || "").replace(/\\/g, "");
+ set = Expr.find[ type ]( match, context, isXML );
+ if ( set != null ) {
+ expr = expr.replace( Expr.match[ type ], "" );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !set ) {
+ set = context.getElementsByTagName("*");
+ }
+
+ return {set: set, expr: expr};
+};
+
+Sizzle.filter = function(expr, set, inplace, not){
+ var old = expr, result = [], curLoop = set, match, anyFound,
+ isXMLFilter = set && set[0] && Sizzle.isXML(set[0]);
+
+ while ( expr && set.length ) {
+ for ( var type in Expr.filter ) {
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+ var filter = Expr.filter[ type ], found, item, left = match[1];
+ anyFound = false;
+
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) === "\\" ) {
+ continue;
+ }
+
+ if ( curLoop === result ) {
+ result = [];
+ }
+
+ if ( Expr.preFilter[ type ] ) {
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+ if ( !match ) {
+ anyFound = found = true;
+ } else if ( match === true ) {
+ continue;
+ }
+ }
+
+ if ( match ) {
+ for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
+ if ( item ) {
+ found = filter( item, match, i, curLoop );
+ var pass = not ^ !!found;
+
+ if ( inplace && found != null ) {
+ if ( pass ) {
+ anyFound = true;
+ } else {
+ curLoop[i] = false;
+ }
+ } else if ( pass ) {
+ result.push( item );
+ anyFound = true;
+ }
+ }
+ }
+ }
+
+ if ( found !== undefined ) {
+ if ( !inplace ) {
+ curLoop = result;
+ }
+
+ expr = expr.replace( Expr.match[ type ], "" );
+
+ if ( !anyFound ) {
+ return [];
+ }
+
+ break;
+ }
+ }
+ }
+
+ // Improper expression
+ if ( expr === old ) {
+ if ( anyFound == null ) {
+ Sizzle.error( expr );
+ } else {
+ break;
+ }
+ }
+
+ old = expr;
+ }
+
+ return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+ throw "Syntax error, unrecognized expression: " + msg;
+};
+
+var Expr = Sizzle.selectors = {
+ order: [ "ID", "NAME", "TAG" ],
+ match: {
+ ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+ },
+ leftMatch: {},
+ attrMap: {
+ "class": "className",
+ "for": "htmlFor"
+ },
+ attrHandle: {
+ href: function(elem){
+ return elem.getAttribute("href");
+ }
+ },
+ relative: {
+ "+": function(checkSet, part){
+ var isPartStr = typeof part === "string",
+ isTag = isPartStr && !/\W/.test(part),
+ isPartStrNotTag = isPartStr && !isTag;
+
+ if ( isTag ) {
+ part = part.toLowerCase();
+ }
+
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+ if ( (elem = checkSet[i]) ) {
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+ elem || false :
+ elem === part;
+ }
+ }
+
+ if ( isPartStrNotTag ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ },
+ ">": function(checkSet, part){
+ var isPartStr = typeof part === "string",
+ elem, i = 0, l = checkSet.length;
+
+ if ( isPartStr && !/\W/.test(part) ) {
+ part = part.toLowerCase();
+
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+ if ( elem ) {
+ var parent = elem.parentNode;
+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+ }
+ }
+ } else {
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+ if ( elem ) {
+ checkSet[i] = isPartStr ?
+ elem.parentNode :
+ elem.parentNode === part;
+ }
+ }
+
+ if ( isPartStr ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ }
+ },
+ "": function(checkSet, part, isXML){
+ var doneName = done++, checkFn = dirCheck, nodeCheck;
+
+ if ( typeof part === "string" && !/\W/.test(part) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
+ },
+ "~": function(checkSet, part, isXML){
+ var doneName = done++, checkFn = dirCheck, nodeCheck;
+
+ if ( typeof part === "string" && !/\W/.test(part) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
+ }
+ },
+ find: {
+ ID: function(match, context, isXML){
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ },
+ NAME: function(match, context){
+ if ( typeof context.getElementsByName !== "undefined" ) {
+ var ret = [], results = context.getElementsByName(match[1]);
+
+ for ( var i = 0, l = results.length; i < l; i++ ) {
+ if ( results[i].getAttribute("name") === match[1] ) {
+ ret.push( results[i] );
+ }
+ }
+
+ return ret.length === 0 ? null : ret;
+ }
+ },
+ TAG: function(match, context){
+ return context.getElementsByTagName(match[1]);
+ }
+ },
+ preFilter: {
+ CLASS: function(match, curLoop, inplace, result, not, isXML){
+ match = " " + match[1].replace(/\\/g, "") + " ";
+
+ if ( isXML ) {
+ return match;
+ }
+
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+ if ( elem ) {
+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) {
+ if ( !inplace ) {
+ result.push( elem );
+ }
+ } else if ( inplace ) {
+ curLoop[i] = false;
+ }
+ }
+ }
+
+ return false;
+ },
+ ID: function(match){
+ return match[1].replace(/\\/g, "");
+ },
+ TAG: function(match, curLoop){
+ return match[1].toLowerCase();
+ },
+ CHILD: function(match){
+ if ( match[1] === "nth" ) {
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+ var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+ // calculate the numbers (first)n+(last) including if they are negative
+ match[2] = (test[1] + (test[2] || 1)) - 0;
+ match[3] = test[3] - 0;
+ }
+
+ // TODO: Move to normal caching system
+ match[0] = done++;
+
+ return match;
+ },
+ ATTR: function(match, curLoop, inplace, result, not, isXML){
+ var name = match[1].replace(/\\/g, "");
+
+ if ( !isXML && Expr.attrMap[name] ) {
+ match[1] = Expr.attrMap[name];
+ }
+
+ if ( match[2] === "~=" ) {
+ match[4] = " " + match[4] + " ";
+ }
+
+ return match;
+ },
+ PSEUDO: function(match, curLoop, inplace, result, not){
+ if ( match[1] === "not" ) {
+ // If we're dealing with a complex expression, or a simple one
+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+ match[3] = Sizzle(match[3], null, null, curLoop);
+ } else {
+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+ if ( !inplace ) {
+ result.push.apply( result, ret );
+ }
+ return false;
+ }
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+ return true;
+ }
+
+ return match;
+ },
+ POS: function(match){
+ match.unshift( true );
+ return match;
+ }
+ },
+ filters: {
+ enabled: function(elem){
+ return elem.disabled === false && elem.type !== "hidden";
+ },
+ disabled: function(elem){
+ return elem.disabled === true;
+ },
+ checked: function(elem){
+ return elem.checked === true;
+ },
+ selected: function(elem){
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ elem.parentNode.selectedIndex;
+ return elem.selected === true;
+ },
+ parent: function(elem){
+ return !!elem.firstChild;
+ },
+ empty: function(elem){
+ return !elem.firstChild;
+ },
+ has: function(elem, i, match){
+ return !!Sizzle( match[3], elem ).length;
+ },
+ header: function(elem){
+ return (/h\d/i).test( elem.nodeName );
+ },
+ text: function(elem){
+ return "text" === elem.type;
+ },
+ radio: function(elem){
+ return "radio" === elem.type;
+ },
+ checkbox: function(elem){
+ return "checkbox" === elem.type;
+ },
+ file: function(elem){
+ return "file" === elem.type;
+ },
+ password: function(elem){
+ return "password" === elem.type;
+ },
+ submit: function(elem){
+ return "submit" === elem.type;
+ },
+ image: function(elem){
+ return "image" === elem.type;
+ },
+ reset: function(elem){
+ return "reset" === elem.type;
+ },
+ button: function(elem){
+ return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
+ },
+ input: function(elem){
+ return (/input|select|textarea|button/i).test(elem.nodeName);
+ }
+ },
+ setFilters: {
+ first: function(elem, i){
+ return i === 0;
+ },
+ last: function(elem, i, match, array){
+ return i === array.length - 1;
+ },
+ even: function(elem, i){
+ return i % 2 === 0;
+ },
+ odd: function(elem, i){
+ return i % 2 === 1;
+ },
+ lt: function(elem, i, match){
+ return i < match[3] - 0;
+ },
+ gt: function(elem, i, match){
+ return i > match[3] - 0;
+ },
+ nth: function(elem, i, match){
+ return match[3] - 0 === i;
+ },
+ eq: function(elem, i, match){
+ return match[3] - 0 === i;
+ }
+ },
+ filter: {
+ PSEUDO: function(elem, match, i, array){
+ var name = match[1], filter = Expr.filters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ } else if ( name === "contains" ) {
+ return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
+ } else if ( name === "not" ) {
+ var not = match[3];
+
+ for ( var j = 0, l = not.length; j < l; j++ ) {
+ if ( not[j] === elem ) {
+ return false;
+ }
+ }
+
+ return true;
+ } else {
+ Sizzle.error( "Syntax error, unrecognized expression: " + name );
+ }
+ },
+ CHILD: function(elem, match){
+ var type = match[1], node = elem;
+ switch (type) {
+ case 'only':
+ case 'first':
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ if ( type === "first" ) {
+ return true;
+ }
+ node = elem;
+ case 'last':
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ return true;
+ case 'nth':
+ var first = match[2], last = match[3];
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ var doneName = match[0],
+ parent = elem.parentNode;
+
+ if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
+ var count = 0;
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ node.nodeIndex = ++count;
+ }
+ }
+ parent.sizcache = doneName;
+ }
+
+ var diff = elem.nodeIndex - last;
+ if ( first === 0 ) {
+ return diff === 0;
+ } else {
+ return ( diff % first === 0 && diff / first >= 0 );
+ }
+ }
+ },
+ ID: function(elem, match){
+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
+ },
+ TAG: function(elem, match){
+ return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
+ },
+ CLASS: function(elem, match){
+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
+ .indexOf( match ) > -1;
+ },
+ ATTR: function(elem, match){
+ var name = match[1],
+ result = Expr.attrHandle[ name ] ?
+ Expr.attrHandle[ name ]( elem ) :
+ elem[ name ] != null ?
+ elem[ name ] :
+ elem.getAttribute( name ),
+ value = result + "",
+ type = match[2],
+ check = match[4];
+
+ return result == null ?
+ type === "!=" :
+ type === "=" ?
+ value === check :
+ type === "*=" ?
+ value.indexOf(check) >= 0 :
+ type === "~=" ?
+ (" " + value + " ").indexOf(check) >= 0 :
+ !check ?
+ value && result !== false :
+ type === "!=" ?
+ value !== check :
+ type === "^=" ?
+ value.indexOf(check) === 0 :
+ type === "$=" ?
+ value.substr(value.length - check.length) === check :
+ type === "|=" ?
+ value === check || value.substr(0, check.length + 1) === check + "-" :
+ false;
+ },
+ POS: function(elem, match, i, array){
+ var name = match[2], filter = Expr.setFilters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ }
+ }
+ }
+};
+
+var origPOS = Expr.match.POS,
+ fescape = function(all, num){
+ return "\\" + (num - 0 + 1);
+ };
+
+for ( var type in Expr.match ) {
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+
+var makeArray = function(array, results) {
+ array = Array.prototype.slice.call( array, 0 );
+
+ if ( results ) {
+ results.push.apply( results, array );
+ return results;
+ }
+
+ return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch(e){
+ makeArray = function(array, results) {
+ var ret = results || [], i = 0;
+
+ if ( toString.call(array) === "[object Array]" ) {
+ Array.prototype.push.apply( ret, array );
+ } else {
+ if ( typeof array.length === "number" ) {
+ for ( var l = array.length; i < l; i++ ) {
+ ret.push( array[i] );
+ }
+ } else {
+ for ( ; array[i]; i++ ) {
+ ret.push( array[i] );
+ }
+ }
+ }
+
+ return ret;
+ };
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+ return a.compareDocumentPosition ? -1 : 1;
+ }
+
+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+ };
+} else {
+ sortOrder = function( a, b ) {
+ var ap = [], bp = [], aup = a.parentNode, bup = b.parentNode,
+ cur = aup, al, bl;
+
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
+ }
+
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
+ }
+ }
+
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+ siblingCheck = function( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
+ }
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
+ };
+}
+
+// Utility function for retreiving the text value of an array of DOM nodes
+Sizzle.getText = function( elems ) {
+ var ret = "", elem;
+
+ for ( var i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += Sizzle.getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+};
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+ // We're going to inject a fake input element with a specified name
+ var form = document.createElement("div"),
+ id = "script" + (new Date()).getTime();
+ form.innerHTML = "";
+
+ // Inject it into the root element, check its status, and remove it quickly
+ var root = document.documentElement;
+ root.insertBefore( form, root.firstChild );
+
+ // The workaround has to do additional checks after a getElementById
+ // Which slows things down for other browsers (hence the branching)
+ if ( document.getElementById( id ) ) {
+ Expr.find.ID = function(match, context, isXML){
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
+ }
+ };
+
+ Expr.filter.ID = function(elem, match){
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return elem.nodeType === 1 && node && node.nodeValue === match;
+ };
+ }
+
+ root.removeChild( form );
+ root = form = null; // release memory in IE
+})();
+
+(function(){
+ // Check to see if the browser returns only elements
+ // when doing getElementsByTagName("*")
+
+ // Create a fake element
+ var div = document.createElement("div");
+ div.appendChild( document.createComment("") );
+
+ // Make sure no comments are found
+ if ( div.getElementsByTagName("*").length > 0 ) {
+ Expr.find.TAG = function(match, context){
+ var results = context.getElementsByTagName(match[1]);
+
+ // Filter out possible comments
+ if ( match[1] === "*" ) {
+ var tmp = [];
+
+ for ( var i = 0; results[i]; i++ ) {
+ if ( results[i].nodeType === 1 ) {
+ tmp.push( results[i] );
+ }
+ }
+
+ results = tmp;
+ }
+
+ return results;
+ };
+ }
+
+ // Check to see if an attribute returns normalized href attributes
+ div.innerHTML = "";
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+ Expr.attrHandle.href = function(elem){
+ return elem.getAttribute("href", 2);
+ };
+ }
+
+ div = null; // release memory in IE
+})();
+
+if ( document.querySelectorAll ) {
+ (function(){
+ var oldSizzle = Sizzle, div = document.createElement("div");
+ div.innerHTML = "";
+
+ // Safari can't handle uppercase or unicode characters when
+ // in quirks mode.
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+ return;
+ }
+
+ Sizzle = function(query, context, extra, seed){
+ context = context || document;
+
+ // Only use querySelectorAll on non-XML documents
+ // (ID selectors don't work in non-HTML documents)
+ if ( !seed && !Sizzle.isXML(context) ) {
+ if ( context.nodeType === 9 ) {
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(qsaError) {}
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ var old = context.id, id = context.id = "__sizzle__";
+
+ try {
+ return makeArray( context.querySelectorAll( "#" + id + " " + query ), extra );
+
+ } catch(pseudoError) {
+ } finally {
+ if ( old ) {
+ context.id = old;
+
+ } else {
+ context.removeAttribute( "id" );
+ }
+ }
+ }
+ }
+
+ return oldSizzle(query, context, extra, seed);
+ };
+
+ for ( var prop in oldSizzle ) {
+ Sizzle[ prop ] = oldSizzle[ prop ];
+ }
+
+ div = null; // release memory in IE
+ })();
+}
+
+(function(){
+ var html = document.documentElement,
+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector,
+ pseudoWorks = false;
+
+ try {
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( document.documentElement, ":sizzle" );
+
+ } catch( pseudoError ) {
+ pseudoWorks = true;
+ }
+
+ if ( matches ) {
+ Sizzle.matchesSelector = function( node, expr ) {
+ try {
+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) ) {
+ return matches.call( node, expr );
+ }
+ } catch(e) {}
+
+ return Sizzle(expr, null, null, [node]).length > 0;
+ };
+ }
+})();
+
+(function(){
+ var div = document.createElement("div");
+
+ div.innerHTML = "";
+
+ // Opera can't find a second classname (in 9.6)
+ // Also, make sure that getElementsByClassName actually exists
+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+ return;
+ }
+
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
+ div.lastChild.className = "e";
+
+ if ( div.getElementsByClassName("e").length === 1 ) {
+ return;
+ }
+
+ Expr.order.splice(1, 0, "CLASS");
+ Expr.find.CLASS = function(match, context, isXML) {
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+ return context.getElementsByClassName(match[1]);
+ }
+ };
+
+ div = null; // release memory in IE
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ elem = elem[dir];
+ var match = false;
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 && !isXML ){
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+
+ if ( elem.nodeName.toLowerCase() === cur ) {
+ match = elem;
+ break;
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ elem = elem[dir];
+ var match = false;
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 ) {
+ if ( !isXML ) {
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+ if ( typeof cur !== "string" ) {
+ if ( elem === cur ) {
+ match = true;
+ break;
+ }
+
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+ match = elem;
+ break;
+ }
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+Sizzle.contains = document.documentElement.contains ? function(a, b){
+ return a !== b && (a.contains ? a.contains(b) : true);
+} : function(a, b){
+ return !!(a.compareDocumentPosition(b) & 16);
+};
+
+Sizzle.isXML = function(elem){
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function(selector, context){
+ var tmpSet = [], later = "", match,
+ root = context.nodeType ? [context] : context;
+
+ // Position selectors must be done after the filter
+ // And so must :not(positional) so we move all PSEUDOs to the end
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+ later += match[0];
+ selector = selector.replace( Expr.match.PSEUDO, "" );
+ }
+
+ selector = Expr.relative[selector] ? selector + "*" : selector;
+
+ for ( var i = 0, l = root.length; i < l; i++ ) {
+ Sizzle( selector, root[i], tmpSet );
+ }
+
+ return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+ // Note: This RegExp should be improved, or likely pulled from Sizzle
+ rmultiselector = /,/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ slice = Array.prototype.slice,
+ POS = jQuery.expr.match.POS;
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var ret = this.pushStack( "", "find", selector ), length = 0;
+
+ for ( var i = 0, l = this.length; i < l; i++ ) {
+ length = ret.length;
+ jQuery.find( selector, this[i], ret );
+
+ if ( i > 0 ) {
+ // Make sure that the results are unique
+ for ( var n = length; n < ret.length; n++ ) {
+ for ( var r = 0; r < length; r++ ) {
+ if ( ret[r] === ret[n] ) {
+ ret.splice(n--, 1);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return ret;
+ },
+
+ has: function( target ) {
+ var targets = jQuery( target );
+ return this.filter(function() {
+ for ( var i = 0, l = targets.length; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false), "not", selector);
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true), "filter", selector );
+ },
+
+ is: function( selector ) {
+ return !!selector && jQuery.filter( selector, this ).length > 0;
+ },
+
+ closest: function( selectors, context ) {
+ var ret = [], i, l, cur = this[0];
+
+ if ( jQuery.isArray( selectors ) ) {
+ var match, matches = {}, selector, level = 1;
+
+ if ( cur && selectors.length ) {
+ for ( i = 0, l = selectors.length; i < l; i++ ) {
+ selector = selectors[i];
+
+ if ( !matches[selector] ) {
+ matches[selector] = jQuery.expr.match.POS.test( selector ) ?
+ jQuery( selector, context || this.context ) :
+ selector;
+ }
+ }
+
+ while ( cur && cur.ownerDocument && cur !== context ) {
+ for ( selector in matches ) {
+ match = matches[selector];
+
+ if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
+ ret.push({ selector: selector, elem: cur, level: level });
+ }
+ }
+
+ cur = cur.parentNode;
+ level++;
+ }
+ }
+
+ return ret;
+ }
+
+ var pos = POS.test( selectors ) ?
+ jQuery( selectors, context || this.context ) : null;
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+
+ } else {
+ cur = cur.parentNode;
+ if ( !cur || !cur.ownerDocument || cur === context ) {
+ break;
+ }
+ }
+ }
+ }
+
+ ret = ret.length > 1 ? jQuery.unique(ret) : ret;
+
+ return this.pushStack( ret, "closest", selectors );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+ if ( !elem || typeof elem === "string" ) {
+ return jQuery.inArray( this[0],
+ // If it receives a string, the selector is used
+ // If it receives nothing, the siblings are used
+ elem ? jQuery( elem ) : this.parent().children() );
+ }
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context || this.context ) :
+ jQuery.makeArray( selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+ all :
+ jQuery.unique( all ) );
+ },
+
+ andSelf: function() {
+ return this.add( this.prevObject );
+ }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return jQuery.nth( elem, 2, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return jQuery.nth( elem, 2, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( elem.parentNode.firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.makeArray( elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 ? jQuery.unique( ret ) : ret;
+
+ if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret, name, slice.call(arguments).join(",") );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [], cur = elem[dir];
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ nth: function( cur, result, dir, elem ) {
+ result = result || 1;
+ var num = 0;
+
+ for ( ; cur; cur = cur[dir] ) {
+ if ( cur.nodeType === 1 && ++num === result ) {
+ break;
+ }
+ }
+
+ return cur;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ return (elem === qualifier) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem, i ) {
+ return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
+ });
+}
+
+
+
+
+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+ rtagName = /<([\w:]+)/,
+ rtbody = /\s]+\/)>/g,
+ wrapMap = {
+ option: [ 1, "" ],
+ legend: [ 1, "" ],
+ thead: [ 1, "