[gnomeweb-wp] installed the WPML multi-language plugin version 1.8.1.2 (without the "locale" folder) and the gnome



commit cfcdd766b0a7810648d8c42228695909c454a1f1
Author: Vinicius Depizzol <vdepizzol gmail com>
Date:   Thu Aug 19 19:00:34 2010 -0300

    installed the WPML multi-language plugin version 1.8.1.2 (without the "locale" folder) and the gnome website template.

 .../plugins/sitepress-multilingual-cms/ajax.php    |  984 ++++
 .../plugins/headspace2/load.php                    |  125 +
 .../headspace2/res/custom_field_translation.csv    |   24 +
 .../plugins/wp-super-cache/load.php                |   38 +
 .../themes/atahualpa/css/compatibility-package.css |    6 +
 .../themes/atahualpa/css/selector-footer.css       |   44 +
 .../themes/atahualpa/css/selector-widget.css       |   85 +
 .../themes/atahualpa/images/nav-arrow-down.png     |  Bin 0 -> 112 bytes
 .../themes/atahualpa/load.php                      |  102 +
 .../compatibility-packages/themes/genesis/load.php |   42 +
 .../themes/hybrid/css/compatibility-package.css    |    8 +
 .../themes/hybrid/css/selector-footer.css          |   44 +
 .../themes/hybrid/css/selector-header.css          |   89 +
 .../themes/hybrid/images/nav-arrow-down.png        |  Bin 0 -> 112 bytes
 .../compatibility-packages/themes/hybrid/load.php  |   86 +
 .../themes/thematic/css/compatibility-package.css  |    8 +
 .../themes/thematic/css/selector-footer.css        |   44 +
 .../themes/thematic/css/selector-header.css        |   89 +
 .../themes/thematic/images/nav-arrow-down.png      |  Bin 0 -> 112 bytes
 .../themes/thematic/load.php                       |   90 +
 .../wp-default-theme/css/compatibility-package.css |    8 +
 .../wp-default-theme/css/selector-footer.css       |   44 +
 .../themes/wp-default-theme/load.php               |   50 +
 .../docs/theme-integration/wpml-integration.php    |  166 +
 .../inc/affiliate-info.php                         |   13 +
 .../sitepress-multilingual-cms/inc/cache.php       |   81 +
 .../inc/comments-translation/functions.php         |  935 ++++
 .../comments-translation/google_languages_map.inc  |   93 +
 .../compatibility-packages/functions-packages.php  |  592 +++
 .../inc/compatibility-packages/init-packages.php   |    5 +
 .../compatibility-packages/wpml-package.class.php  |  326 ++
 .../sitepress-multilingual-cms/inc/constants.inc   |   40 +
 .../inc/functions-string-translation.php           | 1598 ++++++
 .../inc/functions-troubleshooting.php              |  257 +
 .../sitepress-multilingual-cms/inc/functions.php   |   81 +
 .../sitepress-multilingual-cms/inc/hacks.php       |   14 +
 .../inc/hacks/debug-actions.php                    |   35 +
 .../inc/hacks/language-canonical-redirects.php     |   19 +
 .../inc/hacks/language-domains-preview.php         |   25 +
 .../inc/hacks/missing-php-functions.php            |   40 +
 .../inc/hacks/supress-warnings-for-xmlrpc.php      |   11 +
 .../inc/icl-recent-comments-widget.php             |  107 +
 .../sitepress-multilingual-cms/inc/import-xml.php  |   39 +
 .../sitepress-multilingual-cms/inc/lang-data.inc   |  274 +
 .../inc/language-switcher.php                      |  704 +++
 .../inc/not-compatible-plugins.php                 |   44 +
 .../inc/php-version-check.php                      |   66 +
 .../inc/plugins-texts-functions.php                |  125 +
 .../sitepress-multilingual-cms/inc/potx.inc        | 1503 ++++++
 .../inc/pre-wp3-compatibility.php                  |   40 +
 .../inc/sitepress-schema.php                       |  389 ++
 .../sitepress-multilingual-cms/inc/support.php     |  424 ++
 .../inc/template-constants.php                     |   14 +
 .../inc/template-functions.php                     |  224 +
 .../inc/tools/gen-languages.php                    |   31 +
 .../sitepress-multilingual-cms/inc/upgrade.php     |  504 ++
 .../inc/wp-nav-menus/iclNavMenu.class.php          |  600 +++
 .../sitepress-multilingual-cms/inc/wpml-api.php    |  519 ++
 .../sitepress-multilingual-cms/lib/JSON.php        |  806 +++
 .../lib/Snoopy.class.php                           | 1318 +++++
 .../sitepress-multilingual-cms/lib/http.php        |    1 +
 .../sitepress-multilingual-cms/lib/icl_api.php     |  665 +++
 .../sitepress-multilingual-cms/lib/xml2array.php   |   93 +
 .../plugins/sitepress-multilingual-cms/license.txt |  674 +++
 .../menu/absolute-links.php                        |   72 +
 .../menu/affiliate-info.php                        |   58 +
 .../menu/basic_advanced_switch.php                 |   14 +
 .../menu/category-menu.php                         |   42 +
 .../menu/comments-translation.php                  |   62 +
 .../menu/compatibility-packages.php                |   96 +
 .../menu/content-translation-how-it-works.php      |   56 +
 .../content-translation-icl-account-wizard.php     |  217 +
 .../menu/content-translation-icl-account.php       |  151 +
 .../menu/content-translation-langs.php             |  112 +
 .../menu/content-translation-options.php           |  120 +
 .../menu/content-translation-site-description.php  |   52 +
 .../menu/content-translation-wizard-steps.php      |   24 +
 .../menu/content-translation.php                   |   97 +
 .../menu/edit-languages.php                        |  486 ++
 .../menu/icl_reminders.php                         |   25 +
 .../menu/language-selector.php                     |   94 +
 .../sitepress-multilingual-cms/menu/languages.php  |  717 +++
 .../menu/menu-footer.php                           |    5 +
 .../sitepress-multilingual-cms/menu/navigation.php |  138 +
 .../sitepress-multilingual-cms/menu/overview.php   |  187 +
 .../sitepress-multilingual-cms/menu/post-menu.php  |  288 ++
 .../menu/string-translation-translate-options.php  |   44 +
 .../menu/string-translation.php                    |  599 +++
 .../sitepress-multilingual-cms/menu/support.php    |    6 +
 .../sitepress-multilingual-cms/menu/tag-menu.php   |   28 +
 .../menu/taxonomy-menu.php                         |   28 +
 .../menu/theme-localization.php                    |  309 ++
 .../menu/translation-synchronization.php           |  252 +
 .../menu/troubleshooting.php                       |  145 +
 .../menu/upgrade_notice.php                        |   34 +
 .../absolute-links/absolute-links-plugin.php       |  884 ++++
 .../modules/absolute-links/img/ajax-loader.gif     |  Bin 0 -> 847 bytes
 .../modules/absolute-links/management-page.php     |   55 +
 .../cache-plugins-integration.php                  |  154 +
 .../modules/cache-plugins-integration/scripts.js   |   25 +
 .../modules/cms-navigation/cms-navigation.php      |  793 +++
 .../cms-navigation/css/cms-navigation-base.css     |   96 +
 .../modules/cms-navigation/css/cms-navigation.css  |  108 +
 .../modules/cms-navigation/img/cms-nav-dark-s.gif  |  Bin 0 -> 62 bytes
 .../modules/cms-navigation/img/cms-nav-grad.jpg    |  Bin 0 -> 1124 bytes
 .../modules/icl-translation/constants.inc          |   20 +
 .../modules/icl-translation/css/style.css          |   21 +
 .../modules/icl-translation/db-scheme.php          |   60 +
 .../modules/icl-translation/icl-ajx-requests.php   |   83 +
 .../modules/icl-translation/icl-reminder-popup.php |  149 +
 .../icl-translation/icl-translation-dashboard.php  |  310 ++
 .../icl-translation/icl-translation-functions.php  | 2327 +++++++++
 .../modules/icl-translation/icl-translation.php    |   40 +
 .../modules/icl-translation/js/icl-translation.js  |  353 ++
 .../modules/multiple-domains-login.php             |  130 +
 .../plugins/sitepress-multilingual-cms/readme.txt  |  382 ++
 .../res/css/affiliate-info.css                     |   10 +
 .../res/css/content-translation.css                |   76 +
 .../res/css/language-selector.css                  |  143 +
 .../res/css/languages.css                          |  108 +
 .../res/css/navigation.css                         |    6 +
 .../res/css/overview.css                           |   18 +
 .../res/css/string-translation.css                 |  157 +
 .../sitepress-multilingual-cms/res/css/style.css   |  184 +
 .../sitepress-multilingual-cms/res/css/support.css |   63 +
 .../res/css/theme-localization.css                 |   14 +
 .../res/css/translation-synchronization.css        |   26 +
 .../res/css/wp-nav-menus.css                       |   14 +
 .../res/flags/ad.alt.png                           |  Bin 0 -> 354 bytes
 .../sitepress-multilingual-cms/res/flags/ad.png    |  Bin 0 -> 494 bytes
 .../sitepress-multilingual-cms/res/flags/ae.png    |  Bin 0 -> 267 bytes
 .../sitepress-multilingual-cms/res/flags/af.png    |  Bin 0 -> 372 bytes
 .../sitepress-multilingual-cms/res/flags/ag.png    |  Bin 0 -> 518 bytes
 .../res/flags/ai.alt.png                           |  Bin 0 -> 374 bytes
 .../sitepress-multilingual-cms/res/flags/ai.png    |  Bin 0 -> 590 bytes
 .../sitepress-multilingual-cms/res/flags/al.png    |  Bin 0 -> 477 bytes
 .../sitepress-multilingual-cms/res/flags/am.png    |  Bin 0 -> 255 bytes
 .../sitepress-multilingual-cms/res/flags/an.png    |  Bin 0 -> 336 bytes
 .../sitepress-multilingual-cms/res/flags/ao.png    |  Bin 0 -> 389 bytes
 .../sitepress-multilingual-cms/res/flags/aq.png    |  Bin 0 -> 477 bytes
 .../res/flags/ar.alt.png                           |  Bin 0 -> 301 bytes
 .../sitepress-multilingual-cms/res/flags/ar.png    |  Bin 0 -> 337 bytes
 .../sitepress-multilingual-cms/res/flags/as.png    |  Bin 0 -> 551 bytes
 .../res/flags/at.alt.png                           |  Bin 0 -> 427 bytes
 .../sitepress-multilingual-cms/res/flags/at.png    |  Bin 0 -> 236 bytes
 .../sitepress-multilingual-cms/res/flags/au.png    |  Bin 0 -> 570 bytes
 .../sitepress-multilingual-cms/res/flags/aw.png    |  Bin 0 -> 365 bytes
 .../sitepress-multilingual-cms/res/flags/ax.png    |  Bin 0 -> 436 bytes
 .../sitepress-multilingual-cms/res/flags/az.png    |  Bin 0 -> 362 bytes
 .../sitepress-multilingual-cms/res/flags/ba.png    |  Bin 0 -> 494 bytes
 .../sitepress-multilingual-cms/res/flags/bb.png    |  Bin 0 -> 378 bytes
 .../sitepress-multilingual-cms/res/flags/bd.png    |  Bin 0 -> 376 bytes
 .../sitepress-multilingual-cms/res/flags/be.png    |  Bin 0 -> 246 bytes
 .../sitepress-multilingual-cms/res/flags/bf.png    |  Bin 0 -> 293 bytes
 .../sitepress-multilingual-cms/res/flags/bg.png    |  Bin 0 -> 252 bytes
 .../sitepress-multilingual-cms/res/flags/bh.png    |  Bin 0 -> 340 bytes
 .../res/flags/bi.alt.png                           |  Bin 0 -> 552 bytes
 .../sitepress-multilingual-cms/res/flags/bi.png    |  Bin 0 -> 467 bytes
 .../sitepress-multilingual-cms/res/flags/bj.png    |  Bin 0 -> 290 bytes
 .../sitepress-multilingual-cms/res/flags/bm.png    |  Bin 0 -> 569 bytes
 .../sitepress-multilingual-cms/res/flags/bn.png    |  Bin 0 -> 575 bytes
 .../sitepress-multilingual-cms/res/flags/bo.png    |  Bin 0 -> 248 bytes
 .../sitepress-multilingual-cms/res/flags/br.png    |  Bin 0 -> 560 bytes
 .../sitepress-multilingual-cms/res/flags/bs.png    |  Bin 0 -> 363 bytes
 .../sitepress-multilingual-cms/res/flags/bt.png    |  Bin 0 -> 527 bytes
 .../sitepress-multilingual-cms/res/flags/bv.png    |  Bin 0 -> 424 bytes
 .../sitepress-multilingual-cms/res/flags/bw.png    |  Bin 0 -> 311 bytes
 .../sitepress-multilingual-cms/res/flags/by.png    |  Bin 0 -> 307 bytes
 .../sitepress-multilingual-cms/res/flags/bz.png    |  Bin 0 -> 567 bytes
 .../sitepress-multilingual-cms/res/flags/ca.png    |  Bin 0 -> 979 bytes
 .../res/flags/cc.alt.png                           |  Bin 0 -> 563 bytes
 .../sitepress-multilingual-cms/res/flags/cc.png    |  Bin 0 -> 570 bytes
 .../sitepress-multilingual-cms/res/flags/cd.png    |  Bin 0 -> 469 bytes
 .../sitepress-multilingual-cms/res/flags/cf.png    |  Bin 0 -> 355 bytes
 .../sitepress-multilingual-cms/res/flags/cg.png    |  Bin 0 -> 302 bytes
 .../sitepress-multilingual-cms/res/flags/ch.png    |  Bin 0 -> 329 bytes
 .../sitepress-multilingual-cms/res/flags/ci.png    |  Bin 0 -> 295 bytes
 .../sitepress-multilingual-cms/res/flags/ck.png    |  Bin 0 -> 581 bytes
 .../sitepress-multilingual-cms/res/flags/cl.png    |  Bin 0 -> 298 bytes
 .../sitepress-multilingual-cms/res/flags/cm.png    |  Bin 0 -> 307 bytes
 .../sitepress-multilingual-cms/res/flags/cn.png    |  Bin 0 -> 313 bytes
 .../sitepress-multilingual-cms/res/flags/co.png    |  Bin 0 -> 266 bytes
 .../res/flags/cr.alt.png                           |  Bin 0 -> 334 bytes
 .../sitepress-multilingual-cms/res/flags/cr.png    |  Bin 0 -> 276 bytes
 .../sitepress-multilingual-cms/res/flags/cs.png    |  Bin 0 -> 361 bytes
 .../sitepress-multilingual-cms/res/flags/cu.png    |  Bin 0 -> 383 bytes
 .../sitepress-multilingual-cms/res/flags/cv.png    |  Bin 0 -> 417 bytes
 .../sitepress-multilingual-cms/res/flags/cx.png    |  Bin 0 -> 560 bytes
 .../sitepress-multilingual-cms/res/flags/cy.png    |  Bin 0 -> 735 bytes
 .../sitepress-multilingual-cms/res/flags/cz.png    |  Bin 0 -> 361 bytes
 .../sitepress-multilingual-cms/res/flags/da.png    |  Bin 0 -> 304 bytes
 .../sitepress-multilingual-cms/res/flags/de.png    |  Bin 0 -> 250 bytes
 .../sitepress-multilingual-cms/res/flags/dj.png    |  Bin 0 -> 388 bytes
 .../sitepress-multilingual-cms/res/flags/dk.png    |  Bin 0 -> 304 bytes
 .../sitepress-multilingual-cms/res/flags/dm.png    |  Bin 0 -> 490 bytes
 .../sitepress-multilingual-cms/res/flags/do.png    |  Bin 0 -> 416 bytes
 .../sitepress-multilingual-cms/res/flags/dz.png    |  Bin 0 -> 414 bytes
 .../res/flags/ec.alt.png                           |  Bin 0 -> 246 bytes
 .../sitepress-multilingual-cms/res/flags/ec.png    |  Bin 0 -> 349 bytes
 .../sitepress-multilingual-cms/res/flags/eg.png    |  Bin 0 -> 259 bytes
 .../res/flags/eh.alt.png                           |  Bin 0 -> 296 bytes
 .../sitepress-multilingual-cms/res/flags/eh.png    |  Bin 0 -> 320 bytes
 .../sitepress-multilingual-cms/res/flags/el.png    |  Bin 0 -> 413 bytes
 .../sitepress-multilingual-cms/res/flags/en.png    |  Bin 0 -> 600 bytes
 .../sitepress-multilingual-cms/res/flags/er.png    |  Bin 0 -> 469 bytes
 .../res/flags/es.alt.png                           |  Bin 0 -> 232 bytes
 .../sitepress-multilingual-cms/res/flags/es.png    |  Bin 0 -> 325 bytes
 .../res/flags/et.alt.png                           |  Bin 0 -> 272 bytes
 .../sitepress-multilingual-cms/res/flags/et.o.png  |  Bin 0 -> 415 bytes
 .../sitepress-multilingual-cms/res/flags/et.png    |  Bin 0 -> 278 bytes
 .../sitepress-multilingual-cms/res/flags/eu.png    |  Bin 0 -> 322 bytes
 .../sitepress-multilingual-cms/res/flags/fa.png    |  Bin 0 -> 381 bytes
 .../sitepress-multilingual-cms/res/flags/fi.png    |  Bin 0 -> 363 bytes
 .../sitepress-multilingual-cms/res/flags/fj.png    |  Bin 0 -> 548 bytes
 .../sitepress-multilingual-cms/res/flags/fk.png    |  Bin 0 -> 601 bytes
 .../sitepress-multilingual-cms/res/flags/fm.png    |  Bin 0 -> 400 bytes
 .../sitepress-multilingual-cms/res/flags/fo.png    |  Bin 0 -> 402 bytes
 .../sitepress-multilingual-cms/res/flags/fr.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/ga.png    |  Bin 0 -> 287 bytes
 .../sitepress-multilingual-cms/res/flags/gb.png    |  Bin 0 -> 600 bytes
 .../sitepress-multilingual-cms/res/flags/gd.png    |  Bin 0 -> 525 bytes
 .../sitepress-multilingual-cms/res/flags/ge.png    |  Bin 0 -> 447 bytes
 .../sitepress-multilingual-cms/res/flags/gf.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/gg.png    |  Bin 0 -> 390 bytes
 .../sitepress-multilingual-cms/res/flags/gh.png    |  Bin 0 -> 295 bytes
 .../sitepress-multilingual-cms/res/flags/gi.png    |  Bin 0 -> 345 bytes
 .../sitepress-multilingual-cms/res/flags/gl.png    |  Bin 0 -> 335 bytes
 .../sitepress-multilingual-cms/res/flags/gm.png    |  Bin 0 -> 271 bytes
 .../sitepress-multilingual-cms/res/flags/gn.png    |  Bin 0 -> 248 bytes
 .../sitepress-multilingual-cms/res/flags/gp.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/gq.png    |  Bin 0 -> 385 bytes
 .../sitepress-multilingual-cms/res/flags/gr.png    |  Bin 0 -> 413 bytes
 .../sitepress-multilingual-cms/res/flags/gs.png    |  Bin 0 -> 588 bytes
 .../res/flags/gt.alt.png                           |  Bin 0 -> 289 bytes
 .../sitepress-multilingual-cms/res/flags/gt.png    |  Bin 0 -> 382 bytes
 .../sitepress-multilingual-cms/res/flags/gu.png    |  Bin 0 -> 413 bytes
 .../sitepress-multilingual-cms/res/flags/gw.png    |  Bin 0 -> 278 bytes
 .../sitepress-multilingual-cms/res/flags/gy.png    |  Bin 0 -> 397 bytes
 .../sitepress-multilingual-cms/res/flags/he.png    |  Bin 0 -> 325 bytes
 .../sitepress-multilingual-cms/res/flags/hi.png    |  Bin 0 -> 323 bytes
 .../sitepress-multilingual-cms/res/flags/hk.png    |  Bin 0 -> 406 bytes
 .../sitepress-multilingual-cms/res/flags/hm.png    |  Bin 0 -> 570 bytes
 .../sitepress-multilingual-cms/res/flags/hn.png    |  Bin 0 -> 331 bytes
 .../sitepress-multilingual-cms/res/flags/hr.png    |  Bin 0 -> 406 bytes
 .../res/flags/ht.alt.png                           |  Bin 0 -> 263 bytes
 .../sitepress-multilingual-cms/res/flags/ht.png    |  Bin 0 -> 344 bytes
 .../sitepress-multilingual-cms/res/flags/hu.png    |  Bin 0 -> 276 bytes
 .../sitepress-multilingual-cms/res/flags/hy.png    |  Bin 0 -> 255 bytes
 .../sitepress-multilingual-cms/res/flags/id.png    |  Bin 0 -> 242 bytes
 .../sitepress-multilingual-cms/res/flags/ie.png    |  Bin 0 -> 287 bytes
 .../sitepress-multilingual-cms/res/flags/il.png    |  Bin 0 -> 325 bytes
 .../sitepress-multilingual-cms/res/flags/im.png    |  Bin 0 -> 355 bytes
 .../sitepress-multilingual-cms/res/flags/in.png    |  Bin 0 -> 323 bytes
 .../sitepress-multilingual-cms/res/flags/io.png    |  Bin 0 -> 753 bytes
 .../sitepress-multilingual-cms/res/flags/iq.png    |  Bin 0 -> 302 bytes
 .../sitepress-multilingual-cms/res/flags/ir.png    |  Bin 0 -> 381 bytes
 .../sitepress-multilingual-cms/res/flags/is.png    |  Bin 0 -> 408 bytes
 .../sitepress-multilingual-cms/res/flags/it.png    |  Bin 0 -> 267 bytes
 .../sitepress-multilingual-cms/res/flags/ja.png    |  Bin 0 -> 301 bytes
 .../sitepress-multilingual-cms/res/flags/je.png    |  Bin 0 -> 489 bytes
 .../sitepress-multilingual-cms/res/flags/jm.png    |  Bin 0 -> 443 bytes
 .../sitepress-multilingual-cms/res/flags/jo.png    |  Bin 0 -> 314 bytes
 .../sitepress-multilingual-cms/res/flags/jp.png    |  Bin 0 -> 301 bytes
 .../sitepress-multilingual-cms/res/flags/ke.png    |  Bin 0 -> 439 bytes
 .../sitepress-multilingual-cms/res/flags/kg.png    |  Bin 0 -> 363 bytes
 .../sitepress-multilingual-cms/res/flags/kh.png    |  Bin 0 -> 401 bytes
 .../sitepress-multilingual-cms/res/flags/ki.png    |  Bin 0 -> 663 bytes
 .../sitepress-multilingual-cms/res/flags/km.png    |  Bin 0 -> 446 bytes
 .../sitepress-multilingual-cms/res/flags/kn.png    |  Bin 0 -> 524 bytes
 .../sitepress-multilingual-cms/res/flags/ko.png    |  Bin 0 -> 492 bytes
 .../sitepress-multilingual-cms/res/flags/kp.png    |  Bin 0 -> 374 bytes
 .../sitepress-multilingual-cms/res/flags/kr.png    |  Bin 0 -> 492 bytes
 .../sitepress-multilingual-cms/res/flags/ku.png    |  Bin 0 -> 414 bytes
 .../sitepress-multilingual-cms/res/flags/kw.png    |  Bin 0 -> 314 bytes
 .../sitepress-multilingual-cms/res/flags/ky.png    |  Bin 0 -> 525 bytes
 .../sitepress-multilingual-cms/res/flags/kz.png    |  Bin 0 -> 494 bytes
 .../sitepress-multilingual-cms/res/flags/la.png    |  Bin 0 -> 318 bytes
 .../sitepress-multilingual-cms/res/flags/lb.png    |  Bin 0 -> 379 bytes
 .../sitepress-multilingual-cms/res/flags/lc.png    |  Bin 0 -> 426 bytes
 .../sitepress-multilingual-cms/res/flags/li.png    |  Bin 0 -> 344 bytes
 .../sitepress-multilingual-cms/res/flags/lk.png    |  Bin 0 -> 524 bytes
 .../sitepress-multilingual-cms/res/flags/lr.png    |  Bin 0 -> 456 bytes
 .../sitepress-multilingual-cms/res/flags/ls.png    |  Bin 0 -> 529 bytes
 .../sitepress-multilingual-cms/res/flags/lt.png    |  Bin 0 -> 251 bytes
 .../sitepress-multilingual-cms/res/flags/lu.png    |  Bin 0 -> 255 bytes
 .../sitepress-multilingual-cms/res/flags/lv.png    |  Bin 0 -> 295 bytes
 .../sitepress-multilingual-cms/res/flags/ly.png    |  Bin 0 -> 251 bytes
 .../sitepress-multilingual-cms/res/flags/ma.png    |  Bin 0 -> 273 bytes
 .../sitepress-multilingual-cms/res/flags/mc.png    |  Bin 0 -> 236 bytes
 .../sitepress-multilingual-cms/res/flags/md.png    |  Bin 0 -> 425 bytes
 .../sitepress-multilingual-cms/res/flags/me.png    |  Bin 0 -> 1072 bytes
 .../sitepress-multilingual-cms/res/flags/mg.png    |  Bin 0 -> 251 bytes
 .../sitepress-multilingual-cms/res/flags/mh.png    |  Bin 0 -> 610 bytes
 .../sitepress-multilingual-cms/res/flags/mk.png    |  Bin 0 -> 427 bytes
 .../sitepress-multilingual-cms/res/flags/ml.png    |  Bin 0 -> 264 bytes
 .../sitepress-multilingual-cms/res/flags/mm.png    |  Bin 0 -> 367 bytes
 .../sitepress-multilingual-cms/res/flags/mn.png    |  Bin 0 -> 326 bytes
 .../sitepress-multilingual-cms/res/flags/mo.png    |  Bin 0 -> 463 bytes
 .../sitepress-multilingual-cms/res/flags/mp.png    |  Bin 0 -> 567 bytes
 .../sitepress-multilingual-cms/res/flags/mq.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/mr.png    |  Bin 0 -> 385 bytes
 .../sitepress-multilingual-cms/res/flags/ms.png    |  Bin 0 -> 578 bytes
 .../sitepress-multilingual-cms/res/flags/mt.png    |  Bin 0 -> 270 bytes
 .../sitepress-multilingual-cms/res/flags/mu.png    |  Bin 0 -> 270 bytes
 .../sitepress-multilingual-cms/res/flags/mv.png    |  Bin 0 -> 335 bytes
 .../sitepress-multilingual-cms/res/flags/mw.png    |  Bin 0 -> 310 bytes
 .../sitepress-multilingual-cms/res/flags/mx.png    |  Bin 0 -> 402 bytes
 .../sitepress-multilingual-cms/res/flags/my.png    |  Bin 0 -> 507 bytes
 .../sitepress-multilingual-cms/res/flags/mz.png    |  Bin 0 -> 410 bytes
 .../sitepress-multilingual-cms/res/flags/na.png    |  Bin 0 -> 580 bytes
 .../sitepress-multilingual-cms/res/flags/nb.png    |  Bin 0 -> 424 bytes
 .../sitepress-multilingual-cms/res/flags/nc.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/ne.png    |  Bin 0 -> 308 bytes
 .../sitepress-multilingual-cms/res/flags/nf.png    |  Bin 0 -> 457 bytes
 .../sitepress-multilingual-cms/res/flags/ng.png    |  Bin 0 -> 278 bytes
 .../res/flags/ni.alt.png                           |  Bin 0 -> 302 bytes
 .../sitepress-multilingual-cms/res/flags/ni.png    |  Bin 0 -> 346 bytes
 .../sitepress-multilingual-cms/res/flags/nil.png   |  Bin 0 -> 165 bytes
 .../sitepress-multilingual-cms/res/flags/nl.png    |  Bin 0 -> 282 bytes
 .../sitepress-multilingual-cms/res/flags/no.png    |  Bin 0 -> 424 bytes
 .../sitepress-multilingual-cms/res/flags/np.png    |  Bin 0 -> 473 bytes
 .../sitepress-multilingual-cms/res/flags/nr.png    |  Bin 0 -> 362 bytes
 .../sitepress-multilingual-cms/res/flags/nu.png    |  Bin 0 -> 419 bytes
 .../sitepress-multilingual-cms/res/flags/nz.png    |  Bin 0 -> 500 bytes
 .../sitepress-multilingual-cms/res/flags/om.png    |  Bin 0 -> 350 bytes
 .../sitepress-multilingual-cms/res/flags/pa.png    |  Bin 0 -> 332 bytes
 .../sitepress-multilingual-cms/res/flags/pe.png    |  Bin 0 -> 232 bytes
 .../res/flags/pf.alt.png                           |  Bin 0 -> 345 bytes
 .../sitepress-multilingual-cms/res/flags/pf.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/pg.png    |  Bin 0 -> 400 bytes
 .../sitepress-multilingual-cms/res/flags/ph.png    |  Bin 0 -> 405 bytes
 .../sitepress-multilingual-cms/res/flags/pk.png    |  Bin 0 -> 436 bytes
 .../sitepress-multilingual-cms/res/flags/pl.png    |  Bin 0 -> 235 bytes
 .../sitepress-multilingual-cms/res/flags/pm.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/pn.png    |  Bin 0 -> 642 bytes
 .../sitepress-multilingual-cms/res/flags/pr.png    |  Bin 0 -> 462 bytes
 .../sitepress-multilingual-cms/res/flags/ps.png    |  Bin 0 -> 295 bytes
 .../sitepress-multilingual-cms/res/flags/pt-br.png |  Bin 0 -> 560 bytes
 .../sitepress-multilingual-cms/res/flags/pt-pt.png |  Bin 0 -> 441 bytes
 .../sitepress-multilingual-cms/res/flags/pt.png    |  Bin 0 -> 441 bytes
 .../sitepress-multilingual-cms/res/flags/pw.png    |  Bin 0 -> 416 bytes
 .../sitepress-multilingual-cms/res/flags/py.png    |  Bin 0 -> 300 bytes
 .../sitepress-multilingual-cms/res/flags/qa.png    |  Bin 0 -> 339 bytes
 .../sitepress-multilingual-cms/res/flags/re.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/ro.png    |  Bin 0 -> 258 bytes
 .../sitepress-multilingual-cms/res/flags/ru.png    |  Bin 0 -> 241 bytes
 .../sitepress-multilingual-cms/res/flags/rw.png    |  Bin 0 -> 363 bytes
 .../sitepress-multilingual-cms/res/flags/sa.png    |  Bin 0 -> 474 bytes
 .../sitepress-multilingual-cms/res/flags/sb.png    |  Bin 0 -> 473 bytes
 .../sitepress-multilingual-cms/res/flags/sc.png    |  Bin 0 -> 506 bytes
 .../sitepress-multilingual-cms/res/flags/sd.png    |  Bin 0 -> 331 bytes
 .../sitepress-multilingual-cms/res/flags/sg.png    |  Bin 0 -> 352 bytes
 .../sitepress-multilingual-cms/res/flags/sh.png    |  Bin 0 -> 513 bytes
 .../sitepress-multilingual-cms/res/flags/si.png    |  Bin 0 -> 322 bytes
 .../sitepress-multilingual-cms/res/flags/sj.png    |  Bin 0 -> 424 bytes
 .../res/flags/sl-wrong.png                         |  Bin 0 -> 274 bytes
 .../sitepress-multilingual-cms/res/flags/sl.png    |  Bin 0 -> 370 bytes
 .../sitepress-multilingual-cms/res/flags/sm.png    |  Bin 0 -> 400 bytes
 .../sitepress-multilingual-cms/res/flags/sn.png    |  Bin 0 -> 312 bytes
 .../sitepress-multilingual-cms/res/flags/so.png    |  Bin 0 -> 348 bytes
 .../sitepress-multilingual-cms/res/flags/sq.png    |  Bin 0 -> 477 bytes
 .../sitepress-multilingual-cms/res/flags/sr.png    |  Bin 0 -> 486 bytes
 .../sitepress-multilingual-cms/res/flags/st.png    |  Bin 0 -> 367 bytes
 .../sitepress-multilingual-cms/res/flags/sv.png    |  Bin 0 -> 436 bytes
 .../sitepress-multilingual-cms/res/flags/sy.png    |  Bin 0 -> 265 bytes
 .../sitepress-multilingual-cms/res/flags/sz.png    |  Bin 0 -> 561 bytes
 .../sitepress-multilingual-cms/res/flags/ta.png    |  Bin 0 -> 325 bytes
 .../sitepress-multilingual-cms/res/flags/tc.png    |  Bin 0 -> 591 bytes
 .../sitepress-multilingual-cms/res/flags/td.png    |  Bin 0 -> 266 bytes
 .../sitepress-multilingual-cms/res/flags/tf.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/tg.png    |  Bin 0 -> 399 bytes
 .../sitepress-multilingual-cms/res/flags/th.png    |  Bin 0 -> 272 bytes
 .../sitepress-multilingual-cms/res/flags/tj.png    |  Bin 0 -> 342 bytes
 .../sitepress-multilingual-cms/res/flags/tk.png    |  Bin 0 -> 500 bytes
 .../sitepress-multilingual-cms/res/flags/tl.png    |  Bin 0 -> 344 bytes
 .../sitepress-multilingual-cms/res/flags/tm.png    |  Bin 0 -> 488 bytes
 .../sitepress-multilingual-cms/res/flags/tn.png    |  Bin 0 -> 325 bytes
 .../sitepress-multilingual-cms/res/flags/to.png    |  Bin 0 -> 301 bytes
 .../sitepress-multilingual-cms/res/flags/tr.png    |  Bin 0 -> 317 bytes
 .../sitepress-multilingual-cms/res/flags/tt.png    |  Bin 0 -> 454 bytes
 .../sitepress-multilingual-cms/res/flags/tv.png    |  Bin 0 -> 600 bytes
 .../sitepress-multilingual-cms/res/flags/tw.png    |  Bin 0 -> 370 bytes
 .../sitepress-multilingual-cms/res/flags/tz.png    |  Bin 0 -> 502 bytes
 .../sitepress-multilingual-cms/res/flags/ug.png    |  Bin 0 -> 314 bytes
 .../sitepress-multilingual-cms/res/flags/uk.png    |  Bin 0 -> 269 bytes
 .../sitepress-multilingual-cms/res/flags/uk_.png   |  Bin 0 -> 600 bytes
 .../sitepress-multilingual-cms/res/flags/um.png    |  Bin 0 -> 502 bytes
 .../sitepress-multilingual-cms/res/flags/ur.png    |  Bin 0 -> 436 bytes
 .../sitepress-multilingual-cms/res/flags/us.png    |  Bin 0 -> 502 bytes
 .../sitepress-multilingual-cms/res/flags/uy.png    |  Bin 0 -> 430 bytes
 .../sitepress-multilingual-cms/res/flags/uz.png    |  Bin 0 -> 391 bytes
 .../sitepress-multilingual-cms/res/flags/va.png    |  Bin 0 -> 309 bytes
 .../sitepress-multilingual-cms/res/flags/vc.png    |  Bin 0 -> 392 bytes
 .../sitepress-multilingual-cms/res/flags/ve.png    |  Bin 0 -> 364 bytes
 .../sitepress-multilingual-cms/res/flags/vg.png    |  Bin 0 -> 565 bytes
 .../sitepress-multilingual-cms/res/flags/vi.png    |  Bin 0 -> 454 bytes
 .../sitepress-multilingual-cms/res/flags/vn.png    |  Bin 0 -> 318 bytes
 .../sitepress-multilingual-cms/res/flags/vu.png    |  Bin 0 -> 462 bytes
 .../res/flags/wf.alt.png                           |  Bin 0 -> 430 bytes
 .../sitepress-multilingual-cms/res/flags/wf.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/ws.png    |  Bin 0 -> 339 bytes
 .../sitepress-multilingual-cms/res/flags/ye.png    |  Bin 0 -> 236 bytes
 .../sitepress-multilingual-cms/res/flags/yi.png    |  Bin 0 -> 325 bytes
 .../sitepress-multilingual-cms/res/flags/yt.png    |  Bin 0 -> 268 bytes
 .../sitepress-multilingual-cms/res/flags/yu.png    |  Bin 0 -> 265 bytes
 .../sitepress-multilingual-cms/res/flags/za.png    |  Bin 0 -> 500 bytes
 .../res/flags/zh-hans.png                          |  Bin 0 -> 313 bytes
 .../res/flags/zh-hant.png                          |  Bin 0 -> 313 bytes
 .../sitepress-multilingual-cms/res/flags/zm.png    |  Bin 0 -> 396 bytes
 .../sitepress-multilingual-cms/res/flags/zw.png    |  Bin 0 -> 440 bytes
 .../sitepress-multilingual-cms/res/flags/zz.png    |  Bin 0 -> 602 bytes
 .../res/img/add_translation.png                    |  Bin 0 -> 214 bytes
 .../res/img/ajax-loader.gif                        |  Bin 0 -> 673 bytes
 .../sitepress-multilingual-cms/res/img/alert.png   |  Bin 0 -> 861 bytes
 .../res/img/documents.png                          |  Bin 0 -> 767 bytes
 .../sitepress-multilingual-cms/res/img/dollar1.png |  Bin 0 -> 772 bytes
 .../sitepress-multilingual-cms/res/img/dollar2.png |  Bin 0 -> 1048 bytes
 .../res/img/edit_translation.png                   |  Bin 0 -> 689 bytes
 .../sitepress-multilingual-cms/res/img/icon.png    |  Bin 0 -> 1602 bytes
 .../sitepress-multilingual-cms/res/img/icon16.png  |  Bin 0 -> 807 bytes
 .../res/img/icon_adv.png                           |  Bin 0 -> 1614 bytes
 .../res/img/icon_color_picker.png                  |  Bin 0 -> 256 bytes
 .../sitepress-multilingual-cms/res/img/info.png    |  Bin 0 -> 947 bytes
 .../res/img/nav-arrow-down.png                     |  Bin 0 -> 112 bytes
 .../sitepress-multilingual-cms/res/img/notes.png   |  Bin 0 -> 691 bytes
 .../sitepress-multilingual-cms/res/img/ok.png      |  Bin 0 -> 826 bytes
 .../res/img/question-green.png                     |  Bin 0 -> 1664 bytes
 .../res/img/question1.png                          |  Bin 0 -> 1033 bytes
 .../res/img/question2.png                          |  Bin 0 -> 1048 bytes
 .../res/img/sun-solid.png                          |  Bin 0 -> 874 bytes
 .../res/img/view-in-page.png                       |  Bin 0 -> 803 bytes
 .../res/img/view-in-source.png                     |  Bin 0 -> 721 bytes
 .../res/img/web_logo_large.png                     |  Bin 0 -> 16325 bytes
 .../res/img/web_logo_small.png                     |  Bin 0 -> 4508 bytes
 .../sitepress-multilingual-cms/res/img/yes.png     |  Bin 0 -> 612 bytes
 .../res/js/absolute-links.js                       |   54 +
 .../res/js/affiliate-info.js                       |   23 +
 .../res/js/categories.js                           |   68 +
 .../res/js/comments-translation.js                 |   82 +
 .../res/js/content-translation.js                  |  253 +
 .../res/js/icl_reminders.js                        |  176 +
 .../res/js/icl_sidebar.js                          |   73 +
 .../sitepress-multilingual-cms/res/js/languages.js |  840 ++++
 .../res/js/navigation.js                           |   25 +
 .../sitepress-multilingual-cms/res/js/overview.js  |    9 +
 .../sitepress-multilingual-cms/res/js/scripts.js   |  481 ++
 .../sitepress-multilingual-cms/res/js/sitepress.js |   37 +
 .../res/js/string-translation.js                   |  361 ++
 .../sitepress-multilingual-cms/res/js/tags.js      |   45 +
 .../res/js/theme-localization.js                   |   92 +
 .../res/js/translation-synchronization.js          |    6 +
 .../res/js/wp-nav-menus.js                         |   19 +
 .../sitepress-multilingual-cms/res/languages.csv   |   64 +
 .../res/languages.csv.php                          |    1 +
 .../sitepress-multilingual-cms/screenshot-1.jpg    |  Bin 0 -> 34272 bytes
 .../sitepress-multilingual-cms/screenshot-2.jpg    |  Bin 0 -> 42352 bytes
 .../sitepress-multilingual-cms/screenshot-3.jpg    |  Bin 0 -> 31751 bytes
 .../sitepress-multilingual-cms/screenshot-4.jpg    |  Bin 0 -> 38452 bytes
 .../sitepress-multilingual-cms/sitepress.class.php | 5252 ++++++++++++++++++++
 .../sitepress-multilingual-cms/sitepress.php       |  142 +
 wp-content/themes/gnome-grass/960.css              |  405 ++
 wp-content/themes/gnome-grass/editor_style.css     |  239 +
 wp-content/themes/gnome-grass/footer.php           |   39 +
 wp-content/themes/gnome-grass/footer_art.php       |   14 +
 wp-content/themes/gnome-grass/functions.php        |   47 +
 wp-content/themes/gnome-grass/header.php           |   51 +
 wp-content/themes/gnome-grass/home.php             |   79 +
 wp-content/themes/gnome-grass/images/12_col.gif    |  Bin 0 -> 96 bytes
 wp-content/themes/gnome-grass/images/16_col.gif    |  Bin 0 -> 101 bytes
 .../themes/gnome-grass/images/action_box-bg.png    |  Bin 0 -> 177 bytes
 wp-content/themes/gnome-grass/images/favicon.png   |  Bin 0 -> 895 bytes
 wp-content/themes/gnome-grass/images/focus-bg.png  |  Bin 0 -> 180 bytes
 .../gnome-grass/images/footer_arts/art-2.png       |  Bin 0 -> 4889 bytes
 .../themes/gnome-grass/images/footer_arts/art.png  |  Bin 0 -> 9186 bytes
 .../gnome-grass/images/footer_arts/community.png   |  Bin 0 -> 12016 bytes
 .../gnome-grass/images/footer_arts/default.png     |  Bin 0 -> 8402 bytes
 .../themes/gnome-grass/images/footer_arts/i18n.png |  Bin 0 -> 12871 bytes
 .../gnome-grass/images/footer_arts/readme.txt      |   19 +
 .../gnome-grass/images/footer_arts/support.png     |  Bin 0 -> 8455 bytes
 .../themes/gnome-grass/images/gnome-logo.png       |  Bin 0 -> 11104 bytes
 wp-content/themes/gnome-grass/images/grass.png     |  Bin 0 -> 4400 bytes
 .../themes/gnome-grass/images/search-icon.png      |  Bin 0 -> 395 bytes
 .../gnome-grass/images/selected-language.png       |  Bin 0 -> 173 bytes
 .../themes/gnome-grass/images/top_bar-bg.png       |  Bin 0 -> 185 bytes
 .../themes/gnome-grass/images/top_bar-item-bg.png  |  Bin 0 -> 190 bytes
 .../gnome-grass/images/top_bar-item-home.png       |  Bin 0 -> 427 bytes
 .../gnome-grass/images/top_bar-item-hover-bg.png   |  Bin 0 -> 187 bytes
 .../gnome-grass/images/waterbrush-body-bg.jpg      |  Bin 0 -> 24223 bytes
 wp-content/themes/gnome-grass/index.php            |   61 +
 .../themes/gnome-grass/js/jquery-1.4.2.min.js      |  154 +
 wp-content/themes/gnome-grass/js/template.js       |   26 +
 wp-content/themes/gnome-grass/reset.css            |    1 +
 wp-content/themes/gnome-grass/screenshot.png       |  Bin 0 -> 4492 bytes
 wp-content/themes/gnome-grass/search.php           |   35 +
 wp-content/themes/gnome-grass/single-column.php    |   45 +
 wp-content/themes/gnome-grass/style.css            |  624 +++
 wp-content/themes/gnome-grass/text.css             |   87 +
 497 files changed, 36901 insertions(+), 0 deletions(-)
---
diff --git a/wp-content/plugins/sitepress-multilingual-cms/ajax.php b/wp-content/plugins/sitepress-multilingual-cms/ajax.php
new file mode 100644
index 0000000..e34544e
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/ajax.php
@@ -0,0 +1,984 @@
+<?php
+// included from Sitepress::ajax_setup
+//
+
+global $wpdb;
+
+
+if (!isset($_POST['unit-test'])) {
+    @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+    header("Cache-Control: no-cache, must-revalidate"); 
+    header("Expires: Sat, 16 Aug 1980 05:00:00 GMT"); 
+}
+
+switch($_REQUEST['icl_ajx_action']){
+    case 'health_check':
+        // force error
+        // header('Status: 500'); echo 'Boooo!';        
+        $iclsettings['ajx_health_checked'] = 1;
+        $this->save_settings($iclsettings);
+        break;
+    case 'set_active_languages':
+        $resp = array();
+        $old_active_languages_count = count($this->get_active_languages($lang_codes));
+        $lang_codes = explode(',',$_POST['langs']);
+        if($this->set_active_languages($lang_codes)){                    
+            $resp[0] = 1;
+            $active_langs = $this->get_active_languages();
+            $iclresponse ='';
+            $default_categories = $this->get_default_categories();            
+            $default_category_main = $wpdb->get_var("SELECT name FROM {$wpdb->terms} t JOIN {$wpdb->term_taxonomy} tx ON t.term_id=tx.term_id
+                WHERE term_taxonomy_id='{$default_categories[$this->get_default_language()]}' AND taxonomy='category'");            
+            $default_category_trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id={$default_categories[$this->get_default_language()]} AND element_type='tax_category'");
+            foreach($active_langs as $lang){
+                $is_default = ($this->get_default_language()==$lang['code']);
+                $iclresponse .= '<li ';
+                if($is_default) $iclresponse .= 'class="default_language"';
+                $iclresponse .= '><label><input type="radio" name="default_language" value="' . $lang['code'] .'" ';
+                if($is_default) $iclresponse .= 'checked="checked"';
+                $iclresponse .= '>' . $lang['display_name'];
+                if($is_default) $iclresponse .= '('. __('default','sitepress') . ')';
+                $iclresponse .= '</label></li>';                
+                
+                if(!in_array($lang['code'],array_keys($default_categories))){
+                   // Create category for language
+                   // add it to defaults                   
+                   $tr_cat = $default_category_main . ' @' . $lang['code'];
+                   $tr_cat_san = sanitize_title_with_dashes($default_category_main . '-' . $lang['code']); 
+                   $term_id = $wpdb->get_var("SELECT term_id FROM {$wpdb->terms} WHERE name='{$tr_cat}'");
+                   if(!$term_id){
+                       $wpdb->query("INSERT INTO {$wpdb->terms}(name, slug) VALUES('{$tr_cat}','{$tr_cat_san}') ON DUPLICATE KEY UPDATE slug = CONCAT(slug,'".rand(1,1000)."')");
+                       $term_id = mysql_insert_id();                       
+                   }
+                   $term_taxonomy_id = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id={$term_id} AND taxonomy='category'");
+                   if(!$term_taxonomy_id){
+                        $wpdb->query("INSERT INTO {$wpdb->term_taxonomy}(term_id, taxonomy) VALUES('{$term_id}','category')") ;
+                        $term_taxonomy_id = mysql_insert_id();                        
+                   }
+                   $default_categories[$lang['code']] = $term_taxonomy_id;                   
+                   $wpdb->query("INSERT INTO {$wpdb->prefix}icl_translations(element_id,element_type,trid,language_code,source_language_code) 
+                    VALUES('{$term_taxonomy_id}','tax_category','{$default_category_trid}','{$lang['code']}','{$this->get_default_language()}')");
+                }
+            } 
+            $this->set_default_categories($default_categories) ;                        
+            $iclresponse .= $default_blog_category;
+            $resp[1] = $iclresponse;
+            // response 1 - blog got more than 2 languages; -1 blog reduced to 1 language; 0 - no change            
+            if(count($lang_codes) > 1){
+                if(!$iclsettings['setup_complete']){
+                    $resp[2] = -2; //don't refresh the page and enable 'next'
+                }else{
+                    $resp[2] = 1;
+                }
+            }elseif($old_active_languages_count > 1 && count($lang_codes) < 2){
+                if(!$iclsettings['setup_complete']){
+                    $resp[2] = -3; //don't refresh the page and disable 'next'
+                }else{
+                    $resp[2] = -1;
+                }
+            }else{
+                if(!$iclsettings['setup_complete']){
+                    $resp[2] = -3; //don't refresh the page and disable 'next'
+                }else{
+                    $resp[2] = 0;
+                }
+            }  
+            if(count($active_langs) > 1){
+                $iclsettings['dont_show_help_admin_notice'] = true;
+                $this->save_settings($iclsettings);
+            }
+        }else{
+            $resp[0] = 0;
+        }
+        
+        if(!$iclsettings['setup_complete']){
+            $iclsettings['setup_wizard_step'] = 3;
+            $this->save_settings($iclsettings);
+        }
+        
+        echo join('|',$resp);
+        do_action('icl_update_active_languages');
+        break;
+    case 'set_default_language':
+        $previous_default = $this->get_default_language();
+        if($response = $this->set_default_language($_POST['lang'])){
+            echo '1|'.$previous_default.'|';
+        }else{
+            echo'0||' ;
+        }
+        if(1 === $response){
+            echo __('Wordpress language file (.mo) is missing. Keeping existing display language.', 'sitepress');
+        }
+        break;
+    case 'save_language_pairs':                
+        $this->save_language_pairs();
+        
+        $ret = update_icl_account();
+        if($ret){
+            echo '1| ('. __('Not updated on ICanLocalize: ', 'sitepress') . $ret . ')';
+            break;
+        }
+        
+        // success, return status of language pairs from the website
+        
+        $iclsettings = $this->get_settings();
+        $this->get_icl_translator_status($iclsettings);
+        $this->save_settings($iclsettings);
+
+        $langs = $iclsettings['language_pairs'];
+        
+        $active_languages = $this->get_active_languages();
+        
+        $result = '';
+        foreach ($langs as $from_lang => $targets) {
+            foreach($targets as $to_lang => $to_status) {
+                if ($to_status) {
+                    $result .= $from_lang . '~' . $to_lang . '~' . $this->get_language_status_text($from_lang, $to_lang) . "\n";
+                }
+            }
+        }
+        echo "1|" . $result;
+        break;
+    case 'save_site_description':                
+        
+        $iclsettings['icl_site_description'] = $_POST['icl_description'];
+        $this->save_settings($iclsettings);
+        $ret = update_icl_account();
+        if($ret){
+            echo '1| ('. __('Not updated on ICanLocalize: ', 'sitepress') . $ret . ')';
+            break;
+        }
+        
+        echo '1|' . __('Your site description has been saved.', 'sitepress');
+        break;
+    case 'do_account_transfer':
+        
+        if ($_POST['icl_new'] != '1') {
+            $_POST['user']['email'] = $_POST['user']['email2'];
+        }
+        
+        if ($_POST['user']['email'] == '') {
+            echo '0|' . __('Please enter an email address');
+            break;
+        }
+        if (!$this->transfer_icl_account($_POST['icl_new'] == '1')) {
+            echo '0|' . $_POST['icl_form_errors'];
+        } else {
+            $iclsettings['icl_account_email'] = $_POST['user']['email'];
+            $iclsettings['support_icl_account_email'] = $_POST['user']['email'];
+            $this->save_settings($iclsettings);
+            
+            if ($_POST['icl_new'] == '1') {
+                echo '1|' . sprintf(__('An account for %s has been created at ICanLocalize. This site has been transferred to the new account.', 'sitepress'), $_POST['user']['email']);
+            } else {
+                echo '1|' . sprintf(__('This site has been transferred to the ICanLocalize account of %s.', 'sitepress'), $_POST['user']['email']);
+            }
+        }
+        break;
+    
+    case 'toggle_content_translation':
+        $redir = '';
+        $iclsettings['enable_icl_translations'] = $_POST['new_val'];
+        if ($iclsettings['enable_icl_translations'] == 0) {
+            $settings = $this->get_settings();
+            
+            if (!$settings['content_translation_setup_complete']) {
+                // the wizard wasn't complete so set back to step 1.
+                $iclsettings['content_translation_languages_setup'] = false;
+                $iclsettings['content_translation_setup_wizard_step'] = 1;
+            }
+        }
+
+        // finalize wizard if this is the last step        
+        if(isset($_POST['wizard']) && $_POST['wizard']){
+            $iclsettings['setup_wizard_step'] = 0;
+            $iclsettings['setup_complete'] = 1;
+            $active_languages = $this->get_active_languages();
+            $default_language = $this->get_default_language();
+            foreach($active_languages as $al){
+                if($al != $default_language){
+                    if($this->_validate_language_per_directory($al)){
+                        $iclsettings['language_negotiation_type'] = 1;
+                    }            
+                }
+            }            
+            if($_POST['new_val']){
+                $redir = 'admin.php?page='.ICL_PLUGIN_FOLDER.'/menu/content-translation.php';
+            }else{
+                $iclsettings['promote_wpml'] = 1;
+            }
+        }
+        
+        $this->save_settings($iclsettings);
+        echo '1|'.$redir;
+        break;
+    case 'icl_more_options':
+        $this->update_icl_more_options();
+
+        $ret = update_icl_account();
+        if($ret){
+            echo '1| ('. __('Not updated on ICanLocalize: ', 'sitepress') . $ret . ')';
+            break;
+        }
+        if(isset($is_error)){
+            echo '0|'.$is_error;
+        }else{
+            echo 1; 
+        }
+        
+       break;
+    case 'icl_plugins_texts':
+        update_option('icl_plugins_texts_enabled', $_POST['icl_plugins_texts_enabled']);
+        echo '1|';
+        break;
+    case 'icl_save_language_negotiation_type':
+        $iclsettings['language_negotiation_type'] = $_POST['icl_language_negotiation_type'];
+        if($_POST['language_domains']){
+            $iclsettings['language_domains'] = $_POST['language_domains'];
+        }        
+        $this->save_settings($iclsettings);
+        echo 1;
+        break;
+    case 'icl_save_language_switcher_options':
+        if(isset($_POST['icl_language_switcher_sidebar'])){
+            global $wp_registered_widgets, $wp_registered_sidebars;
+            $swidgets = wp_get_sidebars_widgets();            
+            if(empty($swidgets)){
+                $sidebars = array_keys($wp_registered_sidebars);    
+                foreach($sidebars as $sb){
+                    $swidgets[$sb] = array();
+                }
+            }
+            foreach($swidgets as $k=>$v){
+                $key = array_search('language-selector',$swidgets[$k]);
+                if(false !== $key && $k !== $_POST['icl_language_switcher_sidebar']){
+                    unset($swidgets[$k][$key]);
+                }elseif($k==$_POST['icl_language_switcher_sidebar'] && !in_array('language-selector',$swidgets[$k])){
+                    $swidgets[$k] = array_reverse($swidgets[$k], false);
+                    array_push($swidgets[$k],'language-selector');
+                    $swidgets[$k] = array_reverse($swidgets[$k], false);
+                }
+            }            
+            wp_set_sidebars_widgets($swidgets);
+        }
+        $iclsettings['icl_lso_link_empty'] = intval($_POST['icl_lso_link_empty']);
+        $iclsettings['icl_lso_flags'] = intval($_POST['icl_lso_flags']);
+        $iclsettings['icl_lso_native_lang'] = intval($_POST['icl_lso_native_lang']);
+        $iclsettings['icl_lso_display_lang'] = intval($_POST['icl_lso_display_lang']);
+        
+        if(!$iclsettings['setup_complete']){
+            $iclsettings['setup_wizard_step'] = 3;
+            $iclsettings['setup_complete'] = 1;
+        }
+
+        
+        /*
+        if(!$iclsettings['setup_complete']){
+            $iclsettings['setup_wizard_step'] = 0;
+            $iclsettings['setup_complete'] = 1;
+            $active_languages = $this->get_active_languages();
+            $default_language = $this->get_default_language();
+            foreach($active_languages as $al){
+                if($al != $default_language){
+                    if($this->_validate_language_per_directory($al)){
+                        $iclsettings['language_negotiation_type'] = 1;
+                    }            
+                    break;
+                }
+            }            
+        }
+        */
+        
+        if(isset($_POST['icl_lang_sel_config'])){
+            $iclsettings['icl_lang_sel_config'] = $_POST['icl_lang_sel_config'];
+        }
+        
+        if(isset($_POST['icl_lang_sel_footer_config'])){
+            $iclsettings['icl_lang_sel_footer_config'] = $_POST['icl_lang_sel_footer_config'];
+        }
+        
+        if (isset($_POST['icl_lang_sel_type']))
+            $iclsettings['icl_lang_sel_type'] = $_POST['icl_lang_sel_type'];
+        
+        if (isset($_POST['icl_lang_sel_footer']))
+            $iclsettings['icl_lang_sel_footer'] = 1;
+        else $iclsettings['icl_lang_sel_footer'] = 0;
+        
+        if (isset($_POST['icl_post_availability']))
+            $iclsettings['icl_post_availability'] = 1;
+        else $iclsettings['icl_post_availability'] = 0;
+        
+        if (isset($_POST['icl_post_availability_position']))
+            $iclsettings['icl_post_availability_position'] = $_POST['icl_post_availability_position'];
+        
+        if (isset($_POST['icl_post_availability_text']))
+            $iclsettings['icl_post_availability_text'] = $_POST['icl_post_availability_text'];
+        
+        $iclsettings['icl_widget_title_show'] = (isset($_POST['icl_widget_title_show'])) ? 1 : 0;
+        
+        if(!$iclsettings['icl_lso_flags'] && !$iclsettings['icl_lso_native_lang'] && !$iclsettings['icl_lso_display_lang']){
+            echo '0|';
+            echo __('At least one of the language switcher style options needs to be checked', 'sitepress');    
+        }else{
+            $this->save_settings($iclsettings);    
+            echo 1;
+        }                
+        break;   
+    case 'icl_admin_language_options':
+        $iclsettings['admin_default_language'] = $_POST['icl_admin_default_language'];
+        $this->save_settings($iclsettings);
+        $this->icl_locale_cache->clear();
+        echo 1; 
+        break;    
+    case 'icl_lang_more_options':
+        $iclsettings['hide_translation_controls_on_posts_lists'] = !$_POST['icl_translation_controls_on_posts_lists'];
+        $this->save_settings($iclsettings);
+        echo 1; 
+        break;
+    case 'icl_blog_posts':
+        $iclsettings['show_untranslated_blog_posts'] = $_POST['icl_untranslated_blog_posts'];
+        $this->save_settings($iclsettings);
+        echo 1; 
+        break;                
+    case 'icl_page_sync_options':
+        $iclsettings['sync_page_ordering'] = intval($_POST['icl_sync_page_ordering']);        
+        $iclsettings['sync_page_parent'] = intval($_POST['icl_sync_page_parent']);            
+        $iclsettings['sync_page_template'] = intval($_POST['icl_sync_page_template']);            
+        $iclsettings['sync_comment_status'] = intval($_POST['icl_sync_comment_status']);            
+        $iclsettings['sync_ping_status'] = intval($_POST['icl_sync_ping_status']);            
+        $iclsettings['sync_sticky_flag'] = intval($_POST['icl_sync_sticky_flag']);            
+        $iclsettings['sync_private_flag'] = intval($_POST['icl_sync_private_flag']);            
+        $iclsettings['sync_delete'] = intval($_POST['icl_sync_delete']);            
+        $this->save_settings($iclsettings);
+        echo 1; 
+        break;        
+    case 'language_domains':
+        $active_languages = $this->get_active_languages();
+        $default_language = $this->get_default_language();
+        $iclsettings = $this->get_settings();
+        $language_domains = $iclsettings['language_domains'];        
+        echo '<table class="language_domains">';
+        foreach($active_languages as $lang){
+            $home = get_option('home');
+            if($lang['code']!=$default_language){
+                if(isset($language_domains[$lang['code']])){
+                    $sugested_url = $language_domains[$lang['code']];
+                }else{
+                    $url_parts = parse_url($home);                    
+                    $exp = explode('.' , $url_parts['host']);                    
+                    if(count($exp) < 3){
+                        $sugested_url = $url_parts['scheme'] . '://' . $lang['code'] . '.' . $url_parts['host'] . $url_parts['path'];    
+                    }else{
+                        array_shift($exp);                        
+                        $sugested_url = $url_parts['scheme'] . '://' . $lang['code'] . '.' . join('.' , $exp) . $url_parts['path'];    
+                    }            
+                }
+            }
+            
+            echo '<tr>';
+            echo '<td>' . $lang['display_name'] . '</td>';
+            if($lang['code']==$default_language){
+                echo '<td id="icl_ln_home">' . $home . '</td>';
+                echo '<td>&nbsp;</td>';
+                echo '<td>&nbsp;</td>';
+            }else{
+                echo '<td><input type="text" id="language_domain_'.$lang['code'].'" name="language_domains['.$lang['code'].']" value="'.$sugested_url.'" size="40" /></td>';
+                echo '<td id="icl_validation_result_'.$lang['code'].'"><label><input class="validate_language_domain" type="checkbox" name="validate_language_domains[]" value="'.$lang['code'].'" checked="checked" /> ' . __('Validate on save', 'sitepress') . '</label></td><td><span id="ajx_ld_'.$lang['code'].'"></span></td>';
+            }                        
+            echo '</tr>';
+        }
+        echo '</table>';
+        break;
+    case 'validate_language_domain':
+        if(false === strpos($_POST['url'],'?')){$url_glue='?';}else{$url_glue='&';}
+        $url = $_POST['url'] . $url_glue . '____icl_validate_domain=1';
+        $client = new WP_Http();
+        $response = $client->request($url, 'timeout=15');
+        if(!is_wp_error($response) && ($response['response']['code']=='200') && ($response['body'] == '<!--'.get_option('home').'-->')){
+            echo 1;
+        }else{
+            echo 0;
+        }                
+        break;
+    case 'icl_navigation_form':   
+        $iclsettings = $this->get_settings();
+        $iclsettings['modules']['cms-navigation']['page_order'] = $_POST['icl_navigation_page_order'];
+        $iclsettings['modules']['cms-navigation']['show_cat_menu'] = $_POST['icl_navigation_show_cat_menu'];
+        if($_POST['icl_navigation_cat_menu_title']){
+            $iclsettings['modules']['cms-navigation']['cat_menu_title'] = stripslashes($_POST['icl_navigation_cat_menu_title']);
+            icl_register_string('WPML', 'Categories Menu', stripslashes($_POST['icl_navigation_cat_menu_title']));
+        }        
+        $iclsettings['modules']['cms-navigation']['cat_menu_page_order'] = $_POST['icl_navigation_cat_menu_page_order'];
+        $iclsettings['modules']['cms-navigation']['cat_menu_contents'] = $_POST['icl_blog_menu_contents'];
+        $iclsettings['modules']['cms-navigation']['heading_start'] = stripslashes($_POST['icl_navigation_heading_start']);
+        $iclsettings['modules']['cms-navigation']['heading_end'] = stripslashes($_POST['icl_navigation_heading_end']);
+
+        $iclsettings['modules']['cms-navigation']['cache'] = $_POST['icl_navigation_caching'];
+
+        $iclsettings['modules']['cms-navigation']['breadcrumbs_separator'] = stripslashes($_POST['icl_breadcrumbs_separator']);
+        
+        $this->save_settings($iclsettings);
+        
+        // clear the cms navigation caches
+        $this->icl_cms_nav_offsite_url_cache->clear();
+        @mysql_query("TRUNCATE {$wpdb->prefix}icl_cms_nav_cache");
+        
+        echo '1|';
+        break;
+
+    case 'icl_clear_nav_cache':
+        // clear the cms navigation caches
+        $this->icl_cms_nav_offsite_url_cache->clear();
+        @mysql_query("TRUNCATE {$wpdb->prefix}icl_cms_nav_cache");
+        echo '1|';
+        
+            
+    case 'send_translation_request':
+        $post_ids = explode(',',$_POST['post_ids']);
+        $target_languages = explode('#', $_POST['target_languages']);
+        $post_types = $_POST['icl_post_type'];
+        foreach($post_ids as $post_id){            
+            
+            if(isset($_POST['tn_note_'.$post_id]) && trim($_POST['tn_note_'.$post_id])){
+                update_post_meta($post_id, '_icl_translator_note', $_POST['tn_note_'.$post_id]);
+            }
+            
+            $resp[] = array(
+                'post_id'=>$post_id, 
+                'status'=>icl_translation_send_post($post_id, $target_languages, $post_types[$post_id])
+            );
+        }
+        echo json_encode($resp);
+        break;
+    case 'get_translator_status':
+        if(!$this->icl_account_configured()) break;
+
+        $iclsettings = $this->get_settings();
+        
+        if(isset($_POST['cache'])) {
+            $last_call = $iclsettings['last_get_translator_status_call'];
+            if ($time - $last_call < 24 * 60 * 60) {
+                break;
+          }
+        }
+        
+        $iclsettings['last_get_translator_status_call'] = time();
+        
+        $this->get_icl_translator_status($iclsettings);
+        
+        $this->save_settings($iclsettings);
+        
+        echo json_encode($iclsettings['icl_lang_status']);
+        break;
+    
+    case 'get_language_status_text':
+    
+        if(!$this->icl_account_configured()) break;
+
+        $iclsettings = $this->get_settings();
+        
+        if(!isset($_POST['cache'])) {
+            $iclsettings = $this->get_settings();
+            $this->get_icl_translator_status($iclsettings);
+            $this->save_settings($iclsettings);
+        }
+            
+        echo '1|' . $_POST['id'] . '|' . $this->get_language_status_text($_POST['from_lang'], $_POST['to_lang']);
+        break;
+    
+    case 'set_post_to_date':
+        $nid = (int) $_POST['post_id'];
+        $md5 = $wpdb->get_var("SELECT md5 FROM {$wpdb->prefix}icl_node WHERE nid={$nid}");
+        $wpdb->query("UPDATE {$wpdb->prefix}icl_content_status SET md5 = '{$md5}' WHERE nid='{$nid}'");
+        echo __('Needs update','sitepress');
+        echo '|';
+        echo __('Complete','sitepress');
+        break;    
+    
+    case 'icl_st_save_translation':
+        $icl_st_complete = isset($_POST['icl_st_translation_complete'])?$_POST['icl_st_translation_complete']:ICL_STRING_TRANSLATION_NOT_TRANSLATED;
+        if ( get_magic_quotes_gpc() ){
+            $_POST = stripslashes_deep( $_POST );         
+        }
+        echo icl_add_string_translation($_POST['icl_st_string_id'], $_POST['icl_st_language'], stripslashes($_POST['icl_st_translation']), $icl_st_complete);
+        echo '|';
+        global $icl_st_string_translation_statuses;
+        echo $icl_st_string_translation_statuses[icl_update_string_status($_POST['icl_st_string_id'])];
+        break;
+    case 'icl_st_delete_strings':
+        $arr = explode(',',$_POST['value']);
+        __icl_unregister_string_multi($arr);
+        break;
+    case 'icl_st_send_strings':
+        $arr = explode(',',$_POST['strings']);
+        icl_translation_send_strings($arr, explode(',',$_POST['languages']));
+        echo '1';
+        break;    
+    case 'icl_st_send_strings_all':
+        icl_translation_send_untranslated_strings(explode(',',$_POST['languages']));
+        echo '1';
+        break;    
+    case 'icl_save_theme_localization_type':
+        $icl_tl_type = (int)$_POST['icl_theme_localization_type'];
+        $iclsettings['theme_localization_type'] = $icl_tl_type;
+        if($icl_tl_type==1){            
+            icl_st_scan_theme_files();
+        }
+        $this->save_settings($iclsettings);
+        echo '1|'.$icl_tl_type;
+        break;
+    case 'icl_tl_rescan':
+        $scan_stats = icl_st_scan_theme_files();                
+        
+        if($_POST['icl_load_mo']){
+            $mo_files = icl_st_get_mo_files(TEMPLATEPATH);
+            foreach((array)$mo_files as $m){
+                $i = preg_match('#[-]?([a-z_]+)\.mo$#i', $m, $matches);
+                if($i && $lang = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_locale_map WHERE locale='".$matches[1]."'")){
+                    $tr_pairs = icl_st_load_translations_from_mo($m);
+                    foreach($tr_pairs as $original=>$translation){
+                        foreach($this->settings['st']['theme_localization_domains'] as $tld){
+                            $string_id = icl_get_string_id($original, 'theme ' . $tld);                            
+                            if($string_id){
+                                break;
+                            }
+                        }                        
+                        if(!$wpdb->get_var{"SELECT id FROM {$wpdb->prefix}icl_string_translations WHERE string_id={$string_id} AND language='{$lang}'"}){
+                            icl_add_string_translation($string_id, $lang, $translation, ICL_STRING_TRANSLATION_COMPLETE);
+                        }
+                    }
+                }
+            }
+        }
+        
+        echo '1|'.$scan_stats;
+        break;
+    case 'icl_tl_rescan_p':
+        set_time_limit(0);
+        if(preg_replace('#M$#', '', ini_get('memory_limit')) < 128) ini_set('memory_limit', '128M');        
+        $plugins = array();
+        foreach((array)$_POST['plugin'] as $plugin){
+            $plugins[] = array('file'=>$plugin, 'mu'=>0); // regular plugins
+        }
+        foreach((array)$_POST['mu-plugin'] as $plugin){
+            $plugins[] = array('file'=>$plugin, 'mu'=>1); //mu plugins
+        }    
+        $scan_stats = '';
+        foreach($plugins as $p){
+            $plugin = $p['file'];
+            
+            if(false !== strpos($plugin, '/') && !$p['mu']){
+                $plugin = dirname($plugin);
+            }
+            if($p['mu']){
+                $plugin_path = WPMU_PLUGIN_DIR . '/' . $plugin;    
+            }else{
+                $plugin_path = WP_PLUGIN_DIR . '/' . $plugin;    
+            }
+            
+            $scan_stats .= icl_st_scan_plugin_files($plugin_path);                
+            
+            if($_POST['icl_load_mo'] && !$p['mu']){
+                $mo_files = icl_st_get_mo_files($plugin_path);
+                foreach($mo_files as $m){
+                    $i = preg_match('#[-]([a-z_]+)\.mo$#i', $m, $matches);
+                    if($i && $lang = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_locale_map WHERE locale='".$matches[1]."'")){
+                        $tr_pairs = icl_st_load_translations_from_mo($m);
+                        foreach($tr_pairs as $original=>$translation){
+                            $string_id = icl_get_string_id($original, 'plugin ' . basename($plugin_path));                            
+                            if(!$wpdb->get_var{"SELECT id FROM {$wpdb->prefix}icl_string_translations WHERE string_id={$string_id} AND language='{$lang}'"}){
+                                icl_add_string_translation($string_id, $lang, $translation, ICL_STRING_TRANSLATION_COMPLETE);
+                            }
+                        }
+                    }
+                }
+            }
+            
+        }
+        echo '1|' . $scan_stats;
+        break;
+    
+    case 'save_ct_user_pref':
+        $users = $wpdb->get_col("SELECT id FROM {$wpdb->users}");
+        foreach($users as $uid){
+            if(isset($_POST['icl_enable_comments_translation'][$uid])){
+                update_usermeta($uid, 'icl_enable_comments_translation', 1);
+            }else{
+                delete_usermeta($uid, 'icl_enable_comments_translation');
+            }
+            if(isset($_POST['icl_enable_replies_translation'][$uid])){
+                update_usermeta($uid, 'icl_enable_replies_translation', 1);
+            }else{
+                delete_usermeta($uid, 'icl_enable_replies_translation');
+            }            
+        }
+        echo '1|';
+        break;
+    case 'get_original_comment':
+        $comment_id = $_POST['comment_id'];
+        $trid = $this->get_element_trid($comment_id, 'comment');
+        $res = $wpdb->get_row("SELECT element_id, language_code FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_type='comment' AND element_id <> {$comment_id} ");
+        $original_cid = $res->element_id;
+        $comment = $wpdb->get_row("SELECT * FROM {$wpdb->comments} WHERE comment_ID={$original_cid}");
+        $comment->language_code = $res->language_code;
+        if($res->language_code == $IclCommentsTranslation->user_language){
+            $comment->translated_version = 1;
+        }else{
+            $comment->translated_version = 0;
+            $comment->anchor_text = __('Back to translated version', 'sitepress');
+        }        
+        echo json_encode($comment);
+        break;
+    case 'dismiss_help':
+        $iclsettings['dont_show_help_admin_notice'] = true;
+        $this->save_settings($iclsettings);
+        break;
+    case 'dismiss_page_estimate_hint':
+        $iclsettings['dismiss_page_estimate_hint'] = !$this->settings['dismiss_page_estimate_hint'];
+        $this->save_settings($iclsettings);
+        break;        
+    case 'toggle_pt_controls':
+        $iclsettings['hide_professional_translation_controls'] = $_POST['value'];
+        $this->save_settings($iclsettings);
+        break;                
+    case 'dismiss_upgrade_notice':
+        $iclsettings['hide_upgrade_notice'] = implode('.', array_slice(explode('.', ICL_SITEPRESS_VERSION), 0, 3));
+        $this->save_settings($iclsettings);
+        break;        
+    case 'dismiss_translate_help':
+        $iclsettings['dont_show_translate_help'] = !$this->settings['dont_show_translate_help'];
+        $this->save_settings($iclsettings);
+        break;        
+    case 'setup_got_to_step1':
+        $iclsettings['existing_content_language_verified'] = 0;
+        $iclsettings['setup_wizard_step'] = 1;
+        @mysql_query("TRUNCATE TABLE {$wpdb->prefix}icl_translations");
+        $this->save_settings($iclsettings);
+        break;
+    case 'setup_got_to_step2':
+        $iclsettings['setup_wizard_step'] = 2;
+        $this->save_settings($iclsettings);
+        break;
+    case 'setup_got_to_step3':
+        $iclsettings['setup_wizard_step'] = 3;
+        $this->save_settings($iclsettings);
+        break;
+    case 'toggle_show_translations':
+        $iclsettings = $this->get_settings();
+        $iclsettings['show_translations_flag'] = intval(!$iclsettings['show_translations_flag']);
+        $this->save_settings($iclsettings);    
+        break;
+    case 'icl_messages': 
+        $iclsettings = $this->get_settings();
+        
+        if($iclsettings['site_id'] && $iclsettings['access_key'] && empty($iclsettings['icl_anonymous_user'])){
+            $iclq = new ICanLocalizeQuery($iclsettings['site_id'], $iclsettings['access_key']);       
+
+            $output = '';
+
+            if (isset($_POST['refresh']) && $_POST['refresh'] == 1) {
+                $reminders = $iclq->get_reminders(true);
+            } else {
+                $reminders = $iclq->get_reminders();
+            }
+            
+            $count = 0;
+            foreach($reminders as $r) {
+                $message = $r->message;
+                $message = str_replace('[', '<', $message);
+                $message = str_replace(']', '>', $message);
+                $url = $r->url;
+                $anchor_pos = strpos($url, '#');
+                if ($anchor_pos !== false) {
+                    $url = substr($url, 0, $anchor_pos);
+                }
+                
+                if(false !== strpos($url,'?')){
+                    $url_glue = '&';
+                }else{
+                    $url_glue = '?accesskey='.$this->settings['access_key'] . '&compact=1';
+                }
+                $output .= $message . ' - ' . $this->create_icl_popup_link(ICL_API_ENDPOINT. $url . $url_glue . '&message_id=' . $r->id. '&TB_iframe=true') . __('View', 'sitepress') . '</a>';
+
+                if ($r->can_delete == '1') {
+                    $on_click = 'dismiss_message(' . $r->id . ');';
+                    
+                    $output .= ' - <a href="#" onclick="'. $on_click . '">Dismiss</a>';
+                }
+                $output .= '<br />';
+                
+                $count += 1;
+                if ($count > 5) {
+                    break;
+                }
+                
+            }
+            
+            if ($output != '') {
+                $reminder_count = sizeof($reminders);
+                if ($reminder_count == 1){
+                    $reminder_text = __('Show 1 reminder', 'sitepress');
+                } else {
+                    $reminder_text = sprintf(__('Show %d reminders', 'sitepress'), $reminder_count);
+                }                
+                $resp = array('messages'=>$reminder_count, 'reminder_text' => $reminder_text, 'output'=>$output);
+            } else {
+                $resp = array('messages'=>0);
+            }
+        }else{
+            $resp = array('messages'=>0);
+        }
+        echo json_encode($resp);    
+        break;
+
+    case 'icl_delete_message':
+        $iclsettings = $this->get_settings();
+        $iclq = new ICanLocalizeQuery($iclsettings['site_id'], $iclsettings['access_key']);
+        $iclq->delete_message($_POST['message_id']);
+        break;
+    case 'icl_show_reminders':
+        $iclsettings['icl_show_reminders'] = $_POST['state']=='show'?1:0;
+        $this->save_settings($iclsettings);
+        break;
+    
+    case 'icl_help_links':
+        $iclsettings = $this->get_settings();
+        $iclq = new ICanLocalizeQuery($iclsettings['site_id'], $iclsettings['access_key']);
+        $links = $iclq->get_help_links();
+        $lang = $iclsettings['admin_default_language'];
+        if (!isset($links['resources'][$lang])) {
+            $lang = 'en';
+        }
+        
+        if (isset($links['resources'][$lang])) {
+            $output = '<ul>';
+            foreach( $links['resources'][$lang]['resource'] as $resource) {
+                if (isset($resource['attr'])) {
+                    $title = $resource['attr']['title'];
+                    $url = $resource['attr']['url'];
+                    $icon = $resource['attr']['icon'];
+                    $icon_width = $resource['attr']['icon_width'];
+                    $icon_height = $resource['attr']['icon_height'];
+                } else {
+                    $title = $resource['title'];
+                    $url = $resource['url'];
+                    $icon = $resource['icon'];
+                    $icon_width = $resource['icon_width'];
+                    $icon_height = $resource['icon_height'];
+                }
+                $output .= '<li>';
+                if ($icon) {
+                    $output .= '<img style="vertical-align: bottom; padding-right: 5px;" src="' . $icon . '"';
+                    if ($icon_width) {
+                        $output .= ' width="' . $icon_width . '"';
+                    }
+                    if ($icon_height) {
+                        $output .= ' height="' . $icon_height . '"';
+                    }
+                    $output .= '>';
+                }
+                $output .= '<a href="' . $url . '">' . $title . '</a></li>';
+            
+            }
+            $output .= '</ul>';
+            echo '1|' . $output;
+        } else {
+            echo '0|';
+        }
+        break;
+
+    case 'icl_show_sidebar':
+        $iclsettings['icl_sidebar_minimized'] = $_POST['state']=='hide'?1:0;
+        $this->save_settings($iclsettings);
+        break;
+    
+    case 'icl_promote':
+        $iclsettings['promote_wpml'] = $_POST['icl_promote']=='true'?1:0;
+        $this->save_settings($iclsettings);
+        break;        
+    
+    case 'save_translator_note':
+        update_post_meta($_POST['post_id'], '_icl_translator_note', $_POST['note']);
+        break;
+    
+    case 'icl_st_more_options':
+        foreach($_POST['icl_st'] as $k=>$v){
+            $iclsettings['st'][$k] = $v;
+        }
+        $this->save_settings($iclsettings);
+        echo 1;
+        break;
+        
+    case 'affiliate_info_check':
+        $iclq = new ICanLocalizeQuery($this->settings['site_id'], $this->settings['access_key']);       
+        if($iclq->test_affiliate_info($_POST['icl_affiliate_id'], $_POST['icl_affiliate_key'])){
+            $error = array('error'=>0);
+        }else{
+            $error = array('error'=>1);
+        }
+        echo json_encode($error);
+        break;
+        
+    case 'icl_hide_languages':
+        $iclsettings['hidden_languages'] = $_POST['icl_hidden_languages'];        
+        $active_languages = $this->get_active_languages();
+        if(!empty($iclsettings['hidden_languages'])){
+             if(1 == count($iclsettings['hidden_languages'])){
+                 $out = sprintf(__('%s is currently hidden to visitors.', 'sitepress'), 
+                    $active_languages[$iclsettings['hidden_languages'][0]]['display_name']);
+             }else{
+                 foreach($iclsettings['hidden_languages'] as $l){
+                     $_hlngs[] = $active_languages[$l]['display_name'];
+                 }                                 
+                 $hlangs = join(', ', $_hlngs);
+                 $out = sprintf(__('%s are currently hidden to visitors.', 'sitepress'), $hlangs);                 
+             }
+             $out .= ' ' . sprintf(__('You can enable its/their display for yourself, in your <a href="%s">profile page</a>.', 'sitepress'),
+                                            'profile.php#wpml');
+        } else {
+            $out = __('All languages are currently displayed.', 'sitepress'); 
+        }            
+        $this->save_settings($iclsettings);    
+        echo '1|'.$out;
+        break;
+        
+    case 'icl_adjust_ids':
+        $iclsettings['auto_adjust_ids'] = intval($_POST['icl_adjust_ids']);        
+        $this->save_settings($iclsettings);    
+        echo '1|';        
+        break;
+    
+    case 'icl_save_sl_options':
+        $iclsettings['modules']['absolute-links']['enabled'] = $this->settings['modules']['absolute-links']['enabled'];
+        $iclsettings['modules']['absolute-links']['sticky_links_widgets'] = intval($_POST['icl_sticky_links_widgets']);
+        $iclsettings['modules']['absolute-links']['sticky_links_strings'] = intval($_POST['icl_sticky_links_strings']);
+        $this->save_settings($iclsettings);    
+        echo '1|';        
+        break;
+    case 'icl_torubleshooting_more_options':
+        $iclsettings['troubleshooting_options'] = $_POST['troubleshooting_options'];
+        $this->save_settings($iclsettings);
+        echo '1|';        
+        break;
+    case 'icl_st_option_writes_form':
+        if(!empty($_POST['icl_admin_options'])){
+            icl_register_admin_options($_POST['icl_admin_options']);
+            echo '1|';        
+        }else{
+            echo '0' . __('No strings selected', 'sitepress');
+        }
+        break;
+    case 'icl_st_ow_export':
+        // filter empty options out
+        do{
+            list($_POST['icl_admin_options'], $empty_found) = _icl_st_filter_empty_options_out($_POST['icl_admin_options']);
+        }while($empty_found);
+        
+        if(!empty($_POST['icl_admin_options'])){
+            
+            foreach($_POST['icl_admin_options'] as $k => $opt){
+                if(!$opt){
+                    unset($_POST['icl_admin_options'][$k]);
+                }
+            }
+            
+            $message = __('Include the following PHP in your code. <em>functions.php</em> would be a good place.', 'sitepress')
+            . "<textarea wrap=\"soft\">&lt;?php
+if (function_exists('wpml_register_admin_strings')) {
+    wpml_register_admin_strings('".serialize($_POST['icl_admin_options'])."');
+}
+?&gt;</textarea>";
+        }else{
+            $error = 1;
+            $message = __('Error: no strings selected', 'sitepress');
+        }
+        echo json_encode(array('error'=>0, 'message'=>$message));
+        break;
+    case 'reset_languages':
+        require_once(ICL_PLUGIN_PATH . '/inc/lang-data.inc');
+        
+        $active = $wpdb->get_col("SELECT code FROM {$wpdb->prefix}icl_languages WHERE active = 1");
+        
+        mysql_query("TRUNCATE TABLE `{$wpdb->prefix}icl_languages`");
+        mysql_query("TRUNCATE TABLE `{$wpdb->prefix}icl_languages_translations`");
+        mysql_query("TRUNCATE TABLE `{$wpdb->prefix}icl_flags`");
+
+        foreach($langs_names as $key=>$val){
+            if(strpos($key,'Norwegian Bokm')===0){ $key = 'Norwegian Bokmål'; $lang_codes[$key] = 'nb';} // exception for norwegian
+            $default_locale = isset($lang_locales[$lang_codes[$key]]) ? $lang_locales[$lang_codes[$key]] : '';
+            @$wpdb->insert($wpdb->prefix . 'icl_languages', array('english_name'=>$key, 'code'=>$lang_codes[$key], 'major'=>$val['major'], 'active'=>0, 'default_locale'=>$default_locale));
+        }        
+        
+        //restore active
+        $wpdb->query("UPDATE {$wpdb->prefix}icl_languages SET active=1 WHERE code IN('".join("','",$active)."')");
+        
+        foreach($langs_names as $lang=>$val){        
+            if(strpos($lang,'Norwegian Bokm')===0){ $lang = 'Norwegian Bokmål'; $lang_codes[$lang] = 'nb';}
+            foreach($val['tr'] as $k=>$display){        
+                if(strpos($k,'Norwegian Bokm')===0){ $k = 'Norwegian Bokmål';}
+                if(!trim($display)){$display = $lang;}
+                if(!($wpdb->get_var("SELECT id FROM {$table_name} WHERE language_code='{$lang_codes[$lang]}' AND display_language_code='{$lang_codes[$k]}'"))){
+                    $wpdb->insert($wpdb->prefix . 'icl_languages_translations', 
+                    array('language_code'=>$lang_codes[$lang], 'display_language_code'=>$lang_codes[$k], 'name'=>$display));
+                }
+            }    
+        } 
+        $wpdb->update($wpdb->prefix.'icl_flags', array('from_template'=>0));       
+        
+        $codes = $wpdb->get_col("SELECT code FROM {$wpdb->prefix}icl_languages");
+        foreach($codes as $code){
+            if(!$code || $wpdb->get_var("SELECT lang_code FROM {$wpdb->prefix}icl_flags WHERE lang_code='{$code}'")) continue;
+            if(!file_exists(ICL_PLUGIN_PATH.'/res/flags/'.$code.'.png')){
+                $file = 'nil.png';
+            }else{
+                $file = $code.'.png';
+            }    
+            $wpdb->insert($wpdb->prefix.'icl_flags', array('lang_code'=>$code, 'flag'=>$file, 'from_template'=>0));
+        }
+        
+        icl_cache_clear();
+        break;
+    case 'icl_support_update_ticket':
+        if (isset($_POST['ticket'])) {
+            $temp = str_replace('icl_support_ticket_', '', $_POST['ticket']);
+            $temp = explode('_', $temp);
+            $id = (int)$temp[0];
+            $num = (int)$temp[1];
+            if ($id && $num) {
+                if (isset($iclsettings['icl_support']['tickets'][$id])) {
+                    $iclsettings['icl_support']['tickets'][$id]['messages'] = $num;
+                    $this->save_settings($iclsettings);
+                }
+            }
+        }
+        break;
+    case 'icl_custom_tax_sync_options':
+        foreach($_POST['icl_sync_tax'] as $k=>$v){
+            $iclsettings['taxonomies_sync_option'][$k] = $v;
+            if($v){
+                $this->verify_taxonomy_translations($k);        
+            }            
+        }
+        $this->save_settings($iclsettings);
+        echo '1|';
+        break;
+    case 'icl_custom_posts_sync_options':    
+        foreach($_POST['icl_sync_custom_posts'] as $k=>$v){            
+            $iclsettings['custom_posts_sync_option'][$k] = $v;
+            if($v){
+                $this->verify_post_translations($k);                
+            }            
+        }
+        $this->save_settings($iclsettings);
+        echo '1|';
+        break;
+        
+    default:
+        do_action('icl_ajx_custom_call', $_REQUEST['icl_ajx_action'], $_REQUEST);
+}    
+
+if (!isset($_POST['unit-test'])) {
+    exit;
+}
+  
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/headspace2/load.php b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/headspace2/load.php
new file mode 100644
index 0000000..524b0b5
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/headspace2/load.php
@@ -0,0 +1,125 @@
+<?php
+/*
+Package Name: Compatibility for Headspace2 SEO
+Package URI: http://wpml.org/
+Description: Makes Headspace2 SEO compatible with WPML
+Plugin: headspace2/headspace.php
+Plugin version: 3.6.32
+Author: WPML
+Author URI: http://www.onthegosystems.com
+Version: 1.0
+*/
+  
+class WP_Headspace2_SEO_compatibility  extends WPML_Package{
+    
+	
+    var $context = 'plugin headspace2';
+    var $current_option;
+    var $translatable_strings = array(
+            'headspace_global' => array(
+                'title' => 'Global Settings',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_page' => array(
+                'title' => 'Global Settings Page',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_post' => array(
+                'title' => 'Global Settings Post',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_attachment' => array(
+                'title' => 'Global Settings Attachment',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_login' => array(
+                'title' => 'Global Settings Login',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_404' => array(
+                'title' => 'Global Settings 404',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_search' => array(
+                'title' => 'Global Settings Search',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_category' => array(
+                'title' => 'Global Settings Category',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_author' => array(
+                'title' => 'Global Settings Author',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_home' => array(
+                'title' => 'Global Settings Home',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_front' => array(
+                'title' => 'Global Settings Front',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_tags' => array(
+                'title' => 'Global Settings Tags',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_taxonomy' => array(
+                'title' => 'Global Settings Taxonomy',
+                'values' => array('page_title','description','keywords')
+                ),
+            'headspace_archive' => array(
+                'title' => 'Global Settings Archive',
+                'values' => array('page_title','description','keywords')
+                )
+        );
+	
+    function __construct(){
+        parent::__construct();
+        if(!is_admin()) {
+            foreach ($this->translatable_strings as $option => $value) {
+                $option_value = get_option($option);
+                if (!$option_value) continue;
+                $this->current_option = $option;
+                add_filter('option_'.$option,array(&$this,'filter_option'));
+            }
+            add_filter('option_headspace_options',array(&$this,'filter_option_firsttimevisitor'));
+        } else {
+            foreach ($this->translatable_strings as $option => $value) {
+                $option_value = get_option($option);
+                if (!$option_value) continue;
+                foreach($value['values'] as $v){
+                    if (!$option_value[$v]) continue;
+                    icl_register_string( $this->context, $value['title'].' - '.$this->make_title($v), $option_value[$v] );
+                }
+            }
+            $first_time = get_option ('headspace_options');
+            if ( isset($first_time['site']['hss_firsttimevisitor']['message']) && !empty($first_time['site']['hss_firsttimevisitor']['message']) )
+                icl_register_string( $this->context, 'Site Modules - First time visitor message', $first_time['site']['hss_firsttimevisitor']['message'] );
+        }
+    }
+
+	function filter_option($value){
+        foreach ( $this->translatable_strings[$this->current_option]['values'] as $v ) {
+            $value[$v] = icl_t( $this->context, $this->translatable_strings[$this->current_option]['title'].' - '.$this->make_title($v), $value[$v] );
+        }
+        return $value;
+    }
+
+    function filter_option_firsttimevisitor($value){
+        if ( !isset($value['site']['hss_firsttimevisitor']['message']) || empty($value['site']['hss_firsttimevisitor']['message']) ) return $value;
+        $value['site']['hss_firsttimevisitor']['message'] = icl_t( $this->context, 'Site Modules - First time visitor message', $value['site']['hss_firsttimevisitor']['message']);
+        return $value;
+    }
+
+    function make_title($string){
+        return ucfirst(str_replace('_',' ',$string));
+    }
+
+    function __destruct(){
+        parent::__destruct();
+    }
+}
+
+$WP_Headspace2_SEO_compatibility = new WP_Headspace2_SEO_compatibility();
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/headspace2/res/custom_field_translation.csv b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/headspace2/res/custom_field_translation.csv
new file mode 100644
index 0000000..f3569aa
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/headspace2/res/custom_field_translation.csv
@@ -0,0 +1,24 @@
+headspace2/headspace.php,custom_field,_headspace_page_title,Page title,1
+headspace2/headspace.php,custom_field,_headspace_keywords,Keywords,1
+headspace2/headspace.php,custom_field,_headspace_description,Page description,1
+headspace2/headspace.php,custom_field,_headspace_more_text,More text,1
+headspace2/headspace.php,custom_field,_headspace_blog_name,Site description,1
+headspace2/headspace.php,custom_field,_headspace_blog_taline,Site tagline,1
+headspace2/headspace.php,custom_field,_headspace_raw,Raw data,1
+headspace2/headspace.php,custom_field,_headspace_raw_footer,Raw footer data,1
+headspace2/headspace.php,custom_field,_headspace_pagelink,Page link,0
+headspace2/headspace.php,custom_field,_headspace_follow_link,Follow links,0
+headspace2/headspace.php,custom_field,_headspace_noindex,Robots No-index,0
+headspace2/headspace.php,custom_field,_headspace_nofollow,Robots No-follow,0
+headspace2/headspace.php,custom_field,_headspace_noarchive,Robots No-archive,0
+headspace2/headspace.php,custom_field,_headspace_noodp,Robots No-ODP,0
+headspace2/headspace.php,custom_field,_headspace_noydir,Robots No-Yahoo Dir,0
+headspace2/headspace.php,custom_field,_headspace_plugins,Specific plugins,0
+headspace2/headspace.php,custom_field,_headspace_theme,Theme,0
+headspace2/headspace.php,custom_field,_headspace_rellink_prev,Relative Links (previous),0
+headspace2/headspace.php,custom_field,_headspace_rellink_next,Relative Links (next),0
+headspace2/headspace.php,custom_field,_headspace_rellink_start,Relative Links (start),0
+headspace2/headspace.php,custom_field,_headspace_rellink_end,Relative Links (end),0
+headspace2/headspace.php,custom_field,_headspace_rellink_parent,Relative Links (parent),0
+headspace2/headspace.php,custom_field,_headspace_js,Javascript,0
+headspace2/headspace.php,custom_field,_headspace_style,Stylesheets,0
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/wp-super-cache/load.php b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/wp-super-cache/load.php
new file mode 100644
index 0000000..438ae09
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/plugins/wp-super-cache/load.php
@@ -0,0 +1,38 @@
+<?php
+/*
+Package Name: WP Super Cache Integration
+Package URI: http://wpml.org/
+Description: Updates cache on certain WPML actions
+Plugin: wp-super-cache/wp-cache.php
+Plugin version: 0.9.9
+Author: WPML
+Author URI: http://www.onthegosystems.com
+Version: 1.0
+*/
+  
+  
+
+  
+class WP_CPI_WP_Super_Cache extends WPML_Package{
+    
+    function __construct(){
+        parent::__construct();
+    }
+    
+    public function clear_cache(){
+        if(function_exists('wp_cache_clean_cache')){
+            global $file_prefix;
+            wp_cache_clean_cache($file_prefix);            
+        }
+    }
+    
+    function __destruct(){
+        parent::__destruct();
+    }
+}
+
+// don't really need to instantiate this one
+// $WP_CPI_WP_Super_Cache = new WP_CPI_WP_Super_Cache();
+
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/compatibility-package.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/compatibility-package.css
new file mode 100644
index 0000000..e4af46c
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/compatibility-package.css
@@ -0,0 +1,6 @@
+
+	#wpml_credit_footer a, #wpml_credit_footer a:link, #wpml_credit_footer a:visited { 
+		font-weight: bold !important; }
+		
+	#wpml_credit_footer a:hover { 
+		text-decoration: underline !important; }
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/selector-footer.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/selector-footer.css
new file mode 100644
index 0000000..a1e4e8b
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/selector-footer.css
@@ -0,0 +1,44 @@
+
+
+
+
+#icl_lang_selector_footer {
+  margin: 10px 0;
+  padding: 0;
+  text-align: center;
+  /*background: #fcfcfc;
+  border: 1px solid #e1e1e1;*/
+  border-left:0;
+  border-right:0;
+  color: #6E6E6E;
+  font: 11px Verdana, sans-serif;
+}
+
+#icl_lang_selector_footer ul {
+  list-style: none;
+  margin:0;
+  padding:0;
+}
+
+#icl_lang_selector_footer ul li img {
+  /*margin-right:5px;*/
+  position: relative;
+  top: 1px;
+  width: 18px;
+  height: 12px;
+}
+
+#icl_lang_selector_footer ul li {
+  display:inline;
+  margin:0 15px 0 0;
+  padding:0;
+}
+
+#icl_lang_selector_footer ul li a, #icl_lang_selector_footer ul li a:visited {
+  color: #B2B2B2;
+  text-decoration: none;
+}
+
+#icl_lang_selector_footer ul li a:hover, #icl_lang_selector_footer ul li a:active {
+  color: #6E6E6E;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/selector-widget.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/selector-widget.css
new file mode 100644
index 0000000..824e887
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/css/selector-widget.css
@@ -0,0 +1,85 @@
+#lang_sel {height:32px; font-family:arial, sans-serif;}
+/* hack to correct IE5.5 faulty box model */
+* html #lang_sel {width:12em; w\idth:12em;}
+/* remove all the bullets, borders and padding from the default list styling */
+#lang_sel ul, #lang_sel li {padding:0 !important; margin:0 !important; list-style-type:none !important;}
+#lang_sel li:before{content:'' !important;}
+#lang_sel ul ul {width:100%;}
+/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
+#lang_sel li {float:left;width:100%;position:relative;}
+/* style the links for the top level */
+#lang_sel a, #lang_sel a:link, #lang_sel a:visited {
+	display:block;
+	/*background: #fcfcfc;*/
+	font-size:12px;
+	text-decoration:none !important; 
+	color:#fff; 
+	border:1px solid #000;
+	height: 16px;
+	line-height:16px;
+	border-top: 1px solid #e1e1e1;
+	border-right: 1px solid #c8c8c8;
+	border-bottom: 1px solid #bfbfbf;
+	border-left: 1px solid #e1e1e1;
+	padding: 5px 10px;
+	font: normal bold 12px Verdana, sans-serif;
+	}
+/* a hack so that IE5.5 faulty box model is corrected */
+* html #lang_sel a, * html #lang_sel a:link, * html #lang_sel a:visited {width:100%; w\idth:100%;}
+
+/* hide the sub levels and give them a positon absolute so that they take up no room */
+#lang_sel ul ul {visibility:hidden;position:absolute;height:0;top:28px;left:0; width:100%;border-top:0;}
+/* another hack for IE5.5 */
+* html #lang_sel ul ul {top:28px;t\op:28px;}
+
+/* style the table so that it takes no ppart in the layout - required for IE to work */
+#lang_sel table {position:absolute; top:0; left:0; border-collapse:collapse;}
+
+/* style the second level links */
+#lang_sel ul ul a, #lang_sel ul ul a:link, #lang_sel ul ul a:visited {
+	font-weight: normal;
+	/*font-size: 11px;*/
+	background:#eee; 
+	color:#000 !important; 
+	/*height:auto; line-height:1em; */
+	/*padding:3px 10px;*/
+	border-width:0 1px 1px 1px;
+	height: 20px;
+	line-height: 20px;
+	/*width: 146px;*/
+	}
+/* yet another hack for IE5.5 */
+* html #lang_sel ul ul a, * html #lang_sel ul ul a:visited {width:100%;w\idth:100%;}
+
+/* style the top level hover */
+#lang_sel a:hover, #lang_sel ul ul a:hover{color:#000; background:#ccc;}
+#lang_sel :hover > a, #lang_sel ul ul :hover > a {color:#000; background:#ccc;}
+
+#lang_sel a.lang_sel_sel{
+    background:url(../images/nav-arrow-down.png) #fcfcfc right no-repeat;
+    color: #bfbfbf;
+}
+#lang_sel a.lang_sel_sel:hover{
+    text-decoration: none;
+    /*color:#000;*/
+}
+
+/* make the second level visible when hover on first level list OR link */
+#lang_sel ul li:hover ul,
+#lang_sel ul a:hover ul{visibility:visible; }
+
+
+#lang_sel ul li img {
+	position: relative;
+	margin: 0;
+	padding: 0;
+	margin-right: -6px;
+	border: 1px solid #bfbfbf;
+	top: 2px;
+}
+
+#lang_sel ul li ul li img {
+	margin-right: -2px;
+}
+
+#language-selector #lang_sel ul ul { margin-left: -7px !important; }
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/images/nav-arrow-down.png b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/images/nav-arrow-down.png
new file mode 100644
index 0000000..63a734b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/images/nav-arrow-down.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/load.php b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/load.php
new file mode 100644
index 0000000..1ced4eb
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/atahualpa/load.php
@@ -0,0 +1,102 @@
+<?php
+/*
+Package Name: Extra options for the Atahualpa theme
+Package URI: http://wpml.org/
+Description: This package enables basic Atahualpa-WPML compatibility.
+Theme: atahualpa
+Theme version: 3.4.4
+Author: WPML
+Author URI: http://www.onthegosystems.com
+Version: 1.0
+*/
+
+
+class Atahualpa_theme_compatibility  extends WPML_Package{
+    
+		var $translatable_strings = array(
+			'homepage_meta_description',
+			'homepage_meta_keywords',
+			'searchbox_text',
+			'post_feed_link_title',
+			'home_page_menu_bar',
+			'home_cat_menu_bar',
+			'default_cat_descr_text',
+			'home_multi_next_prev',
+			'home_single_next_prev',
+			'multi_next_prev_newer',
+			'multi_next_prev_older',
+			'single_next_prev_newer',
+			'single_next_prev_older',
+			'comments_next_prev_newer',
+			'comments_next_prev_older',
+			'widget_title_box',
+			'widget_content',
+			'post_byline_home',
+			'post_byline_multi',
+			'post_byline_single',
+			'post_kicker_page',
+			'post_byline_page',
+			'post_footer_home',
+			'post_footer_multi',
+			'post_footer_single',
+			'post_footer_page',
+			'custom_read_more',
+			'more_tag',
+			'comment_reply_link_text',
+			'comment_edit_link_text',
+			'comment_moderation_text',
+			'comments_are_closed_text',
+			'footer_style_content',
+			'archives_category_title'
+			);
+	
+    function __construct(){
+        parent::__construct();
+        
+		if (is_admin()) add_action('init',array(&$this,'register_strings'));
+		else add_action('get_header',array(&$this,'filter_options'));
+		
+        $wpage = ICL_PLUGIN_FOLDER . '/menu/languages.php';
+		$title = 'Atahualpa - ';
+        
+			// Widget switcher CSS
+		$this->add_option_checkbox($wpage, __('Load CSS for language selector widget', 'sitepress'), 'widget_load_css', $title . __('More options', 'sitepress'), 'checked');
+		
+		
+		
+		if($this->settings['widget_load_css']) {
+			$this->load_css('css/selector-widget.css');
+		} else {
+			if(!defined('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS'))
+				define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS',true);
+		}
+		
+		$this->load_css('css/compatibility-package.css');
+    }
+
+	function make_title($string){
+		return ucfirst(str_replace('_',' ',$string));
+	}
+
+	function register_strings(){
+		global $bfa_ata;
+		foreach ($this->translatable_strings as $string) {
+			icl_register_string( 'theme '.$this->name, $this->make_title($string), $bfa_ata[$string] );
+		}
+	}
+
+	function filter_options(){
+		global $bfa_ata;
+		$bfa_ata['get_option_home'] = rtrim(icl_get_home_url(),'/');
+		foreach ($this->translatable_strings as $string) {
+			$bfa_ata[$string] = icl_t( 'theme '.$this->name, $this->make_title($string), $bfa_ata[$string] );
+		}
+	}
+
+    function __destruct(){
+        parent::__destruct();
+    }
+}
+
+$Atahualpa_theme_compatibility = new Atahualpa_theme_compatibility();
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/genesis/load.php b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/genesis/load.php
new file mode 100644
index 0000000..f81adda
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/genesis/load.php
@@ -0,0 +1,42 @@
+<?php
+/*
+Package Name: Compatibility package for Genesis
+Package URI: http://wpml.org/
+Description: This package enables basic Genesis-WPML compatibility.
+Theme: genesis
+Theme version: 1.0.2
+Author: WPML
+Author URI: http://www.onthegosystems.com
+Version: 1.0
+*/
+
+// Some properties that are inherited are:
+// name  (the package identifier - in this case wp-default-theme) - very handy sometimes
+// data  (meta information that you can see at the top of this post - just in case ypu need it)
+// settings  (your package's settings as they are saved from the options it will register)
+// type (e.g. themes or plugins)  
+  
+class Genesis_theme_compatibility  extends WPML_Package{
+    
+    function __construct(){
+        parent::__construct();
+        
+        global $sitepress;
+        if($sitepress->get_current_language() != $sitepress->get_default_language()){
+            add_filter('genesis_seo_title', array($this, 'genesis_seo_title_filter'));
+        }        
+        
+    }
+
+    function genesis_seo_title_filter($str){
+        $str = preg_replace('@href="([^"]+)"@i', 'href="'.icl_get_home_url().'"', $str);
+        return $str;
+    }
+    
+    function __destruct(){
+        parent::__destruct();
+    }
+}
+
+$Genesis_theme_compatibility = new Genesis_theme_compatibility();
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/compatibility-package.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/compatibility-package.css
new file mode 100644
index 0000000..a387b44
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/compatibility-package.css
@@ -0,0 +1,8 @@
+	
+	#wpml_credit_footer { width: 100%; margin: 10px 0; padding: 0; text-align: center; font-size: 11px; }
+	
+	#wpml_credit_footer a, #wpml_credit_footer a:link, #wpml_credit_footer a:visited { 
+		font-weight: bold !important; }
+		
+	#wpml_credit_footer a:hover { 
+		text-decoration: underline !important; }
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/selector-footer.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/selector-footer.css
new file mode 100644
index 0000000..a1e4e8b
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/selector-footer.css
@@ -0,0 +1,44 @@
+
+
+
+
+#icl_lang_selector_footer {
+  margin: 10px 0;
+  padding: 0;
+  text-align: center;
+  /*background: #fcfcfc;
+  border: 1px solid #e1e1e1;*/
+  border-left:0;
+  border-right:0;
+  color: #6E6E6E;
+  font: 11px Verdana, sans-serif;
+}
+
+#icl_lang_selector_footer ul {
+  list-style: none;
+  margin:0;
+  padding:0;
+}
+
+#icl_lang_selector_footer ul li img {
+  /*margin-right:5px;*/
+  position: relative;
+  top: 1px;
+  width: 18px;
+  height: 12px;
+}
+
+#icl_lang_selector_footer ul li {
+  display:inline;
+  margin:0 15px 0 0;
+  padding:0;
+}
+
+#icl_lang_selector_footer ul li a, #icl_lang_selector_footer ul li a:visited {
+  color: #B2B2B2;
+  text-decoration: none;
+}
+
+#icl_lang_selector_footer ul li a:hover, #icl_lang_selector_footer ul li a:active {
+  color: #6E6E6E;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/selector-header.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/selector-header.css
new file mode 100644
index 0000000..859fc5c
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/css/selector-header.css
@@ -0,0 +1,89 @@
+#lang_sel {height:32px; position:relative; z-index:999; float: right; margin-right: 10px; margin-top:10px;  font-family:arial, sans-serif;}
+/* hack to correct IE5.5 faulty box model */
+* html #lang_sel {width:12em; w\idth:12em;}
+/* remove all the bullets, borders and padding from the default list styling */
+#lang_sel ul, #lang_sel li {padding:0 !important; margin:0 !important; list-style-type:none !important;}
+#lang_sel li:before{content:'' !important;}
+#lang_sel ul ul {width:149px;}
+/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
+#lang_sel li {float:left;width:149px;position:relative;}
+/* style the links for the top level */
+#lang_sel a, #lang_sel a:link, #lang_sel a:visited {
+	display:block;
+	/*background: #fcfcfc;*/
+	font-size:12px;
+	text-decoration:none !important; 
+	color:#fff; 
+	border:1px solid #000; 
+	line-height:18px;
+	border-top: 1px solid #e1e1e1;
+	border-right: 1px solid #c8c8c8;
+	border-bottom: 1px solid #bfbfbf;
+	border-left: 1px solid #e1e1e1;
+	padding: 5px 10px;
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;
+	border-radius: 5px; /* future proofing */
+	-khtml-border-radius: 5px; /* for old Konqueror browsers */
+	font: normal bold 12px Verdana, sans-serif;
+	}
+/* a hack so that IE5.5 faulty box model is corrected */
+* html #lang_sel a, * html #lang_sel a:link, * html #lang_sel a:visited {width:149px; w\idth:138px;}
+
+/* hide the sub levels and give them a positon absolute so that they take up no room */
+#lang_sel ul ul {visibility:hidden;position:absolute;height:0;top:25px;left:0; width:149px;border-top:0;}
+/* another hack for IE5.5 */
+* html #lang_sel ul ul {top:25px;t\op:25px;}
+
+/* style the table so that it takes no ppart in the layout - required for IE to work */
+#lang_sel table {position:absolute; top:0; left:0; border-collapse:collapse;}
+
+/* style the second level links */
+#lang_sel ul ul a, #lang_sel ul ul a:link, #lang_sel ul ul a:visited {
+	font-weight: normal;
+	/*font-size: 11px;*/
+	background:#eee; 
+	color:#000 !important; 
+	/*height:auto; line-height:1em; */
+	/*padding:3px 10px;*/
+	border-width:0 1px 1px 1px;
+	line-height: 18px;
+	height: 18px;
+	-moz-border-radius: 0;
+	-webkit-border-radius: 0;
+	border-radius: 0; /* future proofing */
+	-khtml-border-radius: 0; /* for old Konqueror browsers */
+	}
+/* yet another hack for IE5.5 */
+* html #lang_sel ul ul a, * html #lang_sel ul ul a:visited {width:150px;w\idth:128px;}
+
+/* style the top level hover */
+#lang_sel a:hover, #lang_sel ul ul a:hover{color:#000; background:#ccc;}
+#lang_sel :hover > a, #lang_sel ul ul :hover > a {color:#000; background:#ccc;}
+
+#lang_sel a.lang_sel_sel{
+    background:url(../images/nav-arrow-down.png) #fcfcfc right no-repeat;
+    color: #bfbfbf;
+}
+#lang_sel a.lang_sel_sel:hover{
+    text-decoration: none;
+    /*color:#000;*/
+}
+
+/* make the second level visible when hover on first level list OR link */
+#lang_sel ul li:hover ul,
+#lang_sel ul a:hover ul{visibility:visible; }
+
+
+#lang_sel ul li img {
+	position: relative;
+	margin: 0;
+	padding: 0;
+	margin-right: -6px;
+	border: 1px solid #bfbfbf;
+	top: 2px;
+}
+
+#lang_sel ul li ul li img {
+	margin-right: -2px;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/images/nav-arrow-down.png b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/images/nav-arrow-down.png
new file mode 100644
index 0000000..63a734b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/images/nav-arrow-down.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/load.php b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/load.php
new file mode 100644
index 0000000..3eecee7
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/hybrid/load.php
@@ -0,0 +1,86 @@
+<?php
+/*
+Package Name: Extra options for the Hybrid theme framework
+Package URI: http://wpml.org/
+Description: This package enables basic Hybrid-WPML compatibility.
+Theme: hybrid
+Theme version: 0.6.1
+Author: WPML
+Author URI: http://www.onthegosystems.com
+Version: 1.0
+*/
+
+// Some properties that are inherited are:
+// name  (the package identifier - in this case wp-default-theme) - very handy sometimes
+// data  (meta information that you can see at the top of this post - just in case ypu need it)
+// settings  (your package's settings as they are saved from the options it will register)
+// type (e.g. themes or plugins)  
+  
+class Hybrid_theme_compatibility  extends WPML_Package{
+    
+    function __construct(){
+        parent::__construct();
+        
+        $wpage = ICL_PLUGIN_FOLDER . '/menu/languages.php';
+		$title = 'Hybrid - ';
+		
+			// Header switcher
+		
+        $this->add_option_checkbox(
+			$wpage,
+			__('Add a list of languages to the site\'s header','sitepress'),
+			'header_language_selector',
+			$title . __('Language selector options','sitepress'),
+			'checked'
+				);
+		
+        $this->add_option_checkbox(
+			$wpage,
+			__('Only include languages with translation in the languages list header', 'sitepress'),
+			'header_skip_languages',
+			$title . __('More options', 'sitepress'),
+			'checked'
+				);
+		
+		$this->add_option_checkbox(
+			$wpage,
+			__('Load CSS for header languages list', 'sitepress'),
+			'header_load_css',
+			$title . __('More options', 'sitepress'),
+			'checked'
+				);
+		
+		if($this->settings['header_language_selector']){
+            add_action('hybrid_before_header',array(&$this,'language_selector_header'));
+			if($this->settings['header_load_css']) {
+				$this->load_css('css/selector-header.css');
+			}
+			$this->check_sidebar_language_selector_widget();
+        }
+		
+		add_filter('hybrid_site_title',array(&$this,'filter_home_link'));
+		add_filter('wp_page_menu',array(&$this,'filter_home_link'));
+		
+		$settings = get_option('hybrid_theme_settings');
+		if ( $settings && !empty($settings['footer_insert']) ) {
+			icl_register_string( 'theme '.$this->name, 'Footer text', $settings['footer_insert'] );
+			add_action('hybrid_footer',array(&$this,'translate_footer_text'),0);
+		}
+		
+		$this->load_css('css/compatibility-package.css');
+    }
+
+	function translate_footer_text() {
+		global $hybrid, $hybrid_settings;
+		$translation = icl_t('theme '.$this->name,'Footer text',$hybrid_settings['footer_insert']);
+		$hybrid_settings['footer_insert'] = $translation;
+		$hybrid->settings['footer_insert'] = $translation;
+	}
+
+    function __destruct(){
+        parent::__destruct();
+    }
+}
+
+$Hybrid_theme_compatibility = new Hybrid_theme_compatibility();
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/compatibility-package.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/compatibility-package.css
new file mode 100644
index 0000000..c432129
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/compatibility-package.css
@@ -0,0 +1,8 @@
+
+	#wpml_credit_footer { width: 100%; margin: 10px 0; padding: 0; text-align: center; font-size: 11px; }
+	
+	#wpml_credit_footer a, #wpml_credit_footer a:link, #wpml_credit_footer a:visited { 
+		font-weight: bold !important; }
+		
+	#wpml_credit_footer a:hover { 
+		text-decoration: underline !important; }
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/selector-footer.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/selector-footer.css
new file mode 100644
index 0000000..a1e4e8b
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/selector-footer.css
@@ -0,0 +1,44 @@
+
+
+
+
+#icl_lang_selector_footer {
+  margin: 10px 0;
+  padding: 0;
+  text-align: center;
+  /*background: #fcfcfc;
+  border: 1px solid #e1e1e1;*/
+  border-left:0;
+  border-right:0;
+  color: #6E6E6E;
+  font: 11px Verdana, sans-serif;
+}
+
+#icl_lang_selector_footer ul {
+  list-style: none;
+  margin:0;
+  padding:0;
+}
+
+#icl_lang_selector_footer ul li img {
+  /*margin-right:5px;*/
+  position: relative;
+  top: 1px;
+  width: 18px;
+  height: 12px;
+}
+
+#icl_lang_selector_footer ul li {
+  display:inline;
+  margin:0 15px 0 0;
+  padding:0;
+}
+
+#icl_lang_selector_footer ul li a, #icl_lang_selector_footer ul li a:visited {
+  color: #B2B2B2;
+  text-decoration: none;
+}
+
+#icl_lang_selector_footer ul li a:hover, #icl_lang_selector_footer ul li a:active {
+  color: #6E6E6E;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/selector-header.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/selector-header.css
new file mode 100644
index 0000000..859fc5c
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/css/selector-header.css
@@ -0,0 +1,89 @@
+#lang_sel {height:32px; position:relative; z-index:999; float: right; margin-right: 10px; margin-top:10px;  font-family:arial, sans-serif;}
+/* hack to correct IE5.5 faulty box model */
+* html #lang_sel {width:12em; w\idth:12em;}
+/* remove all the bullets, borders and padding from the default list styling */
+#lang_sel ul, #lang_sel li {padding:0 !important; margin:0 !important; list-style-type:none !important;}
+#lang_sel li:before{content:'' !important;}
+#lang_sel ul ul {width:149px;}
+/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
+#lang_sel li {float:left;width:149px;position:relative;}
+/* style the links for the top level */
+#lang_sel a, #lang_sel a:link, #lang_sel a:visited {
+	display:block;
+	/*background: #fcfcfc;*/
+	font-size:12px;
+	text-decoration:none !important; 
+	color:#fff; 
+	border:1px solid #000; 
+	line-height:18px;
+	border-top: 1px solid #e1e1e1;
+	border-right: 1px solid #c8c8c8;
+	border-bottom: 1px solid #bfbfbf;
+	border-left: 1px solid #e1e1e1;
+	padding: 5px 10px;
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;
+	border-radius: 5px; /* future proofing */
+	-khtml-border-radius: 5px; /* for old Konqueror browsers */
+	font: normal bold 12px Verdana, sans-serif;
+	}
+/* a hack so that IE5.5 faulty box model is corrected */
+* html #lang_sel a, * html #lang_sel a:link, * html #lang_sel a:visited {width:149px; w\idth:138px;}
+
+/* hide the sub levels and give them a positon absolute so that they take up no room */
+#lang_sel ul ul {visibility:hidden;position:absolute;height:0;top:25px;left:0; width:149px;border-top:0;}
+/* another hack for IE5.5 */
+* html #lang_sel ul ul {top:25px;t\op:25px;}
+
+/* style the table so that it takes no ppart in the layout - required for IE to work */
+#lang_sel table {position:absolute; top:0; left:0; border-collapse:collapse;}
+
+/* style the second level links */
+#lang_sel ul ul a, #lang_sel ul ul a:link, #lang_sel ul ul a:visited {
+	font-weight: normal;
+	/*font-size: 11px;*/
+	background:#eee; 
+	color:#000 !important; 
+	/*height:auto; line-height:1em; */
+	/*padding:3px 10px;*/
+	border-width:0 1px 1px 1px;
+	line-height: 18px;
+	height: 18px;
+	-moz-border-radius: 0;
+	-webkit-border-radius: 0;
+	border-radius: 0; /* future proofing */
+	-khtml-border-radius: 0; /* for old Konqueror browsers */
+	}
+/* yet another hack for IE5.5 */
+* html #lang_sel ul ul a, * html #lang_sel ul ul a:visited {width:150px;w\idth:128px;}
+
+/* style the top level hover */
+#lang_sel a:hover, #lang_sel ul ul a:hover{color:#000; background:#ccc;}
+#lang_sel :hover > a, #lang_sel ul ul :hover > a {color:#000; background:#ccc;}
+
+#lang_sel a.lang_sel_sel{
+    background:url(../images/nav-arrow-down.png) #fcfcfc right no-repeat;
+    color: #bfbfbf;
+}
+#lang_sel a.lang_sel_sel:hover{
+    text-decoration: none;
+    /*color:#000;*/
+}
+
+/* make the second level visible when hover on first level list OR link */
+#lang_sel ul li:hover ul,
+#lang_sel ul a:hover ul{visibility:visible; }
+
+
+#lang_sel ul li img {
+	position: relative;
+	margin: 0;
+	padding: 0;
+	margin-right: -6px;
+	border: 1px solid #bfbfbf;
+	top: 2px;
+}
+
+#lang_sel ul li ul li img {
+	margin-right: -2px;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/images/nav-arrow-down.png b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/images/nav-arrow-down.png
new file mode 100644
index 0000000..63a734b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/images/nav-arrow-down.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/load.php b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/load.php
new file mode 100644
index 0000000..e54af9f
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/thematic/load.php
@@ -0,0 +1,90 @@
+<?php
+/*
+Package Name: Extra options for the Thematic theme framework
+Package URI: http://wpml.org/
+Description: This package enables basic Thematic-WPML compatibility.
+Theme: thematic
+Theme version: 0.9.5.1
+Author: WPML
+Author URI: http://www.onthegosystems.com
+Version: 1.0
+*/
+
+
+class Thematic_theme_compatibility  extends WPML_Package{
+    
+    function __construct(){
+        parent::__construct();
+        
+        $wpage = ICL_PLUGIN_FOLDER . '/menu/languages.php';
+		$title = 'Thematic - ';
+		
+			// Header switcher
+		
+        $this->add_option_checkbox(
+			$wpage,
+			__('Add a list of languages to the site\'s header','sitepress'),
+			'header_language_selector',
+			$title . __('Language selector options','sitepress'),
+			'checked'
+				);
+		
+        $this->add_option_checkbox(
+			$wpage,
+			__('Only include languages with translation in the languages list header', 'sitepress'),
+			'header_skip_languages',
+			$title . __('More options', 'sitepress'),
+			'checked'
+				);
+		
+		$this->add_option_checkbox(
+			$wpage,
+			__('Load CSS for header languages list', 'sitepress'),
+			'header_load_css',
+			$title . __('More options', 'sitepress'),
+			'checked'
+				);
+		
+		if($this->settings['header_language_selector']){
+            add_action('thematic_aboveheader',array(&$this,'language_selector_header'));
+			if($this->settings['header_load_css']) {
+				$this->load_css('css/selector-header.css');
+			}
+			$this->check_sidebar_language_selector_widget();
+        }
+		
+		add_filter('wp_page_menu',array(&$this,'filter_home_link'));
+		add_action('thematic_header',array(&$this,'remove_thematic_blogtitle'),0);
+		
+		$footer_text = get_option('thm_footertext',true);
+		if ($footer_text) {
+			icl_register_string( 'theme '.$this->name, 'Footer text', $footer_text );
+			add_filter('thematic_footertext',array(&$this,'translate_footer_text'));
+		}
+		
+		$this->load_css('css/compatibility-package.css');
+	}
+
+	function remove_thematic_blogtitle() {
+		add_action('thematic_header',array(&$this,'add_thematic_blogtitle'),3);
+		remove_action('thematic_header','thematic_blogtitle',3);
+	}
+
+	function add_thematic_blogtitle() {
+?>
+		<div id="blog-title"><span><a href="<?php echo icl_get_home_url(); ?>" title="<?php bloginfo('name') ?>" rel="home"><?php bloginfo('name') ?></a></span></div>
+		<?php 
+	}
+
+	function translate_footer_text($str) {
+		return icl_t('theme '.$this->name,'Footer text',$str);
+	}
+
+    // do call the destructor of the parent class
+    function __destruct(){
+        parent::__destruct();
+    }
+}
+
+$Thematic_theme_compatibility = new Thematic_theme_compatibility();
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/css/compatibility-package.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/css/compatibility-package.css
new file mode 100644
index 0000000..169f75d
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/css/compatibility-package.css
@@ -0,0 +1,8 @@
+
+	#wpml_credit_footer { width: 100%; margin: 10px 0; padding: 0; text-align: center; }
+	
+	#wpml_credit_footer a, #wpml_credit_footer a:link, #wpml_credit_footer a:visited { 
+		font-weight: bold !important; }
+		
+	#wpml_credit_footer a:hover { 
+		text-decoration: underline !important; }
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/css/selector-footer.css b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/css/selector-footer.css
new file mode 100644
index 0000000..a1e4e8b
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/css/selector-footer.css
@@ -0,0 +1,44 @@
+
+
+
+
+#icl_lang_selector_footer {
+  margin: 10px 0;
+  padding: 0;
+  text-align: center;
+  /*background: #fcfcfc;
+  border: 1px solid #e1e1e1;*/
+  border-left:0;
+  border-right:0;
+  color: #6E6E6E;
+  font: 11px Verdana, sans-serif;
+}
+
+#icl_lang_selector_footer ul {
+  list-style: none;
+  margin:0;
+  padding:0;
+}
+
+#icl_lang_selector_footer ul li img {
+  /*margin-right:5px;*/
+  position: relative;
+  top: 1px;
+  width: 18px;
+  height: 12px;
+}
+
+#icl_lang_selector_footer ul li {
+  display:inline;
+  margin:0 15px 0 0;
+  padding:0;
+}
+
+#icl_lang_selector_footer ul li a, #icl_lang_selector_footer ul li a:visited {
+  color: #B2B2B2;
+  text-decoration: none;
+}
+
+#icl_lang_selector_footer ul li a:hover, #icl_lang_selector_footer ul li a:active {
+  color: #6E6E6E;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/load.php b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/load.php
new file mode 100644
index 0000000..df395ca
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/compatibility-packages/themes/wp-default-theme/load.php
@@ -0,0 +1,50 @@
+<?php
+/*
+Package Name: Extra options for the Default theme (demo)
+Package URI: http://wpml.org/
+Description: This is a demo package that would illustrate how these packages should be buillt. It applies to the WP default theme.
+Theme: default
+Theme version: 1.6
+Author: WPML
+Author URI: http://www.onthegosystems.com
+Version: 1.0
+*/
+  
+  
+
+// Instructions: 
+// 1. create your class by inheriting WPML_Package (defined in /inc/compatibility-packages/wpml-package.class.php - check it out to see what methods it has)  
+// 2. instantiate the class
+// Done.
+
+// Some properties that are inherited are:
+// name  (the package identifier - in this case wp-default-theme) - very handy sometimes
+// data  (meta information that you can see at the top of this post - just in case ypu need it)
+// settings  (your package's settings as they are saved from the options it will register)
+// type (e.g. themes or plugins)  
+  
+class WP_Default_theme_compatibility  extends WPML_Package{
+    
+    // do call the constructor of the parent class
+    function __construct(){
+        parent::__construct();
+        
+        $wpage = ICL_PLUGIN_FOLDER . '/menu/languages.php';
+		$title = 'Default - ';
+		
+		$this->load_css('css/compatibility-package.css');
+    }
+    
+    // do call the destructor of the parent class
+    function __destruct(){
+        parent::__destruct();
+    }
+}
+
+
+// make it happen
+// instantiate the package class
+$WP_Default_theme_compatibility = new WP_Default_theme_compatibility();
+
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/docs/theme-integration/readme.txt b/wp-content/plugins/sitepress-multilingual-cms/docs/theme-integration/readme.txt
new file mode 100644
index 0000000..e69de29
diff --git a/wp-content/plugins/sitepress-multilingual-cms/docs/theme-integration/wpml-integration.php b/wp-content/plugins/sitepress-multilingual-cms/docs/theme-integration/wpml-integration.php
new file mode 100644
index 0000000..37b13e7
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/docs/theme-integration/wpml-integration.php
@@ -0,0 +1,166 @@
+<?php 
+
+// HOME URL
+// USAGE: replace references to the blog home url such as:
+// - get_option('home')
+// - bloginfo('home')
+// - bloginfo('url')
+// - get_bloginfo('url')
+// - etc...
+// with wpml_get_home_url()
+// * IMPORTANT: Most themes also add a trailing slash (/) to the URL. This function already includes it, so don't add the slash when using it.
+function wpml_get_home_url(){
+    if(function_exists('icl_get_home_url')){
+        return icl_get_home_url();
+    }else{
+        return rtrim(get_bloginfo('url') , '/') . '/';
+    }
+}
+
+
+
+// LANGUAGE SELECTOR
+// USAGE place this on the single.php, page.php, index.php etc... - inside the loop
+// function wpml_content_languages($args)
+// args: skip_missing, before, after
+// defaults: skip_missing = 1, before =  __('This post is also available in: '), after = ''
+function wpml_content_languages($args=''){
+    parse_str($args);
+    if(function_exists('icl_get_languages')){
+        $languages = icl_get_languages($args);
+        if(1 < count($languages)){
+            echo isset($before) ? $before : __('This post is also available in: ', 'sitepress');
+            foreach($languages as $l){
+                if(!$l['active']) $langs[] = '<a href="'.$l['url'].'">'.$l['translated_name'].'</a>';
+            }
+            echo join(', ', $langs);
+            echo isset($after) ? $after : '';
+        }    
+    }
+} 
+
+
+// LINKS TO SPECIFIC ELEMENTS
+// USAGE
+// args: $element_id, $element_type='post', $link_text='', $optional_parameters=array(), $anchor='', $echoit = true
+function wpml_link_to_element($element_id, $element_type='post', $link_text='', $optional_parameters=array(), $anchor='', $echoit = true){
+    if(!function_exists('icl_link_to_element')){    
+        switch($element_type){
+            case 'post':
+            case 'page':
+                $ret = '<a href="'.get_permalink($element_id).'">';
+                if($anchor){
+                    $ret .= $anchor;
+                }else{
+                    $ret .= get_the_title($element_id);
+                }
+                $ret .= '<a>'; 
+                break;
+            case 'tag':
+            case 'post_tag':
+                $tag = get_term_by('id', $element_id, 'tag', ARRAY_A);
+                $ret = '<a href="'.get_tag_link($element_id).'">' . $tag->name . '</a>';
+            case 'category':
+                $ret = '<a href="'.get_tag_link($element_id).'">' . get_the_category_by_ID($element_id) . '</a>';
+            default: $ret = '';           
+        }
+        if($echoit){
+            echo $ret;
+        }else{
+            return $ret;
+        }        
+    }else{
+        return icl_link_to_element($element_id, $element_type, $link_text, $optional_parameters, $anchor, $echoit);
+    }        
+}
+
+// Languages links to display in the footer
+//
+function wpml_languages_list($skip_missing=0, $div_id = "footer_language_list"){
+    if(function_exists('icl_get_languages')){
+        $languages = icl_get_languages('skip_missing='.intval($skip_missing));
+        if(!empty($languages)){
+            echo '<div id="'.$div_id.'"><ul>';
+            foreach($languages as $l){
+                echo '<li>';
+                if(!$l['active']) echo '<a href="'.$l['url'].'">';
+                echo '<img src="'.$l['country_flag_url'].'" alt="'.$l['language_code'].'" />';
+                if(!$l['active']) echo '</a>';
+                if(!$l['active']) echo '<a href="'.$l['url'].'">';
+                echo $l['native_name'];
+                if(!$l['active']) echo ' ('.$l['translated_name'].')';
+                if(!$l['active']) echo '</a>';
+                echo '</li>';
+            }
+            echo '</ul></div>';
+        }
+    }
+}
+
+function wpml_languages_selector(){
+    do_action('icl_language_selector');    
+}
+
+function wpml_t($context, $name, $original_value){
+    if(function_exists(icl_t)){
+        return icl_t($context, $name, $original_value);
+    }else{
+        return $original_value;
+    }
+}
+
+function wpml_register_string($context, $name, $value){
+    if(function_exists('icl_register_string') && trim($value)){
+        icl_register_string($context, $name, $value);
+    }    
+}
+
+function wpml_get_object_id($element_id, $element_type='post', $return_original_if_missing=false, $ulanguage_code=null){
+    if(function_exists('icl_object_id')){
+        return icl_object_id($element_id, $element_type, $return_original_if_missing, $ulanguage_code);
+    }else{
+        return $element_id;
+    }    
+}
+
+function wpml_default_link($anchor){
+    global $sitepress;
+    $qv = false;
+    
+    if(is_single()){
+        $qv = 'p=' . get_the_ID();
+    }elseif(is_page()){
+        $qv = 'page_id=' . get_the_ID();
+    }elseif(is_tag()){
+        $tag = &get_term(intval( get_query_var('tag_id') ), 'post_tag', OBJECT, 'display');        
+        $qv = 'tag=' . $tag->slug;
+    }elseif(is_category()){        
+        $qv = 'cat=' . get_query_var('cat');
+    }elseif(is_year()){        
+        $qv = 'year=' . get_query_var('year');
+    }elseif(is_month()){        
+        $qv = 'm=' . get_query_var('year') . sprintf('%02d', get_query_var('monthnum'));
+    }elseif(is_day()){        
+        $qv = 'm=' . get_query_var('year') . sprintf('%02d', get_query_var('monthnum')) . sprintf('%02d', get_query_var('day'));
+    }elseif(is_search()){        
+        $qv = 's=' . get_query_var('s');
+    }elseif(is_tax()){
+        $qv = get_query_var('taxonomy') . '=' . get_query_var('term');        
+    }
+    
+    if(false !== strpos(wpml_get_home_url(),'?')){
+        $url_glue = '&';
+    }else{
+        $url_glue = '?';
+    }
+    
+    if($qv){
+        $link = '<a href="' .  $sitepress->language_url($sitepress->get_default_language()) . $url_glue . $qv . '" rel="nofollow">' . $anchor . '</a>';
+    }else{
+        $link = '';
+    } 
+
+    return $link;
+}
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/affiliate-info.php b/wp-content/plugins/sitepress-multilingual-cms/inc/affiliate-info.php
new file mode 100644
index 0000000..0815fdd
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/affiliate-info.php
@@ -0,0 +1,13 @@
+<?php
+
+if( !defined('DEBUG_WPML_AFFILIATE') || !DEBUG_WPML_AFFILIATE) return; 
+  
+add_action('admin_menu', 'icl_affiliate_info_menu', 20); 
+
+function icl_affiliate_info_menu(){
+    add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Affiliate','sitepress'), __('Affiliates','sitepress'), 
+                    'manage_options', basename(ICL_PLUGIN_PATH).'/menu/affiliate-info.php'); 
+    
+}
+  
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/cache.php b/wp-content/plugins/sitepress-multilingual-cms/inc/cache.php
new file mode 100644
index 0000000..f835cac
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/cache.php
@@ -0,0 +1,81 @@
+<?php
+function icl_cache_get($key){
+    $icl_cache = get_option('_icl_cache');
+    if(isset($icl_cache[$key])){
+        return $icl_cache[$key];
+    }else{
+        return false;
+    }
+}  
+
+function icl_cache_set($key, $value=null){
+    $icl_cache = get_option('_icl_cache');
+    if(false === $icl_cache){
+        delete_option('_icl_cache');
+    }
+    if(!is_null($value)){
+        $icl_cache[$key] = $value;    
+    }else{
+        if(isset($icl_cache[$key])){
+            unset($icl_cache[$key]);
+        }        
+    }
+    update_option('_icl_cache', $icl_cache);
+}
+
+function icl_cache_clear($key){
+    delete_option('_icl_cache');
+}
+
+define('ICL_DISABLE_CACHE', false);
+
+class icl_cache{
+   
+    private $data;
+    
+    function __construct($name = "", $cache_to_option = false){
+        $this->data = array();
+        $this->name = $name;
+        $this->cache_to_option = $cache_to_option;
+        
+        if ($cache_to_option) {
+            $this->data = icl_cache_get($name.'_cache_class');
+            if ($this->data == false){
+                $this->data = array();
+            }
+        }
+    }
+    
+    function get($key) {
+        if(ICL_DISABLE_CACHE){
+            return null;
+        }
+        return $this->data[$key];
+    }
+    
+    function has_key($key){
+        if(ICL_DISABLE_CACHE){
+            return false;
+        }
+        return array_key_exists($key, (array)$this->data);
+    }
+    
+    function set($key, $value) {
+        if(ICL_DISABLE_CACHE){
+            return;
+        }
+        $this->data[$key] = $value;
+        if ($this->cache_to_option) {
+            icl_cache_set($this->name.'_cache_class', $this->data);
+        }
+    }
+    
+    function clear() {
+        $this->data = array();
+        if ($this->cache_to_option) {
+            icl_cache_clear($this->name.'_cache_class');
+        }
+    }
+}
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/comments-translation/functions.php b/wp-content/plugins/sitepress-multilingual-cms/inc/comments-translation/functions.php
new file mode 100644
index 0000000..cc0cf14
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/comments-translation/functions.php
@@ -0,0 +1,935 @@
+<?php
+define('MACHINE_TRANSLATE_API_URL',"http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=%s&langpair=%s|%s");
+
+require_once ICL_PLUGIN_PATH . '/inc/comments-translation/google_languages_map.inc';
+
+class IclCommentsTranslation{
+    
+    var $enable_comments_translation;
+    var $enable_replies_translation;
+    var $user_language;
+    var $is_visitor = false;
+    
+    function __construct(){
+        add_action('init', array($this, 'init'));
+    }
+    
+    function init(){
+        global $current_user, $sitepress_settings, $sitepress, $pagenow, $wpdb;
+        if($current_user->ID){
+            $this->enable_comments_translation = get_usermeta($current_user->data->ID,'icl_enable_comments_translation',true);
+            $this->enable_replies_translation = get_usermeta($current_user->data->ID,'icl_enable_replies_translation',true);
+            
+            $this->user_language = $sitepress->get_user_admin_language($current_user->data->ID);
+            if(!$this->user_language){
+                $this->user_language = $sitepress_settings['admin_default_language'];
+                if($this->user_language == '_default_') $this->user_language = $sitepress->get_default_language();
+            }            
+        }else{
+            $this->is_visitor = true;
+            $this->user_language = $sitepress->get_current_language();            
+        }
+        
+        if(defined('WP_ADMIN')){
+            add_action('show_user_profile', array($this, 'show_user_options'));
+            add_action('personal_options_update', array($this, 'save_user_options'));
+        }
+        
+        if(defined('WP_ADMIN') && $this->enable_comments_translation){
+            add_action('admin_print_scripts', array($this,'js_scripts_setup'));            
+        }
+        
+        add_action('manage_comments_nav', array($this,'use_comments_array_filter'));
+                                                                              
+        add_filter('comments_array', array($this,'comments_array_filter'));
+        
+        add_filter('comment_feed_join', array($this, 'comment_feed_join'));
+        add_filter('query', array($this, 'filter_queries'));
+        //add_filter('comment_feed_where', array($this, 'comment_feed_where'));
+        
+        add_action('delete_comment', array($this, 'delete_comment_actions'));
+        add_action('wp_set_comment_status', array($this, 'wp_set_comment_status_actions'), 1, 2);
+        if(isset($_POST['action']) && $_POST['action']=='editedcomment'){
+            add_action('transition_comment_status', array($this, 'transition_comment_status_actions'), 1, 3);
+        }
+                     
+                
+        if('comment.php' == $pagenow){
+            $row  = $wpdb->get_row("
+                SELECT c.user_id, t.language_code 
+                FROM {$wpdb->comments} c JOIN {$wpdb->prefix}icl_translations t ON c.comment_ID = t.element_id AND element_type='comment'
+                WHERE c.comment_ID=".intval($_GET['c'])
+            );
+            $comment_author = $row->user_id;
+            $comment_lang   = $row->language_code;
+            if($current_user->data->ID == $comment_author && $comment_lang == $this->user_language){
+                add_action('admin_head', array($this, 'admin_head_actions'));
+            }            
+        }        
+        add_action('edit_comment', array($this, 'edit_comment_actions'));
+        
+        add_action('comment_form', array($this, 'comment_form_options'));        
+        
+        add_action('comment_post', array($this, 'comment_post'));
+        
+        if(defined('WP_ADMIN') && $this->enable_comments_translation){
+            add_filter('comment_row_actions', array($this,'comment_row_actions'),1, 2);
+        }
+        
+        if(defined('WP_ADMIN')){
+            add_filter('comment_text', array($this, 'comment_text_filter_admin'));
+        }else{
+            add_filter('comment_text', array($this, 'comment_text_filter'));
+        }
+            
+        add_filter('xmlrpc_methods',array($this, 'add_custom_xmlrpc_methods'));
+        
+        add_filter('get_comments_number', array($this, 'get_comments_number_filter'));        
+        
+        global $wpml_add_message_translation_callbacks;
+        $wpml_add_message_translation_callbacks['comment'][] = array($this, 'add_comment_translation');
+        
+        
+        if(isset($_GET['retry_mtr'])){
+            global $wpdb;
+            $nonce = wp_create_nonce('machine-translation-failed'.$_GET['retry_mtr']);
+            if($_GET['nonce']==$nonce){
+                $wpdb->query("DELETE FROM {$wpdb->comments} WHERE comment_ID=" . intval($_GET['retry_mtr']));
+                $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE element_type='comment' AND element_id=" . intval($_GET['retry_mtr']));
+                if(defined('WP_ADMIN')){
+                    wp_redirect(rtrim(preg_replace('@retry_mtr=([0-9]+)&nonce=([0-9a-z]+)@','',$_SERVER['REQUEST_URI']),'?'));            
+                }else{
+                    add_action('template_redirect', array($this, '__reload_page'));
+                }
+            }                      
+        }
+                
+        require_once ICL_PLUGIN_PATH . '/inc/cache.php';        
+        $this->icl_comment_count_cache = new icl_cache();
+                
+    }
+    
+    function __reload_page(){
+        wp_redirect(get_permalink());
+    }
+    
+    function admin_head_actions(){
+        add_meta_box('comment', __('Translate', 'sitepress'), array($this, 'comment_form_options'), 'comment', 'normal', 'high', 1);    
+    }
+        
+    function js_scripts_setup(){        
+        global $pagenow, $sitepress;                
+        if($pagenow == 'index.php' || $pagenow == 'edit-comments.php' || $pagenow == 'post.php'): 
+            $user_lang_info = $sitepress->get_language_details($this->user_language);
+            ?>
+            <script type="text/javascript">        
+            var icl_comment_original_language = new Array();
+            <?php if($this->enable_replies_translation): ?>
+            function icl_comment_reply_options(){
+                for(i in icl_comment_original_language){
+                    oc = icl_comment_original_language[i];
+                    jQuery('#replycontainer').prepend('<input type="hidden" name="icl_comment_language_'+oc.c+'" value="'+oc.lang+'" />');
+                }
+                var content_ro = '<label id="icl_translate_from_lang" style="cursor:pointer">';       
+                content_ro += '<input type="hidden" name="icl_user_language" value="<?php echo $this->user_language ?>" />';
+                content_ro += '<input style="width:15px;" type="checkbox" name="icl_translate_reply" <?php if($this->enable_replies_translation):?>checked="checked"<?php endif;?> />';         
+                content_ro += '<?php echo sprintf(__('Translate from %s', 'sitepress'),$user_lang_info['display_name']); ?>';
+                content_ro += '</label><br clear="all" /><br />';
+                jQuery('#replysubmit').prepend(content_ro);
+                jQuery('input[name="icl_translate_reply"]').click(function(){  
+                    jQuery(this).val(jQuery(this).attr('checked')?1:0);
+                });
+                
+                jQuery('.vim-r').click(function(){                    
+                    var oc = jQuery(this).parent().parent().parent().parent().attr('id').split('-');
+                    if(jQuery('input[name="icl_comment_language_'+oc[1]+'"]').length){
+                        jQuery('input[name="icl_translate_reply"]').attr('checked','checked');
+                        jQuery('#icl_translate_from_lang').show();                                                
+                    }else{
+                        jQuery('input[name="icl_translate_reply"]').removeAttr('checked');
+                        jQuery('#icl_translate_from_lang').hide();
+                    }
+                });
+                
+                jQuery('.vim-q').click(function(){                    
+                    jQuery('#icl_translate_from_lang').hide();
+                })
+            }
+            addLoadEvent(icl_comment_reply_options);        
+            <?php endif; ?>
+            </script>
+        <?php endif; 
+    }
+    
+    function comment_row_actions($actions, $comment){
+        global $sitepress, $wpdb;
+        $ctrid = (int)$sitepress->get_element_trid($comment->comment_ID, 'comment');        
+        $original_comment_language = $wpdb->get_row("
+            SELECT t.language_code, lt.name 
+            FROM {$wpdb->prefix}icl_translations t
+            JOIN {$wpdb->prefix}icl_languages_translations lt ON t.language_code = lt.language_code
+            WHERE trid={$ctrid} AND element_type='comment' AND element_id<>{$comment->comment_ID} 
+                AND lt.display_language_code='".$sitepress->get_current_language()."'            
+        ");
+        if(empty($original_comment_language)){
+            return $actions;
+        }
+        ?>
+        <script type="text/javascript">
+            icl_comment_original_language.push({c:<?php echo $comment->comment_ID ?>,lang:'<?php echo $original_comment_language->language_code ?>',lang_name:'<?php echo $original_comment_language->name ?>'});            
+        </script>
+        <div style="float:right;margin-top:4px;"><small>
+            <?php if($this->user_language == $original_comment_language->language_code): ?>            
+            <a href="#c<?php echo $comment->comment_ID ?>" class="icl_original_comment_link"><?php _e('Back to translated version', 'sitepress') ?></a></small>
+            <?php else: ?>
+            <a href="#c<?php echo $comment->comment_ID ?>" class="icl_original_comment_link"><?php printf(__('Original language: %s', 'sitepress'),$original_comment_language->name) ?></a></small>
+            <?php endif; ?>
+        </div>
+        <?php
+        return $actions;
+    }
+    
+    function show_user_options(){        
+        global $sitepress;
+        ?>
+        <table class="form-table">
+            <tbody>
+                <tr>
+                    <th><?php _e('Comments Translation:', 'sitepress') ?></th>
+                    <td>
+                        <p><label><input type="checkbox" name="icl_enable_comments_translation" id="icl_enable_comments_translation" value="1" 
+                        <?php if($this->enable_comments_translation): ?> checked="checked" <?php endif?> /> 
+                        <?php _e('Show translated comments.', 'sitepress') ?></label></p>                         
+                        <span class="description"><?php _e("This enables you to see the comments translated in the language that the post was originally written in. The translation is automatic (made by a machine) so it might not be 100% accurate. It's also free.", 'sitepress')?></span>
+                        <br />
+                        <p><label><input type="checkbox" name="icl_enable_replies_translation" id="icl_enable_replies_translation" value="1" 
+                        <?php if($this->enable_replies_translation && $sitepress->get_icl_translation_enabled() && $sitepress->icl_account_configured()): ?> checked="checked" <?php endif?> <?php if(!$sitepress->get_icl_translation_enabled() || !$sitepress->icl_account_configured()) echo 'disabled="disabled"' ?> /> 
+                        <?php _e('Translate my replies.', 'sitepress') ?></label>
+                        <?php if(!$sitepress->get_icl_translation_enabled() || !$sitepress->icl_account_configured()): ?>
+                        <?php printf(__('To translate your replies, you need to enable <a href="%s">professional translation</a>.','sitepress'),'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/content-translation.php')?>
+                        <?php endif; ?>                        
+                        </p>            
+                        <span class="description"><?php _e("When this is checked you can write comments in the post's original language. They will not be published immediately but sent to the ICanLocalize translation server and translated. Once translated they are published automatically on your blog.", 'sitepress')?></span>             
+                    </td>
+                </tr>
+            </tbody>
+        </table>        
+        <?php
+    }  
+    
+    function save_user_options(){
+        $user_id = $_POST['user_id'];
+        if($user_id){
+            update_usermeta($user_id,'icl_enable_comments_translation',$_POST['icl_enable_comments_translation']);        
+            update_usermeta($user_id,'icl_enable_replies_translation',$_POST['icl_enable_replies_translation']);        
+        }
+    } 
+    
+    public function machine_translate($from_language, $to_language, $text){
+        global $ican_google_translation_request_fail_flag;
+        if($ican_google_translation_request_fail_flag) return '';
+        
+        $url = sprintf(MACHINE_TRANSLATE_API_URL, urlencode($text), $from_language, $to_language);                
+        $url = str_replace('|','%7C',$url);
+
+        $client = new WP_Http();
+        
+        $response = $client->request($url);
+        if(!is_wp_error($response) && ($response['response']['code']=='200')){
+            $translation = json_decode($response['body']);        
+            $translation = $translation->responseData->translatedText;
+        }else{
+            $ican_google_translation_request_fail_flag = 1;
+            $translation ='';
+        }
+        
+        return $translation;
+    }  
+    
+    function delete_comment_actions($comment_id){
+        global $sitepress;
+        $trid = $sitepress->get_element_trid($comment_id, 'comment');
+        if($trid){
+            $translations = $sitepress->get_element_translations($trid, 'comment');
+            $sitepress->delete_element_translation($trid, 'comment');
+            foreach($translations as $t){
+                if(isset($t->element_id) && $t->element_id != $comment_id){
+                    wp_delete_comment($t->element_id);
+                }
+            }            
+        }
+    }    
+    
+    function wp_set_comment_status_actions($comment_id, $status){
+        global $sitepress;        
+        static $ids_processed = array(); // using this for avoiding the infinite loop
+        $trid = $sitepress->get_element_trid($comment_id, 'comment');
+        if($trid){            
+            $translations = $sitepress->get_element_translations($trid, 'comment');
+            foreach($translations as $t){
+                if(isset($t->element_id) && $t->element_id != $comment_id && !in_array($t->element_id,$ids_processed)){
+                    wp_set_comment_status($t->element_id, $status);
+                    $ids_processed[] = $t->element_id;
+                }
+            }
+        }        
+    }
+    
+    function edit_comment_actions($comment_id){
+        // we'll use this hook ONLY for updating comments - not for new comments
+        if($_POST['icl_translate_reply']){
+            global $wpdb;
+            $res = $wpdb->get_row("
+                SELECT MD5(c.comment_content)<> ms.md5 AND ms.md5 IS NOT NULL AS updated, ms.to_language
+                FROM {$wpdb->comments} c 
+                    JOIN {$wpdb->prefix}icl_message_status ms ON c.comment_ID
+                    WHERE c.comment_ID = {$comment_id} AND ms.object_type='comment'
+                ");
+            if(isset($res->updated) && $res->updated){
+                $this->send_comment_to_translation($comment_id, $res->to_language);
+            }        
+        }
+    }
+    
+    function transition_comment_status_actions($new_status, $old_status, $comment){
+        global $sitepress, $wpdb;
+        $comment_id = $comment->comment_ID;    
+        static $ids_processed_tr = array(); // using this for avoiding the infinite loop
+        $trid = $sitepress->get_element_trid($comment_id, 'comment');
+        if($trid){            
+            $translations = $sitepress->get_element_translations($trid, 'comment');
+            foreach($translations as $t){
+                if(isset($t->element_id) && $t->element_id != $comment_id && !in_array($t->element_id,$ids_processed_tr)){
+                    //wp_set_comment_status($t->element_id, $comment->comment_approved);
+                    $wpdb->update($wpdb->comments, array('comment_approved'=>$comment->comment_approved), array('comment_id'=>$t->element_id));
+                    $ids_processed_tr[] = $t->element_id;
+                }
+            }
+        }                
+    }
+    
+    function comment_form_options(){
+        global $wpdb, $post, $userdata, $sitepress; 
+        $user_lang_info = $sitepress->get_language_details($this->user_language);
+        
+        if(empty($post)){ //edit comment
+            global $comment;
+            $ctrid = $sitepress->get_element_trid($comment->comment_ID, 'comment');
+            // original comment language
+            $comment_language = $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE trid={$ctrid} AND element_type='comment' AND source_language_code IS NULL");
+            $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$comment->comment_post_ID}'");
+            $cur_lang = $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE  element_id={$comment->comment_post_ID} AND element_type='post_{$post_type}'");
+        }else{ // add new comment on front end
+            $cur_lang = $sitepress->get_current_language();
+            $comment_language = $sitepress->get_current_language();
+        }               
+        
+        $page_lang_info = $wpdb->get_var("
+            SELECT name 
+            FROM {$wpdb->prefix}icl_languages_translations 
+            WHERE language_code='".$cur_lang."' AND display_language_code='".$this->user_language."'            
+        ");
+        
+        if($sitepress->have_icl_translator($this->user_language, $cur_lang)){
+            $disabled = '';
+        }else{            
+            $disabled = ' disabled="disabled"';
+        }        
+        ?>
+        
+        <input type="hidden" name="icl_comment_language" value="<?php echo $comment_language ?>" />
+        
+        <?php if($this->enable_replies_translation && $userdata->user_level > 7 && $user_lang_info['code'] != $cur_lang): ?>
+        <label style="cursor:pointer">       
+        <input type="hidden" name="icl_user_language" value="<?php echo $this->user_language ?>" />
+        <input style="width:15px;" type="checkbox" name="icl_translate_reply" checked="checked"<?php echo $disabled ?> />         
+        <span><?php echo sprintf(__('Translate from %s into %s', 'sitepress'),$user_lang_info['display_name'], $page_lang_info); ?>
+        <?php if($disabled): ?>
+        <br /><small><?php printf(__('There is no translator for this language pair. <a href="%s">Details</a>.', 'sitepress'), get_option('siteurl') . '/wp-admin/admin.php?page=' . basename(ICL_PLUGIN_PATH) . '/menu/content-translation.php'); ?></small>
+        <?php endif; ?>
+        </span>
+        </label>
+        <?php endif; ?>  
+        <?php 
+    }    
+        
+    function comments_array_filter($comments){
+        if(defined('__comments_array_filter_runonce')){
+            return $comments;                
+        }
+        global $wpdb, $sitepress, $google_languages_map;
+            
+        define('__comments_array_filter_runonce', true);
+                    
+        if(empty($comments)){
+            return $comments;
+        }                
+        
+        foreach($comments as $c){
+            $cids[] = $c->comment_ID;
+        }  
+        
+        if($this->is_visitor){
+            // get comments in visitor's language
+            if(!empty($cids)){
+                $comment_ids = $wpdb->get_col("
+                    SELECT element_id
+                    FROM {$wpdb->prefix}icl_translations
+                    WHERE element_type='comment' AND element_id IN(".join(',', $cids).")                    
+                    AND language_code = '{$this->user_language}'
+                "); 
+                foreach($comments as $k=>$c){
+                    if(!in_array($c->comment_ID , (array)$comment_ids)){
+                        unset($comments[$k]);
+                    }
+                } 
+            }
+        }elseif(!$this->enable_comments_translation){            
+            // show only original comments regardless of the user language
+            if(!empty($cids)){
+                $comment_ids = $wpdb->get_col("
+                    SELECT element_id
+                    FROM {$wpdb->prefix}icl_translations
+                    WHERE element_type='comment' AND element_id IN(".join(',', $cids).")                    
+                    AND source_language_code IS NULL
+                ");                
+            }
+            foreach($comments as $k=>$c){
+                if(!in_array($c->comment_ID , (array)$comment_ids)){
+                    unset($comments[$k]);
+                }
+            } 
+            
+            
+            
+            //filter for this language
+            /*
+            if(!empty($cids)){
+                $comment_ids = $wpdb->get_col("
+                    SELECT element_id
+                    FROM {$wpdb->prefix}icl_translations
+                    WHERE element_type='comment' AND element_id IN(".join(',', $cids).")                    
+                    AND language_code='{$this->user_language}'
+                ");
+            }
+            
+            if($comments){
+                $_trids = $wpdb->get_col("SELECT DISTINCT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='comment' AND element_id IN(".join(",",$cids).")");
+                $_ttrids = $wpdb->get_col("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='comment' AND trid IN(".join(",",$_trids).") AND language_code='{$this->user_language}'");
+                $_utrids = array_diff($_trids, $_ttrids);
+                if(!empty($_utrids)){
+                    $_untranslated_elids = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='comment' AND trid IN(".join(",",$_utrids).") AND source_language_code IS NULL"); 
+                }                    
+            }                                                                                                       
+            foreach($comments as $k=>$c){
+                if(!in_array($c->comment_ID , (array)$comment_ids) && !in_array($c->comment_ID, (array)$_untranslated_elids)){
+                    unset($comments[$k]);
+                }
+            } 
+            */
+             
+        }else{
+            foreach($comments as $c){
+                $comment_ids[] = $c->comment_ID;
+                $comments_by_id[$c->comment_ID] = $c;
+            }
+            
+            $trids = $wpdb->get_col("
+                SELECT DISTINCT trid
+                FROM {$wpdb->prefix}icl_translations
+                WHERE element_type='comment' AND element_id IN (".join(',',$comment_ids).")
+            ");
+            
+            // filter comments in the user's language
+            $translated_comments_trids = array(0);
+            if(!empty($trids)){
+                $res = $wpdb->get_results("
+                    SELECT element_id, trid 
+                    FROM {$wpdb->prefix}icl_translations
+                    WHERE element_type='comment' AND trid IN (".join(',',$trids).") AND language_code = '{$this->user_language}'
+                ");   
+                foreach($res as $row){
+                    $comments_in_the_users_language[] = $row->element_id;
+                    $translated_comments_trids[] = $row->trid;
+                }
+            }            
+            $comments_not_translated_trids = array_diff($trids, $translated_comments_trids);
+            
+            if($comments_not_translated_trids){
+                $comments_not_translated = $wpdb->get_col("
+                    SELECT element_id 
+                    FROM {$wpdb->prefix}icl_translations
+                    WHERE element_type='comment' AND trid IN (".join(',',$comments_not_translated_trids).") AND language_code <> '{$this->user_language}'
+                ");
+            }
+            if($comments_not_translated){            
+                $res = $wpdb->get_results("
+                    SELECT element_id, trid, language_code
+                    FROM {$wpdb->prefix}icl_translations
+                    WHERE element_type='comment' AND element_id IN (".join(',',$comments_not_translated).")
+                ");
+            
+                
+                $wp_comments_cols = array_keys($wpdb->get_row("SELECT * FROM {$wpdb->comments} LIMIT 1", ARRAY_A));
+                
+                foreach($res as $original_comment){
+                    $comment_content = $comments_by_id[$original_comment->element_id]->comment_content;                                            
+                    $machine_translation = $this->machine_translate($original_comment->language_code, $this->user_language, $comment_content);                                        
+                    $comment_new = clone $comments_by_id[$original_comment->element_id];                    
+                    $comment_new->comment_content = $machine_translation;
+                    
+                    unset($comment_new->comment_ID);
+                    $wpdb->insert($wpdb->comments, array_intersect_key((array)$comment_new, array_flip($wp_comments_cols)));
+                    $new_comment_id = $wpdb->insert_id;
+                    $sitepress->set_element_language_details($new_comment_id, 'comment', $original_comment->trid, $this->user_language);        
+                    $comment_new->comment_ID = $new_comment_id;
+                    if($original_comment_parent = $comments_by_id[$original_comment->element_id]->comment_parent){                        
+                        // check for the comment parent in the user language
+                        $cptrid = $sitepress->get_element_trid($original_comment_parent, 'comment');
+                        $comment_new->comment_parent = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$cptrid} AND element_type='comment' AND language_code='{$this->user_language}'");
+                        $wpdb->update($wpdb->comments, array('comment_parent'=>$comment_new->comment_parent), array('comment_ID'=>$new_comment_id));
+                    }          
+                    
+                    if(!$machine_translation){
+                        $nonce = wp_create_nonce('machine-translation-failed'.$new_comment_id);
+                        $comment_new->comment_content = '<i>' . sprintf(__('Machine translation failed. <a%s>retry</a>','sitepress'), ' onclick="icl_retry_mtr(this)" id="icl_retry_mtr_'.$comment_new->comment_ID.'_'.$nonce.'" href="#"') . '</i>';
+                        $wpdb->update($wpdb->comments, array('comment_content'=>$comment_new->comment_content), array('comment_ID'=>$new_comment_id));
+                    } 
+                                                                          
+                    $comments_in_the_users_language[] = $new_comment_id;
+                    $comments[] = $comment_new;
+                }
+                
+            }
+            
+            //filter out comments in other languages than the user's
+            foreach((array)$comments as $k=>$c){
+                if(!in_array($c->comment_ID , (array)$comments_in_the_users_language)){
+                    unset($comments[$k]);
+                }
+            }
+            
+        }
+        return array_values($comments);
+    }
+    
+    function use_comments_array_filter(){
+        global $comments;
+        $comments = $this->comments_array_filter($comments);
+    }
+    
+    function comment_feed_join($join){                
+        global $wpdb, $sitepress;
+        $lang = $this->enable_comments_translation ? $this->user_language : $sitepress->get_current_language();
+        $join .= " JOIN {$wpdb->prefix}icl_translations tc ON {$wpdb->comments}.comment_ID = tc.element_id AND tc.element_type='comment' AND tc.language_code='{$lang}'";
+        return $join;
+    }
+    
+    function filter_queries($sql){
+        global $pagenow, $wpdb;
+        static $_untranslated_elids;
+        if($pagenow == 'index.php'){
+            if(preg_match('#SELECT \* FROM (.+)comments ORDER BY comment_date_gmt DESC LIMIT ([0-9]+), ([0-9]+)#i',$sql,$matches)){
+                $res = mysql_query($sql);                
+                while($row = mysql_fetch_object($res)){
+                    $comments[] = $row;
+                }      
+                
+                if(!$this->enable_comments_translation && $comments){
+                    // show only original comments regardless of the user language
+                    
+                    foreach($comments as $c){
+                        $cids[] = $c->comment_ID;
+                    }        
+                    $comment_ids = array(0);
+                    if(!empty($cids)){
+                        $comment_ids = $wpdb->get_col("
+                            SELECT element_id
+                            FROM {$wpdb->prefix}icl_translations
+                            WHERE element_type='comment' AND element_id IN(".join(',', $cids).")                    
+                            AND source_language_code IS NULL
+                        ");
+                        if(!empty($comment_ids)){
+                            $sql = "SELECT * FROM {$matches[1]}comments c 
+                                    WHERE c.comment_ID IN (".join(',',$comment_ids).")
+                                    ORDER BY c.comment_date_gmt DESC LIMIT {$matches[2]}, {$matches[3]}";
+                        }
+                    }
+                }else{
+                    $this->comments_array_filter($comments);
+                    unset($comments);                                    
+                    $sql = "
+                        SELECT * FROM {$matches[1]}comments c 
+                        LEFT JOIN {$matches[1]}icl_translations t ON t.element_id=c.comment_ID 
+                        WHERE 
+                            (t.element_type='comment' AND t.language_code='{$this->user_language}') 
+                        ORDER BY c.comment_date_gmt DESC LIMIT {$matches[2]}, {$matches[3]}";
+                }
+                
+            }
+        }elseif( isset($_POST['action']) && $_POST['action']=='get-comments' && isset($_POST['mode']) && $_POST['mode']=='single'){
+            global $sitepress;
+            if(preg_match('#SELECT \* FROM (.+)comments USE INDEX \(comment_date_gmt\) WHERE \( comment_approved = \'0\' OR comment_approved = \'1\' \)  AND comment_post_ID = \'([0-9]+)\'  ORDER BY comment_date_gmt ASC LIMIT ([0-9]+), ([0-9]+)#i',$sql,$matches)){
+                $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$_POST['post_ID']}'");
+                $res = mysql_query("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE element_id={$_POST['post_ID']} AND element_type='post_{$post_type}'");
+                $row = mysql_fetch_row($res);                                    
+                $c_language = $row[0];
+                
+                if($this->enable_comments_translation){
+                    $res = $wpdb->get_results("
+                        SELECT element_id, trid FROM {$wpdb->prefix}icl_translations t
+                        JOIN {$wpdb->comments} c ON t.element_id = c.comment_ID AND comment_POST_ID = {$_POST['post_ID']}
+                        WHERE t.element_type='comment' AND language_code='{$c_language}'");
+                    foreach($res as $r){
+                        $trids_orig[$r->trid] = $r->element_id;
+                    }
+                    $res = $wpdb->get_results("
+                        SELECT element_id, trid FROM {$wpdb->prefix}icl_translations t
+                        JOIN {$wpdb->comments} c ON t.element_id = c.comment_ID AND comment_POST_ID = {$_POST['post_ID']}
+                        WHERE t.element_type='comment' AND language_code='{$this->user_language}'");                    
+                    foreach($res as $r){
+                        $trids_tr[$r->trid] = $r->element_id;
+                    }   
+                    
+                    $wp_comments_cols = array_keys($wpdb->get_row("SELECT * FROM {$wpdb->comments} LIMIT 1", ARRAY_A));                 
+                    foreach($trids_orig as $o_trid=>$o_cid){
+                        if(!isset($trids_tr[$o_trid])){
+                            $original_comment = get_comment($trids_orig[$o_trid]);
+                            $machine_translation = $this->machine_translate($c_language, $this->user_language, $original_comment->comment_content);
+                            $comment_new = clone $original_comment;
+                            $comment_new->comment_content = $machine_translation;
+                            unset($comment_new->comment_ID);
+                            $wpdb->insert($wpdb->comments, array_intersect_key((array)$comment_new, array_flip($wp_comments_cols)));
+                            $new_comment_id = $wpdb->insert_id;
+                            $sitepress->set_element_language_details($new_comment_id, 'comment', $o_trid, $this->user_language);        
+                            
+                            if($original_comment->comment_parent){
+                                $cptrid = $sitepress->get_element_trid($original_comment->comment_parent, 'comment');    
+                                $comment_new->comment_parent = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$cptrid} AND element_type='comment' AND language_code='{$this->user_language}'");
+                                $wpdb->update($wpdb->comments, array('comment_parent'=>$comment_new->comment_parent), array('comment_ID'=>$new_comment_id));
+                            }
+                            
+                            if(!$machine_translation){
+                                $nonce = wp_create_nonce('machine-translation-failed'.$new_comment_id);
+                                $comment_new->comment_content = '<i>' . sprintf(__('Machine translation failed. <a%s>retry</a>','sitepress'), ' onclick="icl_retry_mtr(this)" id="icl_retry_mtr_'.$comment_new->comment_ID.'_'.$nonce.'" href="#"') . '</i>';
+                                $wpdb->update($wpdb->comments, array('comment_content'=>$comment_new->comment_content), array('comment_ID'=>$new_comment_id));
+                            } 
+                            
+                        }
+                    }
+                    
+                    $c_language =  $this->user_language;                    
+                } 
+                                           
+                $sql = "
+                SELECT * 
+                FROM {$matches[1]}comments c USE INDEX (comment_date_gmt) 
+                    JOIN {$matches[1]}icl_translations t ON t.element_id=c.comment_ID 
+                WHERE 
+                    t.element_type='comment' AND t.language_code='{$c_language}' AND
+                    ( comment_approved = '0' OR comment_approved = '1' ) AND 
+                    comment_post_ID = '{$matches[2]}' 
+                ORDER BY comment_date_gmt ASC 
+                LIMIT {$matches[3]}, {$matches[4]}";
+            }
+        }
+        return $sql;
+    }
+    
+    /*
+    function comment_feed_where($where){
+        return $where;
+    }
+    */
+    
+    function comment_post($comment_id){
+        global $sitepress, $wpdb;
+        /*
+        if(isset($_POST['icl_comment_language_'.$_POST['comment_ID']])){
+            $_POST['icl_comment_language'] = $_POST['icl_comment_language_'.$_POST['comment_ID']];
+        }
+        */
+        $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$_POST['comment_post_ID']}'");
+        if(isset($_POST['icl_user_language'])){
+            
+            if($_POST['icl_translate_reply']){
+                $lang = $_POST['icl_user_language'];
+                // send the comment to translation                
+                $this->send_comment_to_translation($comment_id,$wpdb->get_var("
+                    SELECT language_code FROM {$wpdb->prefix}icl_translations 
+                    WHERE element_type='post_{$post_type}' AND element_id={$_POST['comment_post_ID']}"));
+            }else{
+                //$lang = $_POST['icl_comment_language'];
+                $lang = $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$post_type}' AND element_id={$_POST['comment_post_ID']}");
+                
+                // sync comment parent
+                // look for comment parent in original language and set for the comment that's been added
+                if(isset($_POST['comment_parent'])){
+                    $comment_parent = $_POST['comment_parent'];
+                }else{
+                    $comment_parent = $_POST['comment_ID'];
+                }
+                
+                if($comment_parent){
+                    $ctrid = (int)$sitepress->get_element_trid($comment_parent,'comment');
+                    $original_comment_parent = $wpdb->get_var("
+                        SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$ctrid} 
+                            AND element_type='comment' AND language_code='{$lang}'");
+                    $wpdb->update($wpdb->comments, array('comment_parent'=>$original_comment_parent), array('comment_ID'=>$comment_id));
+                }
+            }
+        }else{
+            $_POST['comment_post_ID'] = intval($_POST['comment_post_ID']);
+            $lang = $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$post_type}' AND element_id={$_POST['comment_post_ID']}");
+            if(!$lang){
+                $lang = $this->user_language; // just in case
+            }
+        }        
+        if(!$lang){
+            $lang = $this->user_language;
+        }
+        $trid = $sitepress->set_element_language_details($comment_id, 'comment', null, $lang);        
+    }
+    
+    function send_comment_to_translation($comment_id, $to_language){
+        global $wpdb, $sitepress_settings, $sitepress;
+        
+        $iclq = new ICanLocalizeQuery($sitepress_settings['site_id'], $sitepress_settings['access_key']);
+        
+        $from_lang = $sitepress->get_language_details($this->user_language);
+        $to_lang   = $sitepress->get_language_details($to_language);
+        $from_lang_server = apply_filters('icl_server_languages_map', $from_lang['english_name']);
+        $to_lang_server = apply_filters('icl_server_languages_map', $to_lang['english_name']);
+        $body = $wpdb->get_var("SELECT comment_content FROM {$wpdb->comments} WHERE comment_ID={$comment_id}");
+        $rid = $iclq->cms_create_message($body, $from_lang_server, $to_lang_server);
+        if($rid > 0){
+            // does this comment already exist in the messages status queue?
+            $msid = $wpdb->get_var("SELECT id FROM {$wpdb->prefix}icl_message_status WHERE object_type='comment' AND object_id={$comment_id}");
+            if($msid){
+                $wpdb->update($wpdb->prefix.'icl_message_status', 
+                    array('rid'=>$rid, 'md5' => md5($body), 'status' => MESSAGE_TRANSLATION_IN_PROGRESS),
+                    array('id' => $msid)
+                    );
+            }else{
+                $wpdb->insert($wpdb->prefix.'icl_message_status', array(
+                    'rid'           => $rid,
+                    'object_id'     => $comment_id,
+                    'from_language' => $this->user_language,
+                    'to_language'   => $to_language,
+                    'md5'           => md5($body),
+                    'object_type'   => 'comment',
+                    'status'        => MESSAGE_TRANSLATION_IN_PROGRESS
+                ));
+            }
+        }
+    }
+    
+    function add_comment_translation($object_id, $to_language, $translation){
+        global $wpdb, $sitepress, $sitepress_settings;
+    
+        $original_comment = $wpdb->get_row("
+            SELECT * 
+            FROM {$wpdb->comments} WHERE comment_ID = {$object_id}
+            ", ARRAY_A);
+        $new_comment = $original_comment;
+        
+        //sync comment parent
+        if($original_comment['comment_parent']){
+            $ctrid = (int)$sitepress->get_element_trid($original_comment['comment_parent'],'comment');
+            $new_comment['comment_parent'] =  (int) $wpdb->get_var("
+                SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$ctrid} 
+                    AND element_type='comment' AND language_code='{$to_language}'");
+        }        
+        
+        $original_comment_id = $original_comment['comment_ID'];
+        unset($original_comment);
+        $new_comment['comment_content'] = $translation;
+        unset($new_comment['comment_ID']);
+        
+        //remove_action('wp_insert_comment', array($this, 'wp_insert_comment'));
+        
+        //check whether a translation for this comment in this language already exists
+        $trid = $sitepress->get_element_trid($original_comment_id, 'comment');        
+        
+        $existing_comment_id = $wpdb->get_var("
+            SELECT element_id FROM {$wpdb->prefix}icl_translations 
+            WHERE trid={$trid} AND element_type='comment' AND language_code='{$to_language}'");
+        
+        if(!$existing_comment_id){
+            $new_id = wp_insert_comment($new_comment);
+        }else{
+            $new_id = $new_comment['comment_ID'] = $existing_comment_id;
+            remove_action('transition_comment_status', array($this, 'transition_comment_status_actions'));
+            wp_update_comment($new_comment);
+        }
+        
+        $sitepress->set_element_language_details($new_id, 'comment', $trid, $to_language);
+                                
+        return 1; //success
+    }
+    
+    function add_custom_xmlrpc_methods($methods){
+        //$methods['icanlocalize.notify_comment_translation'] = array($this, 'add_comment_translation');
+        return $methods;
+    }
+    
+    function comment_text_filter($comment_text){
+        global $sitepress, $comment, $wp_query, $wpdb;
+        static $comment_ids, $comment_originals, $page_language, $translation_status;
+                                                                                           
+        //if($this->enable_comments_translation && $this->user_language != $sitepress->get_current_language() ){        
+        if($this->enable_comments_translation){
+            // run this block once
+            if(empty($comment_ids)){
+                
+                $page_language = $wpdb->get_var("
+                    SELECT name 
+                    FROM {$wpdb->prefix}icl_languages_translations 
+                    WHERE language_code='".$sitepress->get_current_language()."' AND display_language_code='".$this->user_language."'            
+                ");        
+                
+                foreach($wp_query->comments as $c){
+                    $comment_ids[] = (int)$c->comment_ID;
+                }                
+                $res = $wpdb->get_results("
+                    SELECT t.element_id, t.trid, ms.status 
+                    FROM {$wpdb->prefix}icl_translations t 
+                    LEFT JOIN {$wpdb->prefix}icl_message_status ms ON t.element_id=ms.object_id 
+                    WHERE t.element_id IN(".join(',',$comment_ids).") AND t.element_type='comment' AND t.language_code <> '".$sitepress->get_current_language()."' AND (ms.object_type='comment' OR ms.object_type IS NULL)");
+                foreach($res as $row){
+                    $tridsmap[$row->trid] = $row->element_id;
+                    if($row->status){
+                        $translation_status[$row->element_id] = $row->status;
+                    }
+                    
+                }
+                if(!empty($tridsmap)){            
+                    $res = $wpdb->get_results("
+                        SELECT t.trid, c.comment_content
+                        FROM {$wpdb->prefix}icl_translations t 
+                            JOIN  {$wpdb->comments} c ON t.element_id = c.comment_ID
+                        WHERE t.trid IN(".join(',',array_keys($tridsmap)).") AND t.element_type='comment' AND t.language_code='".$sitepress->get_current_language()."'");
+                    foreach($res as $row){
+                        $comment_originals[$tridsmap[$row->trid]] = $row->comment_content;
+                    }
+                }
+            }
+            
+            $str  = '';
+            if(isset($comment_originals[$comment->comment_ID])){                
+                $str  .= '<div style="font-weight:normal;display:none;border:1px dotted #aaa;background-color:#f0f0f0;padding:4px;margin-bottom:0;" id="icl_olc_'.$comment->comment_ID.'">' . htmlspecialchars($comment_originals[$comment->comment_ID]) . '</div>';
+            }
+            
+            if($translation_status[$comment->comment_ID] || isset($comment_originals[$comment->comment_ID])){
+                $str  .= '<p style="margin-top:1px;">';
+            }
+            if(isset($translation_status[$comment->comment_ID])){
+                if($translation_status[$comment->comment_ID] == MESSAGE_TRANSLATION_IN_PROGRESS){
+                    $str .= '<i>' . __('Translation in progress', 'sitepress' ) . '</i> ';
+                }elseif($translation_status[$comment->comment_ID] == MESSAGE_TRANSLATION_COMPLETE){
+                    $str .= '<i>' . __('Translation complete', 'sitepress' ) . '</i> ';
+                }
+            }
+            if(isset($comment_originals[$comment->comment_ID])){
+                $str  .= '<i><a href="#" onclick="var iclcst = document.getElementById(\'icl_olc_'.$comment->comment_ID.'\').style; iclcst.display = iclcst.display == \'block\' ? \'none\' :\'block\' ;return false;">'. sprintf(__('Comment in %s', 'sitepress'),$page_language).'</a></i>';
+                
+            }    
+            if($translation_status[$comment->comment_ID] || isset($comment_originals[$comment->comment_ID])){
+                $str  .= '</p>';
+            }
+            
+            if($str){
+                $comment_text .= $str;
+            }
+        }
+        return $comment_text;
+    }
+    
+    function comment_text_filter_admin($comment_text){
+        global $comment, $comments, $wpdb;
+        static $comment_ids, $translation_status;
+        if(empty($comment_ids) && !empty($comments)){
+            
+            foreach($comments as $c){
+                $comment_ids[] = $c->comment_ID;
+            }
+            
+            $res = $wpdb->get_results("
+                SELECT t.element_id, ms.status 
+                FROM {$wpdb->prefix}icl_translations t 
+                LEFT JOIN {$wpdb->prefix}icl_message_status ms ON t.element_id=ms.object_id 
+                WHERE t.element_id IN(".join(',',$comment_ids).") AND t.element_type='comment' AND (ms.object_type='comment' OR ms.object_type IS NULL)");
+            foreach($res as $row){
+                $translation_status[$row->element_id] = $row->status ? $row->status : CMS_REQUEST_WAITING_FOR_PROJECT_CREATION;
+            }                
+        }
+        
+        if(isset($translation_status[$comment->comment_ID])){
+            if($translation_status[$comment->comment_ID] == MESSAGE_TRANSLATION_IN_PROGRESS){
+                $str = '<p><i>' . __('Translation in progress', 'sitepress' ) . '</i></p>';
+            }elseif($translation_status[$comment->comment_ID] == MESSAGE_TRANSLATION_COMPLETE){
+                $str = '<p><i>' . __('Translation complete', 'sitepress' ) . '</i></p>';
+            }
+            $comment_text .= $str;
+        }
+        
+        return $comment_text;
+    }
+    
+    function get_comments_number_filter($count){
+        global $wpdb, $post, $sitepress;
+        static $pre_load_done = false;
+        $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$post->ID}'");
+        $details = $sitepress->get_element_language_details($post->ID, 'post_' . $post_type);
+        $post_lang = $details->language_code;
+        
+        if (!$pre_load_done && !ICL_DISABLE_CACHE) {
+            // search previous queries for a group of posts
+            foreach ($sitepress->queries as $query){
+                $pos = strstr($query, 'post_id IN (');
+                if ($pos !== FALSE) {
+                    $group = substr($pos, 11);
+                    $group = substr($group, 0, strpos($group, ')') + 1);
+                    
+                    $post_ids = explode(',', substr($group, 1, strlen($group) - 2));
+                    $counts = array();
+                    foreach($post_ids as $id) {
+                        $counts[$id] = 0;
+                    }
+                    
+                    $query = 
+                        "SELECT c.comment_post_ID FROM {$wpdb->comments} c 
+                        JOIN {$wpdb->prefix}icl_translations t ON c.comment_ID = t.element_id AND t.element_type='comment'
+                        WHERE c.comment_post_ID IN {$group} AND c.comment_approved=1 AND t.language_code='{$post_lang}'"           ;
+                    $ret = $wpdb->get_results($query);        
+                    foreach($ret as $details){
+                        $counts[$details->comment_post_ID] = $counts[$details->comment_post_ID] + 1;
+                    }
+                    
+                    foreach($counts as $id => $comment_count) {
+                        $this->icl_comment_count_cache->set($id.$post_lang, $comment_count);
+                    }
+                    
+                    break;
+                }
+            }
+            $pre_load_done = true;
+        }
+        
+        $comment_count = $this->icl_comment_count_cache->get($post->ID.$post_lang);
+        if ($comment_count === null) {
+            $comment_count = $wpdb->get_var("
+                SELECT COUNT(*) FROM {$wpdb->comments} c 
+                JOIN {$wpdb->prefix}icl_translations t ON c.comment_ID = t.element_id AND t.element_type='comment'
+                WHERE c.comment_post_ID={$post->ID} AND c.comment_approved=1 AND t.language_code='{$post_lang}'            
+            ");
+            $this->icl_comment_count_cache->set($post->ID.$post_lang, $comment_count);
+        }
+        return $comment_count;
+    }
+    
+}
+
+$IclCommentsTranslation = new IclCommentsTranslation();
+
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/comments-translation/google_languages_map.inc b/wp-content/plugins/sitepress-multilingual-cms/inc/comments-translation/google_languages_map.inc
new file mode 100644
index 0000000..fab0ebe
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/comments-translation/google_languages_map.inc
@@ -0,0 +1,93 @@
+<?php
+$google_languages_map = array(
+  'AFRIKAANS'=>'af',
+  'ALBANIAN'=>'sq',
+  'AMHARIC'=>'am',
+  'ARABIC'=>'ar',
+  'ARMENIAN'=>'hy',
+  'AZERBAIJANI'=>'az',
+  'BASQUE'=>'eu',
+  'BELARUSIAN'=>'be',
+  'BENGALI'=>'bn',
+  'BIHARI'=>'bh',
+  'BULGARIAN'=>'bg',
+  'BURMESE'=>'my',
+  'CATALAN'=>'ca',
+  'CHEROKEE'=>'chr',
+  'CHINESE'=>'zh',
+  'CHINESE_SIMPLIFIED'=>'zh-CN',
+  'CHINESE_TRADITIONAL'=>'zh-TW',
+  'CROATIAN'=>'hr',
+  'CZECH'=>'cs',
+  'DANISH'=>'da',
+  'DHIVEHI'=>'dv',
+  'DUTCH' => 'nl',  
+  'ENGLISH'=>'en',
+  'ESPERANTO'=>'eo',
+  'ESTONIAN'=>'et',
+  'FILIPINO'=>'tl',
+  'FINNISH'=>'fi',
+  'FRENCH'=>'fr',
+  'GALICIAN'=>'gl',
+  'GEORGIAN'=>'ka',
+  'GERMAN'=>'de',
+  'GREEK'=>'el',
+  'GUARANI'=>'gn',
+  'GUJARATI'=>'gu',
+  'HEBREW'=>'iw',
+  'HINDI'=>'hi',
+  'HUNGARIAN'=>'hu',
+  'ICELANDIC'=>'is',
+  'INDONESIAN'=>'id',
+  'INUKTITUT'=>'iu',
+  'ITALIAN'=>'it',
+  'JAPANESE'=>'ja',
+  'KANNADA'=>'kn',
+  'KAZAKH'=>'kk',
+  'KHMER'=>'km',
+  'KOREAN'=>'ko',
+  'KURDISH'=> 'ku',
+  'KYRGYZ'=> 'ky',
+  'LAOTHIAN'=> 'lo',
+  'LATVIAN'=>'lv',
+  'LITHUANIAN'=>'lt',
+  'MACEDONIAN'=>'mk',
+  'MALAY'=>'ms',
+  'MALAYALAM'=>'ml',
+  'MALTESE'=>'mt',
+  'MARATHI'=>'mr',
+  'MONGOLIAN'=>'mn',
+  'NEPALI'=>'ne',
+  'NORWEGIAN'=>'no',
+  'ORIYA'=>'or',
+  'PASHTO'=>'ps',
+  'PERSIAN'=>'fa',
+  'POLISH'=>'pl',
+  'PORTUGUESE'=>'pt-PT',
+  'PUNJABI'=>'pa',
+  'ROMANIAN'=>'ro',
+  'RUSSIAN'=>'ru',
+  'SANSKRIT'=>'sa',
+  'SERBIAN'=>'sr',
+  'SINDHI'=>'sd',
+  'SINHALESE'=>'si',
+  'SLOVAK'=>'sk',
+  'SLOVENIAN'=>'sl',
+  'SPANISH'=>'es',
+  'SWAHILI'=>'sw',
+  'SWEDISH'=>'sv',
+  'TAJIK'=>'tg',
+  'TAMIL'=>'ta',
+  'TAGALOG'=>'tl',
+  'TELUGU'=>'te',
+  'THAI'=>'th',
+  'TIBETAN'=>'bo',
+  'TURKISH'=>'tr',
+  'UKRAINIAN'=>'uk',
+  'URDU'=>'ur',
+  'UZBEK'=>'uz',
+  'UIGHUR'=>'ug',
+  'VIETNAMESE'=>'vi',
+  'UNKNOWN'=>''
+);  
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/functions-packages.php b/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/functions-packages.php
new file mode 100644
index 0000000..7bafc85
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/functions-packages.php
@@ -0,0 +1,592 @@
+<?php
+                 
+define('ICL_EXTRAS_DEFAULT_GROUP_NAME', __('Extra options', 'sitepress'));
+define('ICL_EXTRAS_PACKAGES_BASE_PATH', ICL_PLUGIN_PATH . '/compatibility-packages');
+define('ICL_EXTRAS_EXTERNAL_PACKAGE_FOLDER', 'wpml-compatibility-packages');
+
+class WPML_Packages{
+    
+    private $packages;
+    private $packages_enabled;
+    var $packages_options;
+
+    function __construct(){
+        $this->_read_external_packages_themes();
+        $this->_read_theme_packages();
+        $this->_read_plugin_packages();
+        $this->_read_external_packages_plugins();
+        
+        add_action('plugins_loaded', array($this,'load_packages'));
+        add_action('icl_extra_options_' . $_GET['page'], array($this,'render_forms'));
+        
+        if(isset($_POST['icl_extras_submit'])){
+            add_action('init', array($this,'process_forms'));
+        }            
+        
+        if(isset($_POST['icl_packages'])){
+                add_action('init', array($this, 'update_enabled_packages'));
+        }
+        
+    }
+    
+    function scan($folder, $external = false){
+        global $icl_extra_packages;
+        $packages = array();
+        $dh = opendir($folder);    
+        $packages_type = basename($folder);
+        if($dh){ 
+            while($f = readdir($dh)){
+                if(0 === strpos($f , '.')) continue;
+                $package_main_file = $folder . '/' . $f . '/load.php';
+                if(file_exists($package_main_file)){
+                    $fp = fopen($package_main_file, 'r');
+                    // Pull only the first 8kiB of the file in.
+                    $package_info = fread( $fp, 8192 );
+                    fclose($fp);             
+
+                    preg_match( '|Package Name:(.*)$|mi', $package_info, $name );
+                    preg_match( '|Package URI:(.*)$|mi', $package_info, $uri );
+                    preg_match( '|\n[\s]*Version:(.*)|i', $package_info, $version );
+                    if($packages_type == 'themes' || $external){
+                        preg_match( '|Theme:(.*)|i', $package_info, $theme );
+                        preg_match( '|Theme version:(.*)|i', $package_info, $theme_version );
+                    }
+                    if($packages_type == 'plugins' || $external){
+                        preg_match( '|Plugin:(.*)|i', $package_info, $plugin );
+                        preg_match( '|Plugin version:(.*)|i', $package_info, $plugin_version );
+                    }                    
+                    preg_match( '|Description:(.*)$|mi', $package_info, $description );
+                    preg_match( '|Author:(.*)$|mi', $package_info, $author_name );
+                    preg_match( '|Author URI:(.*)$|mi', $package_info, $author_uri );
+                    
+                    foreach ( array( 'name', 'uri', 'version', 'theme', 'theme_version', 'plugin', 'plugin_version', 'description', 'author_name', 'author_uri' ) as $field ) {
+                        if ( !empty( ${$field} ) )
+                            ${$field} = _cleanup_header_comment(${$field}[1]);
+                        else
+                            ${$field} = '';
+                    }
+                    if($name && $version){
+                        $package_data = array(
+                        'Name' => $name, 'URI' => $uri, 'Description' => $description, 
+                        'Author' => $author_name, 'AuthorURI' => $author_uri, 'Version' => $version
+                        );
+                        if($packages_type == 'themes' || $external){
+                            $package_data['Theme'] = $theme;
+                            $package_data['ThemeVersion'] = $theme_version;
+                            $package_data['id'] = $theme;
+                        }  
+                        if($packages_type == 'plugins' || $external){
+                            $package_data['Plugin'] = $plugin;
+                            $package_data['PluginVersion'] = $plugin_version;                            
+                            $package_data['id'] = str_replace(array('/','.php'),array('-',''),$plugin);
+                        }  
+                                                
+                        // add the package only if the theme is active
+                        if($external && $package_data['Plugin'] && !in_array($package_data['Plugin'], get_option('active_plugins'))){
+                            continue;
+                        }
+                        if($external && $package_data['Theme']){                            
+                            if(($package_data['Theme'] != basename(get_template_directory())) && ($package_data['Theme'] != basename(get_stylesheet_directory()))){
+                                continue;
+                            }                                
+                        }
+                        
+                        if($packages_type == 'themes'){
+                            if($package_data['Theme'] != basename(get_template_directory()) && $package_data['Theme'] != basename(get_stylesheet_directory())){
+                                continue;
+                            }                                
+                        }elseif($packages_type == 'plugins'){
+                            $plugins = get_option('active_plugins');
+                            if (function_exists('get_site_option')){
+                                $plugins = array_merge($plugins, array_keys(get_site_option('active_sitewide_plugins',array())));
+                            }
+                            if(!in_array($package_data['Plugin'], $plugins)){
+                                continue;
+                            }
+                        }
+                        
+                        $package_data['path'] = $folder . '/' . $f ;
+                        $packages[$f] = $package_data;
+                                                         
+                    }
+                }
+            }
+            closedir($dh);            
+        }else{
+            throw new Exception(sprintf('Can\'t open folder %s',$folder));
+        }
+        
+        return $packages;
+        
+    }
+
+    function _read_theme_packages(){
+        try{
+            $this->packages['themes'] = array_merge((array)$this->packages['themes'], 
+                $this->scan(ICL_EXTRAS_PACKAGES_BASE_PATH . '/themes'));
+        }catch (Exception $e){ echo $e->getMessage(); }
+    }
+
+    function _read_plugin_packages(){
+        try{
+            $this->packages['plugins'] = array_merge((array)$this->packages['plugins'],
+                $this->scan(ICL_EXTRAS_PACKAGES_BASE_PATH . '/plugins'));
+        }catch (Exception $e){ echo $e->getMessage(); }
+    }
+
+    function _read_external_packages_themes(){
+        $external = true;
+        // read package from the current theme
+        if(get_template_directory() != get_stylesheet_directory()){
+            $folder = get_stylesheet_directory() . '/' . ICL_EXTRAS_EXTERNAL_PACKAGE_FOLDER;        
+            if(@file_exists($folder) && is_dir($folder)){
+                $packages = $this->scan($folder, $external);
+                if(is_array($packages) && !empty($packages)){
+                    $this->packages['themes'] = array_merge((array)$this->packages['themes'] , $packages);
+                }
+            }
+        }
+        $folder = get_template_directory() . '/' . ICL_EXTRAS_EXTERNAL_PACKAGE_FOLDER;        
+        if(@file_exists($folder) && is_dir($folder)){
+            $packages = $this->scan($folder, $external);
+            if(is_array($packages) && !empty($packages)){
+                $this->packages['themes'] = array_merge((array)$this->packages['themes'] , $packages);
+            }
+        }
+    }
+    
+    function _read_external_packages_plugins(){
+        $plugins = get_option('active_plugins');
+        
+        if (function_exists('get_site_option')){
+            $plugins = array_merge($plugins, array_keys(get_site_option('active_sitewide_plugins',array())));
+        }
+        
+        if(is_array($plugins) && !empty($plugins)){
+            foreach($plugins as $plugin){
+                $exp = explode('/', $plugin);                
+                $plugin_folder = WP_PLUGIN_DIR . '/' . $exp[0] . '/' . ICL_EXTRAS_EXTERNAL_PACKAGE_FOLDER;
+                if(@file_exists($plugin_folder) && is_dir($plugin_folder)){
+                    $packages = $this->scan($plugin_folder, $external);
+                    if(is_array($packages) && !empty($packages)){
+                        $this->packages['plugins'] = array_merge((array)$this->packages['plugins'] , $packages);
+                    }
+                }
+            }
+        }        
+    }
+    
+    function get_packages(){
+        return $this->packages;        
+    }
+
+    function load_package($type, $name){
+        try{
+            $bootstrap = $this->packages[$type][$name]['path'] . '/load.php';
+            if(@file_exists($bootstrap)){
+                @include $bootstrap;
+            }else{
+                global $sitepress;
+                $enabled = $this->get_enabled_packages();        
+                unset($enabled[$type][$name]);
+                $this->packages_enabled[$type][$name] = 0;
+                $iclsettings['packages_enabled'] = $this->packages_enabled;
+                $sitepress->save_settings($iclsettings);
+            }
+            
+        }catch(Exception $e){
+            echo $e->getMessage();
+        }            
+    }
+    
+    function load_packages(){        
+        global $sitepress_settings;                
+        $enabled = $this->get_enabled_packages();        
+        foreach($this->packages as $type => $packages){
+            foreach($packages as $package => $package_data){
+                // auto-enable   
+                if(!isset($enabled[$type][$package]) && !isset($sitepress_settings['upgrade_flags']['1.5'])){
+                    global $sitepress;
+                    $enabled[$type][$package] = 1;
+                    $this->packages_enabled[$type][$package] = 1;
+                    $iclsettings['packages_enabled'] = $this->packages_enabled;
+                    $sitepress->save_settings($iclsettings);
+                } 
+                if($enabled[$type][$package]){
+                    $this->load_package($type, $package);                        
+                }                
+            }
+        }
+    }
+    
+    function get_enabled_packages(){
+        global $sitepress_settings;
+        if(!isset($this->packages_enabled)){
+            $this->packages_enabled = $sitepress_settings['packages_enabled'];
+        }        
+        return $this->packages_enabled;
+    }
+    
+    function update_enabled_packages(){
+        global $sitepress, $sitepress_settings;
+        $type = key($_POST['icl_packages']);        
+        $updated_packages = $_POST['icl_packages'][$type];            
+        
+        
+        $enabled_packages = $this->get_enabled_packages();
+        if(!is_array($enabled_packages[$type])){
+            $enabled_packages[$type] = array();
+        }
+
+        $iclsettings['packages_enabled'][$type] = array_merge((array)$enabled_packages[$type], (array)$updated_packages);
+                
+        $sitepress->save_settings($iclsettings);
+        $this->packages_enabled[$type] = $iclsettings['packages_enabled'][$type];
+        $sitepress_settings['packages_enabled'][$type] = $iclsettings['packages_enabled'][$type];
+    }
+    
+    private function _render_form_title($group_name){
+        echo '<h3>' . $group_name . '</h3>';    
+    }
+    
+    private function _icl_extras_render_checkbox($package_type, $package_name, $option_name, $default_value = '', $extra_attributes = array()){
+        global $sitepress_settings;
+                                      
+        if(isset($sitepress_settings['packages'][$package_type][$package_name][$option_name]) && $sitepress_settings['packages'][$package_type][$package_name][$option_name] 
+            || !isset($sitepress_settings['packages'][$package_type][$package_name][$option_name]) && $default_value=='checked'){
+            $checked = ' checked="checked"';
+        }else{
+            $checked = '';
+        }
+        $ea = '';
+        if(!empty($extra_attributes)){
+            foreach($extra_attributes as $k=>$v){
+                $ea .= ' ' . $k . '="' . $v . '"';
+            }        
+        }
+        echo '<input type="hidden" name="icl_extras['.$package_type.']['.$package_name.']['.$option_name.']" value="0" />';
+        echo '<input type="checkbox" id="icl_extras_'.$package_name.'_'.$option_name.'" name="icl_extras['.$package_type.']['.$package_name.']['.$option_name.']" value="1"' .$checked . $ea . ' />';
+    }    
+    
+    private function _icl_extras_render_text($package_type, $package_name, $option_name, $default_value = '', $extra_attributes = array()){
+        global $sitepress_settings;
+
+        if(isset($sitepress_settings['packages'][$package_type][$package_name][$option_name])){
+            $value = $sitepress_settings['packages'][$package_type][$package_name][$option_name];
+        }else{
+            $value = $default_value;
+        }    
+
+        $ea = '';
+        if(!empty($extra_attributes)){
+            foreach($extra_attributes as $k=>$v){
+                $ea .= ' ' . $k . '="' . $v . '"';
+            }        
+        }
+        echo '<input type="text" id="icl_extras_'.$package_name.'_'.$option_name.'" name="icl_extras['.$package_type.']['.$package_name.']['.$option_name.']" value="'.$value.'"' . $ea . ' />';
+    }    
+    
+    private function _icl_extras_render_textarea($package_type, $package_name, $option_name, $default_value = '', $extra_attributes = array()){
+        global $sitepress_settings;
+
+        if(isset($sitepress_settings['packages'][$package_type][$package_name][$option_name])){
+            $value = $sitepress_settings['packages'][$package_type][$package_name][$option_name];
+        }else{
+            $value = $default_value;
+        }    
+
+        $ea = '';
+        if(!empty($extra_attributes)){
+            foreach($extra_attributes as $k=>$v){
+                $ea .= ' ' . $k . '="' . $v . '"';
+            }        
+        }
+        echo '<textarea id="icl_extras_'.$package_name.'_'.$option_name.'" name="icl_extras['.$package_type.']['.$package_name.']['.$option_name.']" ' . $ea . '>'.$value.'</textarea>';
+    }
+    
+    private function _icl_extras_render_select($package_type, $package_name, $option_name, $option_options, $default_value = '', $extra_attributes = array()){
+        global $sitepress_settings;
+
+        if(isset($sitepress_settings['packages'][$package_type][$package_name][$option_name])){
+            $value = $sitepress_settings['packages'][$package_type][$package_name][$option_name];
+        }else{
+            $value = $default_value;
+        }    
+
+        $ea = '';
+        if(!empty($extra_attributes)){
+            foreach($extra_attributes as $k=>$v){
+                $ea .= ' ' . $k . '="' . $v . '"';
+            }        
+        }
+        echo '<select type="text" id="icl_extras_'.$package_name.'_'.$option_name.'" name="icl_extras['.$package_type.']['.$package_name.']['.$option_name.']"' . $ea . '>';
+        foreach($option_options as $opt_value=>$name){
+            if($value==$opt_value){
+                $selected = ' selected="selected"';
+            }else{
+                $selected = '';
+            }
+            echo '<option value="'.$opt_value.'"'.$selected.'>' . $name . '</option>';
+        }
+        echo '</select>';
+    }        
+    
+    private function _icl_extras_render_radio($package_type, $package_name, $option_name, $option_values, $default_value = '', $extra_attributes = array()){
+        global $sitepress_settings;
+        
+        if(isset($sitepress_settings['packages'][$package_type][$package_name][$option_name])){
+            $value = $sitepress_settings['packages'][$package_type][$package_name][$option_name];
+        }else{
+            $value = $default_value;
+        }    
+
+        $ea = '';
+        if(!empty($extra_attributes)){
+            foreach($extra_attributes as $k=>$v){
+                $ea .= ' ' . $k . '="' . $v . '"';
+            }        
+        }
+        foreach($option_values as $value=>$name){
+            if($default_value && $default_value==$value){
+                $checked = ' checked="checked"';
+            }else{
+                $checked = '';
+            }
+            echo '<label><input type="radio" id="icl_extras_'.$package_name.'_'.$option_name.'" name="icl_extras['.$package_type.']['.$package_name.']['.$option_name.']" value="'.$value.'"' .$checked . $ea . ' />' . $name . '</label>&nbsp;&nbsp;&nbsp;';
+        }
+    }        
+    
+    function render_forms(){
+        $page = $_GET['page'];
+        if(isset($this->packages_options[$page])){
+            $frm_idx = 0;
+            foreach($this->packages_options[$page] as $group_name => $options){        
+                echo '<a name="icl-extras-'.$frm_idx.'"></a>';
+                $this->_render_form_title($group_name);
+                if(isset($_GET['updated']) && $_GET['updated']==$frm_idx){
+                    echo '<div class="icl_form_success">';
+                    echo __('Options saved', 'sitepress');
+                    echo '</div>';
+                }                                
+                echo '<form name="icl_extras_form_'.$frm_idx.'" method="post" action="admin.php?page='.$page.'&amp;updated=true#icl-extras-'.$frm_idx.'">';
+                echo '<input type="hidden" name="icl_extras_frm_idx" value="'.$frm_idx.'" />';
+                echo '<input type="hidden" name="icl_extras_group" value="'.$group_name.'" />';
+                echo '<table class="form-table">';
+                echo '<tbody>';
+                foreach($options as $package_name => $package){
+                    foreach($package as $o){
+                        echo '<tr valign="top">';
+                        echo '<th scope="row" style="width:auto;border-bottom:1px solid #ddd;"><label for="icl_extras_'.$package_name.'_'.$o['option_name'].'">' . $o['option_label'] . '</label></th>';
+                        echo '<td style="width:auto;border-bottom:1px solid #ddd;">';                
+                        switch($o['option_type']){                    
+                            case 'checkbox':
+                                $this->_icl_extras_render_checkbox($o['package_type'], $package_name, $o['option_name'], $o['default_value'], $o['extra_attributes']);                        
+                                break;    
+                            case 'text':
+                                $this->_icl_extras_render_text($o['package_type'], $package_name, $o['option_name'], $o['default_value'], $o['extra_attributes']);                        
+                                break;                                
+                            case 'textarea':
+                                $this->_icl_extras_render_textarea($o['package_type'], $package_name, $o['option_name'], $o['default_value'], $o['extra_attributes']);                        
+                                break;                                
+                            case 'select':
+                                $this->_icl_extras_render_select($o['package_type'], $package_name, $o['option_name'], $o['option_options'], $o['default_value'], $o['extra_attributes']);                        
+                                break;                                
+                            case 'radio':
+                                $this->_icl_extras_render_radio($o['package_type'], $package_name, $o['option_name'], $o['option_options'], $o['default_value'], $o['extra_attributes']);                        
+                                break;                                
+                                
+                        }
+                        echo '</td>';
+                        echo '</tr>';
+                    }
+                }  
+                echo '<tr><td colspan="2" align="right"><input name="icl_extras_submit" class="button" type="submit" value="'.__('Save', 'sitepress').'" /></td></tr>';  
+                echo '</tbody>';
+                echo '</table>';
+                $frm_idx++;
+                echo '</form>';
+                
+            }
+        }        
+    }
+    
+    function process_forms(){
+        global $sitepress, $sitepress_settings;    
+        
+        $iclsettings['packages'] = $sitepress_settings['packages'];
+        
+        foreach($_POST['icl_extras'] as $package_type => $packages){            
+            foreach($packages as $package => $options){
+                foreach($options as $option_name => $option_value){
+                    $iclsettings['packages'][$package_type][$package][$option_name] = $option_value;                
+                }
+            }
+        }
+        
+        $sitepress->save_settings($iclsettings);
+        
+        $page = $_GET['page'];
+        wp_redirect('admin.php?page='.$page.'&updated=' . $_POST['icl_extras_frm_idx']);
+        
+    }
+    
+}
+
+
+
+// OLD STUFF DOWN HERE
+
+/*  
+
+function icl_extras_add_option_checkbox($wpml_page, $package_name, $option_label, $option_name, 
+                                        $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME, $default_value='', $extra_attributes = array()){
+    global $icl_extras;
+    if(!$group_name){
+        $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME;
+    }
+    $icl_extras[$wpml_page][$group_name][$package_name][] = array(
+        'option_type' => 'checkbox',
+        'option_label' => $option_label,
+        'option_name' => $option_name,
+        'default_value' => $default_value,
+        'extra_attributes' => $extra_attributes
+    );
+} 
+
+
+function icl_extras_add_option_text($wpml_page, $package_name, $option_label, $option_name, 
+                                        $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME, $default_value='', $extra_attributes = array()){
+    global $icl_extras;
+    if(!$group_name){
+        $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME;
+    }
+    $icl_extras[$wpml_page][$group_name][$package_name][] = array(
+        'option_type' => 'text',
+        'option_label' => $option_label,
+        'option_name' => $option_name,
+        'default_value' => $default_value,
+        'extra_attributes' => $extra_attributes
+    );
+} 
+*/
+/*
+function _icl_extras_render_form_title($group_name){
+    echo '<h3>' . $group_name . '</h3>';
+}
+
+function _icl_extras_render_checkbox($package_name, $option_name, $default_value = '', $extra_attributes = array()){
+    global $sitepress_settings;
+    
+    if(isset($sitepress_settings['packages'][$package_name][$option_name]) && $sitepress_settings['packages'][$package_name][$option_name] 
+        || !isset($sitepress_settings['packages'][$package_name][$option_name]) && $default_value=='checked'){
+        $checked = ' checked="checked"';
+    }else{
+        $checked = '';
+    }
+    $ea = '';
+    if(!empty($extra_attributes)){
+        foreach($extra_attributes as $k=>$v){
+            $ea .= ' ' . $k . '=' . $v;
+        }        
+    }
+    echo '<input type="checkbox" id="icl_extras_'.$package_name.'_'.$option_name.'" name="icl_extras['.$package_name.']['.$option_name.']" value="1"' .$checked . $ea . ' />';
+}
+
+function _icl_extras_render_text($package_name, $option_name, $default_value = '', $extra_attributes = array()){
+    global $sitepress_settings;
+
+    if(isset($sitepress_settings['packages'][$package_name][$option_name])){
+        $value = $sitepress_settings['packages'][$package_name][$option_name];
+    }else{
+        $value = '';
+    }    
+    
+    $ea = '';
+    if(!empty($extra_attributes)){
+        foreach($extra_attributes as $k=>$v){
+            $ea .= ' ' . $k . '=' . $v;
+        }        
+    }
+    echo '<input type="text" id="icl_extras_'.$package_name.'_'.$option_name.'" name="icl_extras['.$package_name.']['.$option_name.']" value="'.$value.'"' . $ea . ' />';
+}
+*/
+
+/*
+function icl_extras_render_forms(){
+    $page = $_GET['page'];
+    global $icl_extras;
+    if(isset($icl_extras[$page])){
+        $frm_idx = 0;
+        foreach($icl_extras[$page] as $group_name => $options){        
+            _icl_extras_render_form_title($group_name);
+            echo '<form name="icl_extras_form_'.$frm_idx.'" method="post" action="admin.php?page='.$page.'&amp;updated=true#icl-extras-'.$frm_idx.'">';
+            echo '<input type="hidden" name="icl_extras_frm_idx" value="'.$frm_idx.'" />';
+            echo '<input type="hidden" name="icl_extras_group" value="'.$group_name.'" />';
+            if(isset($_GET['updated']) && $_GET['updated']==$frm_idx){
+                echo '<div class="icl_form_success">';
+                echo __('Options saved', 'sitepress');
+                echo '</div>';
+            }
+            echo '<table id="icl-extras-'.$frm_idx.'">';
+            foreach($options as $package_name => $package){
+                foreach($package as $o){
+                    echo '<tr>';
+                    echo '<th><label for="icl_extras_'.$package_name.'_'.$o['option_name'].'">' . $o['option_label'] . '</label></th>';
+                    echo '<td>';                
+                    switch($o['option_type']){                    
+                        case 'checkbox':
+                            _icl_extras_render_checkbox($package_name, $o['option_name'], $o['default_value'], $o['extra_attributes']);                        
+                            break;    
+                        case 'text':
+                            _icl_extras_render_text($package_name, $o['option_name'], $o['default_value'], $o['extra_attributes']);                        
+                            break;                                
+                    }
+                    echo '</td>';
+                    echo '</tr>';
+                }
+            }  
+            echo '<tr><td colspan="2" align="right"><input name="icl_extras_submit" class="button" type="submit" value="'.__('Save', 'sitepress').'"></td></tr>';  
+            echo '</table>';
+            $frm_idx++;
+            echo '</form>';
+            
+        }
+    }
+}
+*/
+
+/*
+function icl_extras_process_forms(){
+    global $sitepress, $sitepress_settings, $icl_extras;    
+    
+    $iclsettings['packages'] = $sitepress_settings['packages'];
+    
+    foreach($_POST['icl_extras'] as $package => $options){
+        foreach($options as $option_name => $option_value){
+            $iclsettings['packages'][$package][$option_name] = $option_value;
+        }
+        
+    }
+    
+    $page = $_GET['page'];
+    foreach($icl_extras[$page] as $group_name=>$options){
+        foreach($options as $package_name => $package){
+            foreach($package as $o){                
+                switch($o['option_type']){                    
+                    case 'checkbox';                                                     
+                        if(!isset($_POST['icl_extras'][$package_name][$o['option_name']]) && $_POST['icl_extras_group'] == $group_name){
+                            $iclsettings['packages'][$package_name][$o['option_name']] = 0;
+                        }
+                        break;
+                }
+            }
+        }
+    }
+    
+    $sitepress->save_settings($iclsettings);
+    
+    wp_redirect('admin.php?page='.$page.'&updated=' . $_POST['icl_extras_frm_idx']);
+}
+*/
+
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/init-packages.php b/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/init-packages.php
new file mode 100644
index 0000000..c6a71d5
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/init-packages.php
@@ -0,0 +1,5 @@
+<?php
+if($sitepress_settings['existing_content_language_verified']){
+    $WPML_Packages = new WPML_Packages();
+}
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/wpml-package.class.php b/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/wpml-package.class.php
new file mode 100644
index 0000000..b61b48f
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/compatibility-packages/wpml-package.class.php
@@ -0,0 +1,326 @@
+<?php
+  
+abstract class WPML_Package{
+    var $name;
+    var $data;
+    var $settings;
+    var $type;
+    var $package_path;
+    var $package_url;
+    private $_resources = array();
+	var $textdomain;
+    
+    
+    function __construct(){
+        global $WPML_Packages;
+        
+        $trace=debug_backtrace();
+        $this->package_path = dirname($trace[0]['file']);
+        $this->name = basename($this->package_path);
+        $this->type = basename(dirname(dirname($trace[0]['file'])));
+        $this->package_url = get_option('siteurl') . str_replace('\\','/',str_replace(trim(ABSPATH,'/'), '', $this->package_path));
+        
+        $_packages = $WPML_Packages->get_packages();
+        $this->data = $_packages[$this->type][$this->name];
+        
+        global $sitepress_settings;
+        if(empty($sitepress_settings)){
+            $sitepress_settings = get_option('icl_sitepress_settings'); // fail safe
+        }
+        
+        if(isset($sitepress_settings['packages'][$this->type][$this->name])){
+            $this->settings = $sitepress_settings['packages'][$this->type][$this->name];    
+        }else{
+            $this->settings = array();    
+        }
+        
+        add_action('wp_head', array($this, '_echo_js'), 30);
+        add_action('wp_head', array($this, '_echo_css'), 30);
+		
+		$this->textdomain = 'packages-'.$this->type.'-'.$this->name;
+		load_plugin_textdomain( $this->textdomain, false, ICL_PLUGIN_FOLDER . '/compatibility-packages/' . $this->type . '/' . $this->name . '/languages/');
+        
+        if(!isset($this->settings['translation_sync_file_loaded']) || !$this->settings['translation_sync_file_loaded']){
+            $this->load_custom_fields_sync_file();
+        }
+    }
+    
+    function __destruct(){
+        
+    }
+    
+    function save_settings(){
+        global $sitepress;
+        $iclsettings['packages'][$this->type][$this->name] = $this->settings;
+        $sitepress->save_settings($iclsettings);
+    }
+    
+    function add_option_checkbox($wpml_page, $option_label, $option_name, $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME, $default_value='', $extra_attributes = array()){
+        global $WPML_Packages;
+        if(!$group_name){
+            $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME;
+        }
+                                
+        
+        $WPML_Packages->packages_options[$wpml_page][$group_name][$this->name][] = array(
+            'package_type' => $this->type,
+            'option_type' => 'checkbox',
+            'option_label' => $option_label,
+            'option_name' => $option_name,
+            'default_value' => $default_value,
+            'extra_attributes' => $extra_attributes
+        );
+        
+        // add the default value to the database        
+        if($default_value && !isset($this->settings[$option_name])){
+            global $sitepress;
+            $this->settings[$option_name] = $default_value;
+            $iclsettings['packages'][$this->type][$this->name] = $this->settings;
+            $sitepress->save_settings($iclsettings);
+        }
+        
+    }
+        
+    function add_option_text($wpml_page, $option_label, $option_name, $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME, $default_value='', $extra_attributes = array()){
+        global $WPML_Packages;
+        if(!$group_name){
+            $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME;
+        }
+                                
+        $WPML_Packages->packages_options[$wpml_page][$group_name][$this->name][] = array(
+            'package_type' => $this->type,
+            'option_type' => 'text',
+            'option_label' => $option_label,
+            'option_name' => $option_name,
+            'default_value' => $default_value,
+            'extra_attributes' => $extra_attributes
+        );
+        
+        // add the default value to the database        
+        if($default_value && !isset($this->settings[$option_name])){
+            global $sitepress;
+            $this->settings[$option_name] = $default_value;
+            $iclsettings['packages'][$this->type][$this->name] = $this->settings;
+            $sitepress->save_settings($iclsettings);
+        }
+        
+    }
+    
+    function add_option_textarea($wpml_page, $option_label, $option_name, $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME, $default_value='', $extra_attributes = array()){
+        global $WPML_Packages;
+        if(!$group_name){
+            $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME;
+        }
+                                
+        $WPML_Packages->packages_options[$wpml_page][$group_name][$this->name][] = array(
+            'package_type' => $this->type,
+            'option_type' => 'textarea',
+            'option_label' => $option_label,
+            'option_name' => $option_name,
+            'default_value' => $default_value,
+            'extra_attributes' => $extra_attributes
+        );
+        
+        // add the default value to the database        
+        if($default_value && !isset($this->settings[$option_name])){
+            global $sitepress;
+            $this->settings[$option_name] = $default_value;
+            $iclsettings['packages'][$this->type][$this->name] = $this->settings;
+            $sitepress->save_settings($iclsettings);
+        }
+    }
+    
+    function add_option_radio($wpml_page, $option_label, $option_name, $option_options, $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME, $default_value='', $extra_attributes = array()){
+        global $WPML_Packages;
+        if(!$group_name){
+            $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME;
+        }
+                                
+        $WPML_Packages->packages_options[$wpml_page][$group_name][$this->name][] = array(
+            'package_type' => $this->type,
+            'option_type' => 'radio',
+            'option_label' => $option_label,
+            'option_name' => $option_name,
+            'option_options' => $option_options,
+            'default_value' => $default_value,
+            'extra_attributes' => $extra_attributes
+        );
+        
+        // add the default value to the database        
+        if($default_value && !isset($this->settings[$option_name])){
+            global $sitepress;
+            $this->settings[$option_name] = $default_value;
+            $iclsettings['packages'][$this->type][$this->name] = $this->settings;
+            $sitepress->save_settings($iclsettings);
+        }
+    }
+
+    function add_option_select($wpml_page, $option_label, $option_name, $option_options, $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME, $default_value='', $extra_attributes = array()){
+        global $WPML_Packages;
+        if(!$group_name){
+            $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME;
+        }
+                                
+        $WPML_Packages->packages_options[$wpml_page][$group_name][$this->name][] = array(
+            'package_type' => $this->type,
+            'option_type' => 'select',
+            'option_label' => $option_label,
+            'option_name' => $option_name,
+            'option_options' => $option_options,
+            'default_value' => $default_value,
+            'extra_attributes' => $extra_attributes
+        );
+        
+        // add the default value to the database        
+        if($default_value && !isset($this->settings[$option_name])){
+            global $sitepress;
+            $this->settings[$option_name] = $default_value;
+            $iclsettings['packages'][$this->type][$this->name] = $this->settings;
+            $sitepress->save_settings($iclsettings);
+        }
+    }
+    
+    function add_options($wpml_page, $options_array, $group_name = ICL_EXTRAS_DEFAULT_GROUP_NAME){
+        if(is_array($options_array) && !empty($options_array)){
+            foreach($options_array as $option_name => $option){
+                switch($option['option_type']){
+                    case 'checkbox':
+                        $this->add_option_checkbox($wpml_page, $option['option_label'], $option_name, $group_name, $option['default_value'], $option['extra_attributes']);
+                        break;
+                    case 'text':
+                        $this->add_option_text($wpml_page, $option['option_label'], $option_name, $group_name, $option['default_value'], $option['extra_attributes']);
+                        break;
+                    case 'textarea':
+                        $this->add_option_textarea($wpml_page, $option['option_label'], $option_name, $group_name, $option['default_value'], $option['extra_attributes']);
+                        break;
+                    case 'radio':
+                        $this->add_option_radio($wpml_page, $option['option_label'], $option_name, $option['values'], $group_name, $option['default_value'], $option['extra_attributes']);
+                        break;
+                    case 'select':
+                        $this->add_option_select($wpml_page, $option['option_label'], $option_name, $option['values'], $group_name, $option['default_value'], $option['extra_attributes']);
+                        break;
+                }
+            }
+        }            
+    }
+    
+    // $file is relative to the package root folder
+    function load_js($file){
+        $this->_resources['js'][] = $file;
+    }
+    
+    function _echo_js($file){
+        if(!empty($this->_resources['js']) && is_array($this->_resources['js'])){
+            foreach($this->_resources['css'] as $file){
+                echo '<script type="text/javascript" src="'.$this->package_url . '/' . $file.'?v='. $this->data['Version'] .'"></script>'."\n";
+            }
+        }    
+    }
+    
+    // $file is relative to the package root folder
+    function load_css($file){
+        $this->_resources['css'][] = $file;         
+    }
+    
+    function _echo_css($file){        
+        if(!empty($this->_resources['css']) && is_array($this->_resources['css'])){
+            foreach($this->_resources['css'] as $file){
+                echo '<link rel="stylesheet" type="text/css" href="'.$this->package_url . '/' . $file.'?v='. $this->data['Version'] .'" />'."\n";
+            }
+        }            
+    }
+    
+    
+    // Theme packages functions. - start (added SJ)
+    // Used to filter menu.
+    function filter_home_link($menu) {
+        return str_replace('href="'.get_option('home').'"','href="'.icl_get_home_url().'"',$menu);
+    }
+
+    function language_selector_header() {
+        do_action('icl_language_selector');
+    }
+
+    function language_selector_footer() {
+		if($this->settings['footer_skip_languages'] == 'checked')
+			$this->settings['footer_skip_languages'] = 1;
+		$skip = is_singular() ? intval($this->settings['footer_skip_languages']) : 0;
+        $languages = icl_get_languages('skip_missing='.$skip);
+        if(!empty($languages)){
+            global $sitepress_settings;
+            echo '
+                <div id="icl_lang_selector_footer">
+                    <ul>
+                    ';
+                foreach($languages as $l){
+                    echo '<li>';
+                    if(!$l['active']) echo '<a href="'.$l['url'].'">';
+                    if ($sitepress_settings['icl_lso_flags']) echo '<img src="'.$l['country_flag_url'].'" alt="'.$l['language_code'].'" />&nbsp;';
+                    if(!$l['active']) echo '</a>';
+                     if(!$l['active']) echo '<a href="'.$l['url'].'">';
+                    echo icl_disp_language( $sitepress_settings['icl_lso_native_lang'] ? $l['native_name'] : null, $sitepress_settings['icl_lso_display_lang'] ? $l['translated_name'] : null );
+                    if(!$l['active']) echo '</a>';
+                    echo '</li>
+                    ';
+                }
+            echo '
+                    </ul>
+                </div>';
+            }
+    }
+
+    function add_post_available($content){
+        $out = '';
+        if(is_singular()){
+            $languages = icl_get_languages('skip_missing=true');
+            if(1 < count($languages)){
+                $out .= $this->settings['post_available_before'] ? $this->settings['post_available_before'] : ''; 
+                foreach($languages as $l){
+                    if(!$l['active']) $langs[] = '<a href="'.$l['url'].'">'.$l['translated_name'].'</a>';
+                }
+                $out .= join(', ', $langs);
+                $out .= $this->settings['post_available_after'] ? $this->settings['post_available_after'] : '';
+				$out = '<p>' . sprintf(icl_t('theme '.$this->name, 'Text for alternative languages for posts', $this->settings['post_available_text']),$out) . '</p>';
+            }
+        }
+         if ( $this->settings['post_available_position'] == 'top')
+            return $out . $content;
+        else return $content . $out;
+    }
+
+    // This function should check if sidebar switcher is enabled
+    function check_sidebar_language_selector_widget(){
+		if(is_admin()) return;
+    	global $wp_registered_widgets;
+		if(isset($wp_registered_widgets['language-selector'])) unregister_sidebar_widget('language-selector');
+    }
+    // Theme packages functions. - end (added SJ)
+    
+    function load_custom_fields_sync_file(){
+        global $wpdb;
+        if(file_exists($this->package_path . '/res/custom_field_translation.csv')){
+            $fh = fopen($this->package_path . '/res/custom_field_translation.csv', 'rb');
+            if($fh){                
+                $wpdb->query("DELETE FROM {$wpdb->prefix}icl_plugins_texts WHERE plugin_name='{$this->data['Plugin']}'");
+                while($data = fgetcsv($fh)){
+                    $wpdb->insert($wpdb->prefix.'icl_plugins_texts', array(   
+                            'plugin_name'=>substr($data[0],0,128),
+                            'attribute_type' => substr($data[1], 0, 64),
+                            'attribute_name' => substr($data[2], 0, 128),
+                            'description'    => $data[3],
+                            'translate'      => $data[4]
+                        )
+                    );
+                }
+                fclose($fh);
+            }
+            if($wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}icl_plugins_texts WHERE plugin_name='".$this->data['Plugin']."'")){
+                $this->settings['translation_sync_file_loaded'] = true;
+                $this->save_settings();
+            }                                
+        }
+    }    
+        
+}
+  
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/constants.inc b/wp-content/plugins/sitepress-multilingual-cms/inc/constants.inc
new file mode 100644
index 0000000..a0c11dd
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/constants.inc
@@ -0,0 +1,40 @@
+<?php
+if(file_exists(ICL_PLUGIN_PATH . '/inc/sandbox.inc')){
+    require ICL_PLUGIN_PATH . '/inc/sandbox.inc';
+} else {
+    define('ICL_API_ENDPOINT', 'https://www.icanlocalize.com');
+}
+
+define('ICL_LANG_SEL_BLUE_FONT_CURRENT_NORMAL', '#ffffff');
+define('ICL_LANG_SEL_BLUE_FONT_CURRENT_HOVER', '#000000');
+define('ICL_LANG_SEL_BLUE_BACKGROUND_CURRENT_NORMAL', '#0099cc');
+define('ICL_LANG_SEL_BLUE_BACKGROUND_CURRENT_HOVER', '#0099cc');
+define('ICL_LANG_SEL_BLUE_FONT_OTHER_NORMAL', '#000000');
+define('ICL_LANG_SEL_BLUE_FONT_OTHER_HOVER', '#000000');
+define('ICL_LANG_SEL_BLUE_BACKGROUND_OTHER_NORMAL', '#eeeeee');
+define('ICL_LANG_SEL_BLUE_BACKGROUND_OTHER_HOVER', '#cccccc');
+define('ICL_LANG_SEL_BLUE_BORDER', '#000000');
+
+define('ICL_LANG_SEL_WHITE_FONT_CURRENT_NORMAL', '#444444');
+define('ICL_LANG_SEL_WHITE_FONT_CURRENT_HOVER', '#000000');
+define('ICL_LANG_SEL_WHITE_BACKGROUND_CURRENT_NORMAL', '#ffffff');
+define('ICL_LANG_SEL_WHITE_BACKGROUND_CURRENT_HOVER', '#eeeeee');
+define('ICL_LANG_SEL_WHITE_FONT_OTHER_NORMAL', '#444444');
+define('ICL_LANG_SEL_WHITE_FONT_OTHER_HOVER', '#000000');
+define('ICL_LANG_SEL_WHITE_BACKGROUND_OTHER_NORMAL', '#ffffff');
+define('ICL_LANG_SEL_WHITE_BACKGROUND_OTHER_HOVER', '#eeeeee');
+define('ICL_LANG_SEL_WHITE_BORDER', '#aaaaaa');
+
+define('ICL_LANG_SEL_GRAY_FONT_CURRENT_NORMAL', '#222222');
+define('ICL_LANG_SEL_GRAY_FONT_CURRENT_HOVER', '#000000');
+define('ICL_LANG_SEL_GRAY_BACKGROUND_CURRENT_NORMAL', '#eeeeee');
+define('ICL_LANG_SEL_GRAY_BACKGROUND_CURRENT_HOVER', '#dddddd');
+define('ICL_LANG_SEL_GRAY_FONT_OTHER_NORMAL', '#222222');
+define('ICL_LANG_SEL_GRAY_FONT_OTHER_HOVER', '#000000');
+define('ICL_LANG_SEL_GRAY_BACKGROUND_OTHER_NORMAL', '#eeeeee');
+define('ICL_LANG_SEL_GRAY_BACKGROUND_OTHER_HOVER', '#dddddd');
+define('ICL_LANG_SEL_GRAY_BORDER', '#555555');
+
+
+define('ICL_PRO_TRANSLATION_COST_PER_WORD', 0.07);
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/functions-string-translation.php b/wp-content/plugins/sitepress-multilingual-cms/inc/functions-string-translation.php
new file mode 100644
index 0000000..0c9626e
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/functions-string-translation.php
@@ -0,0 +1,1598 @@
+<?php
+define('ICL_STRING_TRANSLATION_NOT_TRANSLATED', 0);
+define('ICL_STRING_TRANSLATION_COMPLETE', 1);
+define('ICL_STRING_TRANSLATION_NEEDS_UPDATE', 2);
+define('ICL_STRING_TRANSLATION_PARTIAL', 3);
+
+define('ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_SOURCE', 0);
+define('ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_PAGE', 1);
+define('ICL_STRING_TRANSLATION_STRING_TRACKING_THRESHOLD', 5);
+
+
+$icl_st_string_translation_statuses = array(
+    ICL_STRING_TRANSLATION_COMPLETE => __('Translation complete','sitepress'),
+    ICL_STRING_TRANSLATION_PARTIAL => __('Partial translation','sitepress'),
+    ICL_STRING_TRANSLATION_NEEDS_UPDATE => __('Translation needs update','sitepress'),
+    ICL_STRING_TRANSLATION_NOT_TRANSLATED => __('Not translated','sitepress')
+);
+
+//add_action('admin_menu', 'icl_st_administration_menu');
+add_action('plugins_loaded', 'icl_st_init');
+add_action('icl_update_active_languages', 'icl_update_string_status_all');
+
+add_action('update_option_blogname', 'icl_st_update_blogname_actions',5,2);
+add_action('update_option_blogdescription', 'icl_st_update_blogdescription_actions',5,2);
+
+if(!defined('XMLRPC')){
+    // called separately for XMLRPC post saves
+    add_action('save_post', 'icl_st_fix_links_in_strings', 19);
+}
+
+
+if(is_admin()){
+    wp_enqueue_style('thickbox');
+    wp_enqueue_script('jquery');
+    wp_enqueue_script('thickbox');
+}
+
+function icl_st_init(){                       
+    global $sitepress_settings, $sitepress, $wpdb, $icl_st_err_str;
+    
+    if(isset($_GET['icl_action']) && $_GET['icl_action'] == 'view_string_in_page'){
+        icl_st_string_in_page($_GET['string_id']);
+        exit;
+    }
+
+    if(isset($_GET['icl_action']) && $_GET['icl_action'] == 'view_string_in_source'){
+        icl_st_string_in_source($_GET['string_id']);
+        exit;
+    }
+    
+    if ( get_magic_quotes_gpc() && $_GET['page'] == ICL_PLUGIN_FOLDER . '/menu/string-translation.php'){
+        $_POST = stripslashes_deep( $_POST );         
+    }
+                         
+    if(!isset($sitepress_settings['existing_content_language_verified']) || !$sitepress_settings['existing_content_language_verified']){
+        return;
+    }          
+    
+    if(!isset($sitepress_settings['st']['sw'])){
+        $sitepress_settings['st']['sw'] = array(
+            'blog_title' => 1,
+            'tagline' => 1,
+            'widget_titles' => 1,
+            'text_widgets' => 1
+        );        
+        $sitepress->save_settings($sitepress_settings); 
+        $init_all = true;
+    }
+    
+    if(!isset($sitepress_settings['st']['strings_per_page'])){
+        $sitepress_settings['st']['strings_per_page'] = 10;
+        $sitepress->save_settings($sitepress_settings); 
+    }elseif(isset($_GET['strings_per_page']) && $_GET['strings_per_page'] > 0){
+        $sitepress_settings['st']['strings_per_page'] = $_GET['strings_per_page'];
+        $sitepress->save_settings($sitepress_settings); 
+    }
+    
+    if(isset($_POST['iclt_st_sw_save']) || isset($init_all)){
+            if(isset($_POST['icl_st_sw']['blog_title']) || isset($init_all)){
+                icl_register_string('WP',__('Blog Title','sitepress'), get_option('blogname'));
+            }
+            if(isset($_POST['icl_st_sw']['tagline']) || isset($init_all)){
+                icl_register_string('WP',__('Tagline', 'sitepress'), get_option('blogdescription'));
+            }              
+            if(isset($_POST['icl_st_sw']['widget_titles']) || isset($init_all)){
+                __icl_st_init_register_widget_titles();
+            }  
+            
+            if(isset($_POST['icl_st_sw']['text_widgets']) || isset($init_all)){
+                // create a list of active widgets
+                $active_text_widgets = array();
+                $widgets = (array)get_option('sidebars_widgets');
+                foreach($widgets as $k=>$w){             
+                    if('wp_inactive_widgets' != $k && $k != 'array_version'){
+                        foreach($widgets[$k] as $v){
+                            if(preg_match('#text-([0-9]+)#i',$v, $matches)){
+                                $active_text_widgets[] = $matches[1];
+                            }                            
+                        }
+                    }
+                }
+                                                                
+                $widget_text = get_option('widget_text');
+                if(is_array($widget_text)){
+                    foreach($widget_text as $k=>$w){
+                        if(!empty($w) && isset($w['title']) && in_array($k, $active_text_widgets)){
+                            icl_register_string('Widgets', 'widget body - ' . md5(apply_filters('widget_text',$w['text'])), apply_filters('widget_text',$w['text']));
+                        }
+                    }
+                }
+            }  
+                    
+            if(isset($_POST['iclt_st_sw_save'])){
+                $updat_string_statuses = false;
+                $sitepress_settings['st']['sw'] = $_POST['icl_st_sw'];
+                if($sitepress_settings['st']['strings_language'] != $_POST['icl_st_sw']['strings_language']){
+                    $updat_string_statuses = true;
+                }
+                $sitepress_settings['st']['strings_language'] = $_POST['icl_st_sw']['strings_language'];
+                $sitepress->save_settings($sitepress_settings); 
+                if($updat_string_statuses){
+                    icl_update_string_status_all();
+                }
+                wp_redirect($_SERVER['REQUEST_URI'].'&updated=true');
+            }            
+    }
+    
+    // handle po file upload
+    if(isset($_POST['icl_po_upload'])){
+        global $icl_st_po_strings;
+        if($_FILES['icl_po_file']['size']==0){
+            $icl_st_err_str = __('File upload error', 'sitepress');
+        }else{
+            $lines = file($_FILES['icl_po_file']['tmp_name']);
+            $icl_st_po_strings = array();
+            
+            $fuzzy = 0;    
+            for($k = 0; $k < count($lines); $k++){
+                if(0 === strpos($lines[$k], '#, fuzzy')){
+                    $fuzzy = 1;
+                    $k++;
+                }                                                        
+                $int = preg_match('#msgid "(.+)"#im',trim($lines[$k]), $matches);
+                if($int){
+                    $string = str_replace('\"','"', $matches[1]);
+                    $int = preg_match('#msgstr "(.+)"#im',trim($lines[$k+1]),$matches);
+                    if($int){
+                        $translation = str_replace('\"','"',$matches[1]);
+                    }else{
+                        $translation = "";
+                    }
+                    
+                    $string_exists = $wpdb->get_var("
+                        SELECT id FROM {$wpdb->prefix}icl_strings 
+                        WHERE context='".$wpdb->escape($_POST['icl_st_i_context_new']?$_POST['icl_st_i_context_new']:$_POST['icl_st_i_context'])."' 
+                        AND name='".md5($string)."'");
+                    
+                    $icl_st_po_strings[] = array(     
+                        'string' => $string,
+                        'translation' => $translation,
+                        'fuzzy' => $fuzzy,
+                        'exists' => $string_exists
+                    );
+                    $k++;                        
+                    
+                }
+                if(!trim($lines[$k])){
+                    $fuzzy = 0;    
+                }
+            }            
+            if(empty($icl_st_po_strings)){
+                $icl_st_err_str = __('No string found', 'sitepress');
+            }
+        }
+    }
+    elseif(isset($_POST['icl_st_save_strings']) && !empty($_POST['icl_strings_selected'])){
+        $arr = array_intersect_key($_POST['icl_strings'], array_flip($_POST['icl_strings_selected']));
+        //$arr = array_map('html_entity_decode', $arr);         
+        if(isset($_POST['icl_st_po_language'])){
+            $arr_t = array_intersect_key($_POST['icl_translations'], array_flip($_POST['icl_strings_selected']));
+            $arr_f = array_intersect_key($_POST['icl_fuzzy'], array_flip($_POST['icl_strings_selected']));
+            //$arr_t = array_map('html_entity_decode', $arr_t);         
+        }   
+        
+        // see if the strings are already registered and have names
+        // case of adding translation
+        $res = $wpdb->get_results("                                                                                              
+            SELECT value, name 
+            FROM {$wpdb->prefix}icl_strings 
+            WHERE context = '{$_POST['icl_st_domain_name']}' AND value IN ('".join("','", array_map('mysql_real_escape_string', $arr))."')  
+        ");
+        if(!empty($res)){
+            foreach($res as $r){
+                $map[$r->value] = $r->name;
+            }
+        }
+         
+        foreach($arr as $k=>$string){
+            if(isset($map[$string])){
+                $name = $map[$string];
+            }else{
+                $name = md5($string);
+            }
+            $string_id = icl_register_string($_POST['icl_st_domain_name'], $name, $string);
+            if($string_id && isset($_POST['icl_st_po_language'])){
+                if($arr_t[$k] != ""){
+                    if($arr_f[$k]){
+                        $_status = ICL_STRING_TRANSLATION_NOT_TRANSLATED;
+                    }else{
+                        $_status = ICL_STRING_TRANSLATION_COMPLETE;
+                    }
+                    icl_add_string_translation($string_id, $_POST['icl_st_po_language'], $arr_t[$k], $_status);
+                    icl_update_string_status($string_id);
+                }                
+            }            
+        }        
+    }
+    
+    //handle po export
+    if(isset($_POST['icl_st_pie_e'])){
+        //force some filters
+        if(isset($_GET['status'])) unset($_GET['status']);
+        $_GET['show_results']='all';
+        if($_POST['icl_st_e_context']){
+            $_GET['context'] = $_POST['icl_st_e_context'];
+        }
+                                                    
+        $_GET['translation_language'] = $_POST['icl_st_e_language'];
+        $strings = icl_get_string_translations();
+        if(!empty($strings)){
+            $po = icl_st_generate_po_file($strings, !isset($_POST['icl_st_pe_translations']));
+        }else{
+            $po = "";  
+        }
+        if(!isset($_POST['icl_st_pe_translations'])){
+            $popot = 'pot';
+            $poname = $_POST['icl_st_e_context'] ? urlencode($_POST['icl_st_e_context']) : 'all_context'; 
+        }else{
+            $popot = 'po';
+            $poname = $_GET['translation_language'];
+        }
+        header("Content-Type: application/force-download");
+        header("Content-Type: application/octet-stream");
+        header("Content-Type: application/download");
+        header("Content-Disposition: attachment; filename=".$poname.'.'.$popot.";");
+        header("Content-Length: ". strlen($po));
+        echo $po;
+        exit(0);
+    }
+    
+    // handle string transkation request preview
+    elseif(isset($_POST['icl_st_action']) && $_POST['icl_st_action'] == 'preview'){
+        global $icl_st_preview_strings;
+        $_POST = stripslashes_deep($_POST);
+        if($_POST['strings']=='need'){
+            $icl_st_preview_strings = $wpdb->get_results("SELECT value FROM {$wpdb->prefix}icl_strings 
+                WHERE language = '".$sitepress->get_current_language()."' AND status <> " . ICL_STRING_TRANSLATION_COMPLETE);
+        }else{
+            $icl_st_preview_strings = $wpdb->get_results("SELECT value FROM {$wpdb->prefix}icl_strings WHERE id IN (".$wpdb->escape($_POST['strings']).")");
+        }        
+    }
+    
+    // hook into blog title and tag line
+    if($sitepress_settings['st']['sw']['blog_title']){
+        add_filter('option_blogname', 'icl_sw_filters_blogname');
+    }
+    if($sitepress_settings['st']['sw']['tagline']){
+        add_filter('option_blogdescription', 'icl_sw_filters_blogdescription');
+    }                                                                          
+    if($sitepress_settings['st']['sw']['widget_titles']){
+        add_filter('widget_title', 'icl_sw_filters_widget_title');
+    }
+    if($sitepress_settings['st']['sw']['text_widgets']){
+        add_filter('widget_text', 'icl_sw_filters_widget_text');
+    }                     
+    if($sitepress_settings['theme_localization_type']==1){
+        add_filter('gettext', 'icl_sw_filters_gettext', 9, 3);
+    }
+    
+    $widget_groups = $wpdb->get_results("SELECT option_name, option_value FROM {$wpdb->options} WHERE option_name LIKE 'widget\\_%'");
+    foreach($widget_groups as $w){
+        add_action('update_option_' . $w->option_name, 'icl_st_update_widget_title_actions', 5, 2);
+    }
+    
+    add_action('update_option_widget_text', 'icl_st_update_text_widgets_actions', 5, 2);
+    add_action('update_option_sidebars_widgets', '__icl_st_init_register_widget_titles');
+    
+    if($icl_st_err_str){
+        add_action('admin_notices', 'icl_st_admin_notices');
+    }
+    
+}
+
+function __icl_st_init_register_widget_titles(){
+    global $wpdb;        
+    
+    // create a list of active widgets
+    $active_widgets = array();
+    $widgets = (array)get_option('sidebars_widgets');    
+    
+    foreach($widgets as $k=>$w){                     
+        if('wp_inactive_widgets' != $k && $k != 'array_version'){
+            foreach($widgets[$k] as $v){                
+                $active_widgets[] = $v;
+            }
+        }
+    }                      
+    foreach($active_widgets as $aw){        
+        $int = preg_match('#-([0-9]+)$#i',$aw, $matches);
+        if($int){
+            $suffix = $matches[1];
+        }else{
+            $suffix = 1;
+        }
+        $name = preg_replace('#-[0-9]+#','',$aw);                
+        //if($name == 'rss-links') $name = 'rss';
+        
+        //$w = $wpdb->get_row("SELECT option_name, option_value FROM {$wpdb->options} WHERE option_name = 'widget_{$name}'");
+        //$value = unserialize($w->option_value);
+        $value = get_option("widget_".$name);
+        if(isset($value[$suffix]['title']) && $value[$suffix]['title']){
+            $w_title = $value[$suffix]['title'];     
+        }else{
+            $w_title = __icl_get_default_widget_title($aw);
+            $value[$suffix]['title'] = $w_title;
+            update_option("widget_".$name, $value);
+        }
+        
+        if($w_title){            
+            icl_register_string('Widgets', 'widget title - ' . md5(apply_filters('widget_title',$w_title)), apply_filters('widget_title',$w_title));                                    
+            
+        }
+    }    
+}
+
+function __icl_get_default_widget_title($id){
+    if(preg_match('#archives(-[0-9]+)?$#i',$id)){                        
+        $w_title = 'Archives';
+    }elseif(preg_match('#categories(-[0-9]+)?$#i',$id)){
+        $w_title = 'Categories';
+    }elseif(preg_match('#calendar(-[0-9]+)?$#i',$id)){
+        $w_title = 'Calendar';
+    }elseif(preg_match('#links(-[0-9]+)?$#i',$id)){
+        $w_title = 'Links';
+    }elseif(preg_match('#meta(-[0-9]+)?$#i',$id)){
+        $w_title = 'Meta';
+    }elseif(preg_match('#pages(-[0-9]+)?$#i',$id)){
+        $w_title = 'Pages';
+    }elseif(preg_match('#recent-posts(-[0-9]+)?$#i',$id)){
+        $w_title = 'Recent Posts';
+    }elseif(preg_match('#recent-comments(-[0-9]+)?$#i',$id)){
+        $w_title = 'Recent Comments';
+    }elseif(preg_match('#rss-links(-[0-9]+)?$#i',$id)){
+        $w_title = 'RSS';
+    }elseif(preg_match('#search(-[0-9]+)?$#i',$id)){
+        $w_title = 'Search';
+    }elseif(preg_match('#tag-cloud(-[0-9]+)?$#i',$id)){
+        $w_title = 'Tag Cloud';
+    }else{
+        $w_title = false;
+    }  
+    return $w_title;  
+}
+
+function icl_st_administration_menu(){
+    global $sitepress_settings, $sitepress;
+    if((!isset($sitepress_settings['existing_content_language_verified']) || !$sitepress_settings['existing_content_language_verified']) /*|| 2 > count($sitepress->get_active_languages())*/){
+        return;
+    }
+    add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('String translation','sitepress'), __('String translation','sitepress'), 'edit_others_pages', basename(ICL_PLUGIN_PATH).'/menu/string-translation.php');  
+}
+
+
+
+function icl_register_string($context, $name, $value){    
+    global $wpdb, $sitepress, $sitepress_settings;
+    // if the default language is not set up return without doing anything
+    if( 
+        !isset($sitepress_settings['existing_content_language_verified']) || 
+        !$sitepress_settings['existing_content_language_verified']
+    ){
+        return;
+    }       
+    
+    $language = $sitepress->get_default_language();
+    $res = $wpdb->get_row("SELECT id, value, status, language FROM {$wpdb->prefix}icl_strings WHERE context='".$wpdb->escape($context)."' AND name='".$wpdb->escape($name)."'");
+    if($res){
+        $string_id = $res->id;
+        $update_string = array();
+        if($value != $res->value){
+            $update_string['value'] = $value;
+        }
+        if($language != $res->language){
+            $update_string['language'] = $language;
+        }
+        if(!empty($update_string)){
+            $wpdb->update($wpdb->prefix.'icl_strings', $update_string, array('id'=>$string_id));
+            $wpdb->update($wpdb->prefix.'icl_string_translations', array('status'=>ICL_STRING_TRANSLATION_NEEDS_UPDATE), array('string_id'=>$string_id));
+            icl_update_string_status($string_id);
+        }        
+    }else{
+        if(!empty($value) && trim($value)){
+            $string = array(
+                'language' => $language,
+                'context' => $context,
+                'name' => $name,
+                'value' => $value,
+                'status' => ICL_STRING_TRANSLATION_NOT_TRANSLATED,
+            );
+            $wpdb->insert($wpdb->prefix.'icl_strings', $string);
+            $string_id = $wpdb->insert_id;
+        }
+    } 
+    if($sitepress_settings['modules']['absolute-links']['enabled'] && $sitepress_settings['modules']['absolute-links']['sticky_links_strings']){        
+        _icl_content_make_links_sticky($string_id, 'string', false);   
+    }
+    return $string_id; 
+}  
+
+function icl_st_is_registered_string($context, $name){
+    global $wpdb;
+    $string_id = $wpdb->get_var("
+        SELECT id 
+        FROM {$wpdb->prefix}icl_strings WHERE context='".$wpdb->escape($context)."' AND name='".$wpdb->escape($name)."'");
+    return $string_id;
+}
+
+function icl_st_string_has_translations($context, $name){
+    global $wpdb;
+    $sql = "
+        SELECT COUNT(st.id) 
+        FROM {$wpdb->prefix}icl_string_translations st 
+        JOIN {$wpdb->prefix}icl_strings s ON s.id=st.string_id
+        WHERE s.name='".$wpdb->escape($name)."' AND s.context='".$wpdb->escape($context)."'
+    ";
+    return $wpdb->get_var($sql);
+}
+
+function icl_rename_string($context, $old_name, $new_name){
+    global $wpdb;
+    $wpdb->update($wpdb->prefix.'icl_strings', array('name'=>$new_name), array('context'=>$context, 'name'=>$old_name));
+}
+
+function icl_update_string_status($string_id){
+    global $wpdb, $sitepress, $sitepress_settings;    
+    $st = $wpdb->get_results("SELECT language, status FROM {$wpdb->prefix}icl_string_translations WHERE string_id={$string_id}");    
+    
+    if($st){                
+        foreach($st as $t){
+            if($sitepress_settings['st']['strings_language'] != $t->language){
+                $translations[$t->language] = $t->status;
+            }
+        }  
+        
+        $active_languages = $sitepress->get_active_languages();
+        
+        if(empty($translations) || max($translations) == ICL_STRING_TRANSLATION_NOT_TRANSLATED){
+            $status = ICL_STRING_TRANSLATION_NOT_TRANSLATED;
+        }elseif(count($translations) < count($active_languages) - intval(in_array($sitepress_settings['st']['strings_language'], array_keys($active_languages)))){
+            if(in_array(ICL_STRING_TRANSLATION_NEEDS_UPDATE,$translations)){
+                $status = ICL_STRING_TRANSLATION_NEEDS_UPDATE;
+            }elseif(in_array(ICL_STRING_TRANSLATION_COMPLETE,$translations)){
+                $status = ICL_STRING_TRANSLATION_PARTIAL;            
+            }else{
+                $status = ICL_STRING_TRANSLATION_NOT_TRANSLATED;
+            }            
+        }elseif(ICL_STRING_TRANSLATION_NEEDS_UPDATE == array_unique($translations)){            
+            $status = ICL_STRING_TRANSLATION_NEEDS_UPDATE;
+        }else{
+            if(in_array(ICL_STRING_TRANSLATION_NEEDS_UPDATE,$translations)){
+                $status = ICL_STRING_TRANSLATION_NEEDS_UPDATE;
+            }elseif(in_array(ICL_STRING_TRANSLATION_NOT_TRANSLATED,$translations)){
+                $status = ICL_STRING_TRANSLATION_PARTIAL;            
+            }else{
+                $status = ICL_STRING_TRANSLATION_COMPLETE;            
+            }
+        }
+    }else{
+        $status = ICL_STRING_TRANSLATION_NOT_TRANSLATED;        
+    }    
+    $wpdb->update($wpdb->prefix.'icl_strings', array('status'=>$status), array('id'=>$string_id));
+    return $status;    
+}
+
+function icl_update_string_status_all(){
+    global $wpdb;
+    $res = $wpdb->get_col("SELECT id FROM {$wpdb->prefix}icl_strings");
+    foreach($res as $id){
+        icl_update_string_status($id);
+    }
+}
+
+function icl_unregister_string($context, $name){
+    global $wpdb; 
+    $string_id = $wpdb->get_var("SELECT id FROM {$wpdb->prefix}icl_strings WHERE context='".$wpdb->escape($context)."' AND name='".$wpdb->escape($name)."'");       
+    if($string_id){
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_strings WHERE id=" . $string_id);
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_string_translations WHERE string_id=" . $string_id);
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_string_positions WHERE string_id=" . $string_id);
+    }
+    do_action('icl_st_unregister_string', $string_id);
+}  
+
+function __icl_unregister_string_multi($arr){
+    global $wpdb; 
+    $str = join(',', array_map('intval', $arr));
+    $wpdb->query("
+        DELETE s.*, t.* FROM {$wpdb->prefix}icl_strings s LEFT JOIN {$wpdb->prefix}icl_string_translations t ON s.id = t.string_id
+        WHERE s.id IN ({$str})");
+    $wpdb->query("DELETE FROM {$wpdb->prefix}icl_string_positions WHERE string_id IN ({$str})");
+    do_action('icl_st_unregister_string_multi', $arr);
+}  
+
+function icl_t($context, $name, $original_value=false, &$has_translation=null){
+    global $wpdb, $sitepress, $sitepress_settings;
+        
+    // if the default language is not set up return
+    if(!isset($sitepress_settings['existing_content_language_verified'])){        
+        if(isset($has_translation)) $has_translation = false;
+        return $original_value !== false ? $original_value : $name;
+    }   
+       
+    if(is_admin()){
+        $current_language = $sitepress->get_admin_language();
+    }else{
+        $current_language = $sitepress->get_current_language();
+    }   
+    $default_language = $sitepress_settings['st']['strings_language'] ? $sitepress_settings['st']['strings_language'] : $sitepress->get_default_language();
+    
+    if($current_language == $default_language && $original_value){
+        
+        $ret_val = $original_value;
+        if(isset($has_translation)) $has_translation = false;
+        
+    }else{
+        $result = icl_t_cache_lookup($context, $name); 
+        if($result === false || !$result['translated'] && $original_value){        
+            $ret_val = $original_value;    
+            if(isset($has_translation)) $has_translation = false;
+        }else{
+            $ret_val = $result['value'];    
+            if(isset($has_translation)) $has_translation = true;
+        }
+        
+    }
+    return $ret_val;
+}
+
+function icl_add_string_translation($string_id, $language, $value, $status = false){
+    global $wpdb;
+    
+    $res = $wpdb->get_row("SELECT id, value, status FROM {$wpdb->prefix}icl_string_translations WHERE string_id='".$wpdb->escape($string_id)."' AND language='".$wpdb->escape($language)."'");
+    if($res){
+        $st_id = $res->id;
+        $st_update = array();
+        if($value != $res->value){
+            $st_update['value'] = $value;
+        }
+        if($status){
+            $st_update['status'] = $status;
+        }elseif($status === ICL_STRING_TRANSLATION_NOT_TRANSLATED){
+            $st_update['status'] = ICL_STRING_TRANSLATION_NOT_TRANSLATED;
+        }        
+        if(!empty($st_update)){
+            $wpdb->update($wpdb->prefix.'icl_string_translations', $st_update, array('id'=>$st_id));
+        }        
+    }else{
+        if(!$status){
+            $status = ICL_STRING_TRANSLATION_NOT_TRANSLATED;
+        }
+        $st = array(
+            'string_id' => $string_id,
+            'language'  => $language,
+            'value'     => $value,
+            'status'    => $status,
+        );
+        $wpdb->insert($wpdb->prefix.'icl_string_translations', $st);
+        $st_id = $wpdb->insert_id;
+    }    
+
+    _icl_content_fix_links_to_translated_content($st_id, $language, 'string');    
+                                         
+    icl_update_string_status($string_id);
+    
+    do_action('icl_st_add_string_translation', $st_id);
+    
+    return $st_id;
+}
+
+function icl_get_string_id($string, $context){
+    global $wpdb;
+    $string = $wpdb->escape($string);
+    $id = (int) $wpdb->get_var("SELECT id FROM {$wpdb->prefix}icl_strings WHERE value='{$string}' AND context='{$context}'");    
+    return $id;
+}
+
+function icl_get_string_translations($offset=0){
+    global $wpdb, $sitepress, $sitepress_settings, $wp_query, $icl_st_string_translation_statuses;
+    
+    $extra_cond = "";
+    $status_filter = isset($_GET['status']) ? intval($_GET['status']) : false;
+    $search_filter = isset($_GET['search']) ? $_GET['search'] : false;
+    $exact_match   = isset($_GET['em']) ? $_GET['em'] == 1 : false;
+    
+    if($status_filter !== false){
+        if($status_filter == ICL_STRING_TRANSLATION_COMPLETE){
+            $extra_cond .= " AND status = " . ICL_STRING_TRANSLATION_COMPLETE;
+        }else{
+            $extra_cond .= " AND status IN (" . ICL_STRING_TRANSLATION_PARTIAL . "," . ICL_STRING_TRANSLATION_NEEDS_UPDATE . "," . ICL_STRING_TRANSLATION_NOT_TRANSLATED . ")";
+        }        
+    }
+    
+    if($search_filter != false){
+        if($exact_match){
+            $extra_cond .= " AND value = '". $wpdb->escape($search_filter)."' ";            
+        }else{
+            $extra_cond .= " AND value LIKE '%". $wpdb->escape($search_filter)."%' ";            
+        }
+    }
+    
+    $context_filter = isset($_GET['context']) ? $_GET['context'] : false;
+    if($context_filter !== false){
+        $extra_cond .= " AND context = '" . $wpdb->escape($context_filter) . "'";
+    }
+    
+    if(isset($_GET['show_results']) && $_GET['show_results']=='all'){
+        $limit = 9999;
+        $offset = 0;
+    }else{       
+        $limit = $sitepress_settings['st']['strings_per_page']; 
+        if(!isset($_GET['paged'])) $_GET['paged'] = 1;
+        $offset = ($_GET['paged']-1)*$limit;
+    }
+    
+    // removed check for language = default lang        
+    $res = $wpdb->get_results("
+        SELECT SQL_CALC_FOUND_ROWS id AS string_id, language AS string_language, context, name, value, status                
+        FROM  {$wpdb->prefix}icl_strings
+        WHERE 
+            1
+            {$extra_cond}
+        ORDER BY string_id DESC
+        LIMIT {$offset},{$limit}
+    ", ARRAY_A);
+        
+    $wp_query->found_posts = $wpdb->get_var("SELECT FOUND_ROWS()");
+    $wp_query->query_vars['posts_per_page'] = $limit;
+    $wp_query->max_num_pages = ceil($wp_query->found_posts/$limit);
+    
+    if($res){
+        $extra_cond = '';
+        if(isset($_GET['translation_language'])){
+            $extra_cond .= " AND language='".$wpdb->escape($_GET['translation_language'])."'";    
+        }
+        
+        foreach($res as $row){
+            $string_translations[$row['string_id']] = $row;
+            $tr = $wpdb->get_results("
+                SELECT id, language, status, value  
+                FROM {$wpdb->prefix}icl_string_translations 
+                WHERE string_id={$row['string_id']} {$extra_cond}
+            ", ARRAY_A);
+            if($tr){
+                foreach($tr as $t){
+                    $string_translations[$row['string_id']]['translations'][$t['language']] = $t;
+                }                
+            }
+            
+        }
+    }
+    return $string_translations;
+}
+
+function icl_get_strigs_tracked_in_pages($string_translations){
+    global $wpdb;
+    // get string position in page - if found
+    $found_strings = $strings_in_page = array();
+    foreach(array_keys((array)$string_translations) as $string_id){
+        $found_strings[] = $string_id;
+    }
+    if($found_strings){
+        $res = $wpdb->get_results("
+            SELECT kind, string_id  FROM {$wpdb->prefix}icl_string_positions 
+            WHERE string_id IN (".implode(',', $found_strings).")");
+        foreach($res as $row){
+            $strings_in_page[$row->kind][$row->string_id] = true;
+        }
+    }
+    return $strings_in_page;
+}
+
+function icl_sw_filters_blogname($val){
+    return icl_t('WP', 'Blog Title', $val);
+}
+
+function icl_sw_filters_blogdescription($val){
+    return icl_t('WP', 'Tagline', $val);
+}
+
+function icl_sw_filters_widget_title($val){
+    return icl_t('Widgets', 'widget title - ' . md5($val) , $val);    
+}
+
+function icl_sw_filters_widget_text($val){    
+    $val = icl_t('Widgets', 'widget body - ' . md5($val) , $val);
+    return $val;
+}
+
+function icl_sw_filters_gettext($translation, $text, $domain){
+    global $sitepress_settings;
+    $has_translation = 0;
+    
+    $dbt = debug_backtrace();    
+    $dbt4 = str_replace('\\','/',$dbt[4]['file']);
+    $wp_plugin_dir = str_replace('\\','/',WP_PLUGIN_DIR);
+    
+    if(0 === strpos($dbt4, $wp_plugin_dir)){        
+        if(dirname($dbt4) == $wp_plugin_dir){
+            $plugin_folder = basename(str_replace($wp_plugin_dir, '', $dbt4));    
+        }else{
+            $exp = explode('/', ltrim(str_replace($wp_plugin_dir, '', $dbt4),'/'));            
+            $plugin_folder = $exp[0];    
+        }
+        $context = 'plugin ' . $plugin_folder;
+    }else{
+        $context = ($domain != 'default') ? 'theme ' . $domain : 'theme';
+    }
+    
+    // track strings if the user has enabled this and if it's and editor or admin
+    if($sitepress_settings['st']['track_strings'] && current_user_can('edit_others_posts')){
+        icl_st_track_string($text, $context, ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_PAGE);
+    }   
+    
+    $ret_translation = icl_t($context, md5($text), $text, $has_translation);
+    if(false === $has_translation){
+        $ret_translation = $translation;   
+    }
+    
+    if(isset($_GET['icl_string_track_value']) && isset($_GET['icl_string_track_context']) 
+        && stripslashes($_GET['icl_string_track_context']) == $context && stripslashes($_GET['icl_string_track_value']) == $text){
+            $ret_translation = '<span style="background-color:'.$sitepress_settings['st']['hl_color'].'">' . $ret_translation . '</span>';
+            
+    }
+    
+    return $ret_translation;
+}
+
+function icl_st_update_string_actions($context, $name, $old_value, $new_value){
+    global $wpdb;
+    if($new_value != $old_value){        
+        $string = $wpdb->get_row("SELECT id, value, status FROM {$wpdb->prefix}icl_strings WHERE context='{$context}' AND name='{$name}'");    
+        if(!$string){
+            icl_register_string($context, $name, $new_value);
+            return;
+        }
+        $wpdb->update($wpdb->prefix . 'icl_strings', array('value'=>$new_value), array('id'=>$string->id));
+        if($string->status == ICL_STRING_TRANSLATION_COMPLETE || $string->status == ICL_STRING_TRANSLATION_PARTIAL){
+            $wpdb->update($wpdb->prefix . 'icl_string_translations', array('status'=>ICL_STRING_TRANSLATION_NEEDS_UPDATE), array('string_id'=>$string->id));
+            $wpdb->update($wpdb->prefix . 'icl_strings', array('status'=>ICL_STRING_TRANSLATION_NEEDS_UPDATE), array('id'=>$string->id));
+        }
+        
+        if($context == 'Widgets' && $new_value){
+            if(0 === strpos($name, 'widget title - ')){
+                icl_rename_string('Widgets', 'widget title - ' . md5($old_value), 'widget title - ' . md5($new_value));
+            }elseif(0 === strpos($name, 'widget body - ')){
+                icl_rename_string('Widgets', 'widget body - ' . md5($old_value), 'widget body - ' . md5($new_value));
+            }
+        }        
+        
+    }
+    
+}
+
+function icl_st_update_blogname_actions($old, $new){
+    icl_st_update_string_actions('WP', 'Blog Title', $old, $new);
+}
+
+function icl_st_update_blogdescription_actions($old, $new){
+    icl_st_update_string_actions('WP', 'Tagline', $old, $new);
+}
+
+function icl_st_update_widget_title_actions($old_options, $new_options){        
+    foreach($new_options as $k=>$o){
+        if(isset($o['title'])){
+            if(isset($old_options[$k]['title']) && $old_options[$k]['title']){
+                icl_st_update_string_actions('Widgets', 'widget title - ' . md5(apply_filters('widget_title', $old_options[$k]['title'])), apply_filters('widget_title', $old_options[$k]['title']), apply_filters('widget_title', $o['title']));        
+            }else{                
+                if($new_options[$k]['title']){          
+                    icl_register_string('Widgets', 'widget title - ' . md5(apply_filters('widget_title', $new_options[$k]['title'])), apply_filters('widget_title', $new_options[$k]['title']));
+                }                
+            }            
+        }
+    }    
+}
+
+function icl_st_update_text_widgets_actions($old_options, $new_options){
+    global $sitepress_settings;
+    
+    // remove filter for showing permalinks instead of sticky links while saving
+    $GLOBALS['__disable_absolute_links_permalink_filter'] = 1;
+    
+    $widget_text = get_option('widget_text');    
+    if(is_array($widget_text)){
+        foreach($widget_text as $k=>$w){
+            if(isset($old_options[$k]['text']) && trim($old_options[$k]['text']) && $old_options[$k]['text'] != $w['text']){
+                icl_st_update_string_actions('Widgets', 'widget body - ' . md5(apply_filters('widget_text', $old_options[$k]['text'])), apply_filters('widget_text', $old_options[$k]['text']), apply_filters('widget_text', $w['text']));
+            }elseif($new_options[$k]['text'] && $old_options[$k]['text']!=$new_options[$k]['text']){
+                icl_register_string('Widgets', 'widget body - ' . md5(apply_filters('widget_text', $new_options[$k]['text'])), apply_filters('widget_text', $new_options[$k]['text']));
+            }
+        }
+    }
+
+    // add back the filter for showing permalinks instead of sticky links after saving
+    unset($GLOBALS['__disable_absolute_links_permalink_filter']);
+    
+}
+
+function icl_t_cache_lookup($context, $name){
+    global $sitepress_settings;
+    static $icl_st_cache;
+    if(!isset($icl_st_cache)){
+        $icl_st_cache = array();
+    }
+    if(isset($icl_st_cache[$context]) && empty($icl_st_cache[$context])){  // cache semi-hit - string is not in the db
+        $ret_value = false;            
+    }elseif(!isset($icl_st_cache[$context][$name])){ //cache MISS
+    
+        global $sitepress, $wpdb;        
+        $current_language = $sitepress->get_current_language();     
+        $default_language = $sitepress->get_default_language();
+        
+        global $switched, $switched_stack;        
+        if(isset($switched) && $switched){
+            $prev_blog_id = $wpdb->blogid;
+            $wpdb->set_blog_id($switched_stack[0]);
+        }
+        $res = $wpdb->get_results("
+            SELECT s.name, s.value, t.value AS translation_value, t.status
+            FROM  {$wpdb->prefix}icl_strings s
+            LEFT JOIN {$wpdb->prefix}icl_string_translations t ON s.id = t.string_id
+            WHERE s.context = '{$context}'
+                AND (t.language = '{$current_language}' OR t.language IS NULL)
+            ", ARRAY_A);
+        if(isset($switched) && $switched){
+            $wpdb->set_blog_id($prev_blog_id);
+        }            
+        if($res){
+            foreach($res as $row){
+                if($row['status'] != ICL_STRING_TRANSLATION_COMPLETE || empty($row['translation_value'])){
+                    $icl_st_cache[$context][$row['name']]['translated'] = false;
+                    $icl_st_cache[$context][$row['name']]['value'] = $row['value'];
+                }else{
+                    $icl_st_cache[$context][$row['name']]['translated'] = true;
+                    $icl_st_cache[$context][$row['name']]['value'] = $row['translation_value'];
+                }
+            }
+            $ret_value = $icl_st_cache[$context][$name];            
+        }else{
+            $icl_st_cache[$context] = array();    
+            $ret_value = false;
+        }  
+        
+    }else{ //cache HIT
+        $ret_value = $icl_st_cache[$context][$name];
+    }  
+    
+    // special case of WP strings    
+    if($context == 'WP' && 
+        ($name == 'Blog Title' && is_null($sitepress_settings['st']['sw']['blog_title']) 
+            || $name == 'Tagline' && is_null($sitepress_settings['st']['sw']['tagline'])))
+        {
+            $icl_st_cache[$context] = array();
+        }
+    elseif($context == 'Widgets' &&
+        (preg_match('#^widget title - #', $name) && is_null($sitepress_settings['st']['sw']['widget_titles']) 
+            || preg_match('#^widget body - #', $name) && is_null($sitepress_settings['st']['sw']['text_widgets'])))
+        {
+            $icl_st_cache[$context] = array();
+        }  
+    return $ret_value;    
+}
+
+function icl_st_get_contexts($status){
+    global $wpdb, $sitepress;    
+    $extra_cond = '';
+    
+    if($status !== false){
+        if($status == ICL_STRING_TRANSLATION_COMPLETE){
+            $extra_cond .= " AND status = " . ICL_STRING_TRANSLATION_COMPLETE;
+        }else{
+            $extra_cond .= " AND status IN (" . ICL_STRING_TRANSLATION_PARTIAL . "," . ICL_STRING_TRANSLATION_NEEDS_UPDATE . "," . ICL_STRING_TRANSLATION_NOT_TRANSLATED . ")";
+        }        
+    }
+    
+    $results = $wpdb->get_results("
+        SELECT context, COUNT(context) AS c FROM {$wpdb->prefix}icl_strings 
+        WHERE language='{$sitepress->get_current_language()}' {$extra_cond}
+        GROUP BY context 
+        ORDER BY context ASC");
+    return $results;
+}
+
+function icl_st_admin_notices(){
+    global $icl_st_err_str;
+    if($icl_st_err_str){
+        echo '<div class="error"><p>' . $icl_st_err_str . '</p></div>';
+    }    
+}
+
+function icl_st_scan_theme_files($dir = false, $recursion = 0){
+    require_once ICL_PLUGIN_PATH . '/inc/potx.inc';
+    static $scan_stats = false;
+    static $recursion, $scanned_files = array();
+    global $icl_scan_theme_found_domains, $sitepress, $sitepress_settings;
+    if($dir === false){  
+        $dir = TEMPLATEPATH;
+    }
+    if(!$scan_stats){
+        $scan_stats = sprintf(__('Scanning theme folder: %s', 'sitepress'),$dir) . PHP_EOL;
+    }    
+                            
+    $dh = opendir($dir);    
+    while(false !== ($file = readdir($dh))){
+        if($file=="." || $file=="..") continue;
+        
+        if(is_dir($dir . "/" . $file)){
+            $recursion++;
+            $scan_stats .= str_repeat("\t",$recursion) . sprintf(__('Opening folder: %s', 'sitepress'), $dir . "/" . $file) . PHP_EOL;
+            icl_st_scan_theme_files($dir . "/" . $file, $recursion);            
+            $recursion--;
+        }elseif(preg_match('#(\.php|\.inc)$#i', $file)){     
+            // THE potx way
+            $scan_stats .=  str_repeat("\t",$recursion) . sprintf(__('Scanning file: %s', 'sitepress'), $dir . "/" . $file) . PHP_EOL;
+            $scanned_files[] = $dir . "/" . $file;
+            _potx_process_file($dir . "/" . $file, 0, '__icl_st_scan_theme_files_store_results','_potx_save_version', POTX_API_7);
+        }else{
+            $scan_stats .=  str_repeat("\t",$recursion) . sprintf(__('Skipping file: %s', 'sitepress'), $dir . "/" . $file) . PHP_EOL;    
+        }
+    }
+    
+    if($dir == TEMPLATEPATH && TEMPLATEPATH != STYLESHEETPATH){
+        static $double_scan = true;
+        icl_st_scan_theme_files(STYLESHEETPATH);            
+        $double_scan = false;
+    }
+    
+    if(!$recursion && !$double_scan){
+        global $__icl_registered_strings;
+        $scan_stats .= __('Done scanning files', 'sitepress') . PHP_EOL;
+            $sitepress_settings['st']['theme_localization_domains'] = array_keys($icl_scan_theme_found_domains);
+            $sitepress->save_settings($sitepress_settings);
+            closedir($dh);
+            $scan_stats_all = __('= Your theme was scanned for texts =', 'sitepress') . '<br />' . 
+                          __('The following files were processed:', 'sitepress') . '<br />' .
+                          '<ol style="font-size:10px;"><li>' . join('</li><li>', $scanned_files) . '</li></ol>' . 
+                          sprintf(__('WPML found %s strings. They were added to the string translation table.','sitepress'),count($__icl_registered_strings)) . 
+                          '<br /><a href="#" onclick="jQuery(this).next().toggle();return false;">' . __('More details', 'sitepress') . '</a>'.
+                          '<textarea style="display:none;width:100%;height:150px;font-size:10px;">' . $scan_stats . '</textarea>'; 
+            return $scan_stats_all;
+    }
+    
+}
+
+function __icl_st_scan_theme_files_store_results($string, $domain, $file, $line){
+    global $icl_scan_theme_found_domains;
+    
+    $string = str_replace(array('\"',"\\'"), array('"',"'"), $string);
+    
+    if(!isset($icl_scan_theme_found_domains[$domain])){
+        $icl_scan_theme_found_domains[$domain] = true;
+    }
+    global $wpdb, $__icl_registered_strings;
+    if(!isset($__icl_registered_strings)){
+        $__icl_registered_strings = array();
+        
+        // clear existing entries (both source and page type)
+        $context  = $domain ? 'theme ' . $domain : 'theme';
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_string_positions WHERE string_id IN 
+            (SELECT id FROM {$wpdb->prefix}icl_strings WHERE context = '{$context}')");        
+    }
+    
+    if(!isset($__icl_registered_strings[$domain.'||'.$string])){
+        if(!$domain){
+            $context = 'theme';
+        }else{
+            $context = 'theme ' . $domain;            
+        }        
+        icl_register_string($context, md5($string), $string);
+        $__icl_registered_strings[$domain.'||'.$string] = true;
+    }                
+    
+    // store position in source
+    icl_st_track_string($string, $context, ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_SOURCE, $file, $line);              
+}
+
+
+
+function icl_st_scan_plugin_files($plugin, $recursion = 0){
+    require_once ICL_PLUGIN_PATH . '/inc/potx.inc';
+    static $recursion, $scanned_files = array();
+    static $scan_stats = false;
+    global $icl_scan_plugin_found_domains, $icl_st_p_scan_plugin_id,
+           $sitepress, $sitepress_settings;
+    
+    if(!$recursion){
+        $icl_st_p_scan_plugin_id = str_replace(WP_PLUGIN_DIR .'/', '', $plugin);
+        $icl_st_p_scan_plugin_id = str_replace(WPMU_PLUGIN_DIR .'/', '', $icl_st_p_scan_plugin_id);
+    }
+    
+    if(is_file($plugin) && !$recursion){ // case of one-file plugins
+        $scan_stats = sprintf(__('Scanning file: %s', 'sitepress'), $plugin) . PHP_EOL;
+        _potx_process_file($plugin, 0, '__icl_st_scan_plugin_files_store_results','_potx_save_version', POTX_API_7);                    
+        $scanned_files[] = $plugin;
+    }else{
+        $dh = opendir($plugin);    
+        while(false !== ($file = readdir($dh))){
+            if(0 === strpos($file, '.')) continue;
+            if(is_dir($plugin . "/" . $file)){
+                $recursion++;
+                $scan_stats .= str_repeat("\t",$recursion-1) . sprintf(__('Opening folder: %s', 'sitepress'), $dir . "/" . $file) . PHP_EOL;
+                icl_st_scan_plugin_files($plugin . "/" . $file, $recursion);            
+                $recursion--;
+            }elseif(preg_match('#(\.php|\.inc)$#i', $file)){     
+                $scan_stats .=  str_repeat("\t",$recursion) . sprintf(__('Scanning file: %s', 'sitepress'), $dir . "/" . $file) . PHP_EOL;
+                $scanned_files[] = $dir . "/" . $file;
+                _potx_process_file($plugin . "/" . $file, 0, '__icl_st_scan_plugin_files_store_results','_potx_save_version', POTX_API_7);
+            }else{
+                $scan_stats .=  str_repeat("\t",$recursion) . sprintf(__('Skipping file: %s', 'sitepress'), $dir . "/" . $file) . PHP_EOL;    
+            }
+        }        
+    }
+    
+    
+    if(!$recursion){
+        global $__icl_registered_strings;
+        if(is_null($__icl_registered_strings)){
+            $__icl_registered_strings = array();    
+        }        
+        $scan_stats .= __('Done scanning files', 'sitepress') . PHP_EOL;                    
+        
+        /*
+        if(is_array($icl_scan_plugin_found_domains)){
+            $existing_domains = $sitepress_settings['st']['plugins_localization_domains'];
+            if(is_array($existing_domains)){
+                $sitepress_settings['st']['plugins_localization_domains'] = array_unique(array_merge(array_keys($icl_scan_plugin_found_domains), $existing_domains));
+            }else{
+                $sitepress_settings['st']['plugins_localization_domains'] = array_keys($icl_scan_plugin_found_domains);
+            }
+            $sitepress->save_settings($sitepress_settings);
+        }
+        */
+        
+        unset($icl_st_p_scan_plugin_id);        
+        $scan_stats = '<textarea style="width:100%;height:150px;font-size:10px;">' . $scan_stats . "\n" .
+                       count($scanned_files) . ' scanned files' . "\n";    
+        if(count($__icl_registered_strings)){
+            $scan_stats .=  sprintf(__('WPML found %s strings. They were added to the string translation table.','sitepress'),count($__icl_registered_strings)) . "\n";
+        }else{
+            $scan_stats .=  __('No strings found.','sitepress') . "\n";
+        }
+        $scan_stats .= '</textarea>';
+                        
+                       
+        
+        return $scan_stats;
+    }    
+    
+}
+
+function __icl_st_scan_plugin_files_store_results($string, $domain, $file, $line){
+    global $icl_scan_plugin_found_domains, $icl_st_p_scan_plugin_id;
+    
+    $string = str_replace(array('\"',"\\'"), array('"',"'"), $string);
+        
+    //if(!isset($icl_scan_plugin_found_domains[$domain])){
+    //    $icl_scan_plugin_found_domains[$domain] = true;
+    //}    
+    global $wpdb, $__icl_registered_strings;
+    if(empty($__icl_registered_strings) ){
+        $__icl_registered_strings = array();
+        
+        // clear existing entries (both source and page type)        
+        $context  = $icl_st_p_scan_plugin_id ? 'plugin ' . $icl_st_p_scan_plugin_id : 'plugins';
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_string_positions WHERE string_id IN 
+            (SELECT id FROM {$wpdb->prefix}icl_strings WHERE context = '{$context}')");
+    }
+    
+    if(!isset($__icl_registered_strings[$icl_st_p_scan_plugin_id.'||'.$string])){
+        if(!$domain){
+            icl_register_string('plugins', md5($string), $string);
+        }else{
+            icl_register_string('plugin ' . $icl_st_p_scan_plugin_id, md5($string), $string);
+        }        
+        $__icl_registered_strings[$icl_st_p_scan_plugin_id.'||'.$string] = true;
+    }  
+    
+    // store position in source
+    icl_st_track_string($string, 'plugin ' . $icl_st_p_scan_plugin_id, ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_SOURCE, $file, $line);              
+    
+}
+
+function get_theme_localization_stats(){
+    global $sitepress_settings, $wpdb;
+    $stats = false;
+    if(is_array($sitepress_settings['st']['theme_localization_domains'])){    
+        foreach($sitepress_settings['st']['theme_localization_domains'] as $domain){
+            $domains[] = $domain ? 'theme ' . $domain : 'theme';
+        }
+        $results = $wpdb->get_results("
+            SELECT context, status, COUNT(id) AS c 
+            FROM {$wpdb->prefix}icl_strings
+            WHERE context IN ('".join("','",$domains)."')
+            GROUP BY context, status            
+        ");
+        foreach($results as $r){
+            if(!isset($stats[$r->context]['complete'])){
+                $stats[$r->context]['complete'] = 0;
+            }
+            if(!isset($stats[$r->context]['incomplete'])){
+                $stats[$r->context]['incomplete'] = 0;
+            }            
+            if($r->status == ICL_STRING_TRANSLATION_COMPLETE){
+                $stats[$r->context]['complete'] = $r->c; 
+            }else{
+                $stats[$r->context]['incomplete'] += $r->c; 
+            }
+            
+        }
+    }
+   return $stats; 
+}
+
+function get_plugin_localization_stats(){
+    global $sitepress_settings, $wpdb;
+    $stats = false;
+
+    $results = $wpdb->get_results("
+        SELECT context, status, COUNT(id) AS c 
+        FROM {$wpdb->prefix}icl_strings
+        WHERE context LIKE ('plugin %')
+        GROUP BY context, status            
+    ");
+    
+    foreach($results as $r){
+        if(!isset($stats[$r->context]['complete'])){
+            $stats[$r->context]['complete'] = 0;
+        }
+        if(!isset($stats[$r->context]['incomplete'])){
+            $stats[$r->context]['incomplete'] = 0;
+        }            
+        if($r->status == ICL_STRING_TRANSLATION_COMPLETE){
+            $stats[$r->context]['complete'] = $r->c; 
+        }else{
+            $stats[$r->context]['incomplete'] += $r->c; 
+        }
+        
+    }
+    
+    return $stats;     
+}
+
+function icl_st_generate_po_file($strings, $potonly = false){
+    global $wpdb;
+    
+    $po = "";
+    $po .= '# This file was generated by WPML' . PHP_EOL;
+    $po .= '# WPML is a WordPress plugin that can turn any WordPress or WordPressMU site into a full featured multilingual content management system.' . PHP_EOL;    
+    $po .= '# http://wpml.org' . PHP_EOL;
+    $po .= 'msgid ""' . PHP_EOL;
+    $po .= 'msgstr ""' . PHP_EOL;
+    $po .= '"Content-Type: text/plain; charset=utf-8\n"' . PHP_EOL;
+    $po .= '"Content-Transfer-Encoding: 8bit\n"' . PHP_EOL;
+    $po .= '"Project-Id-Version: \n"' . PHP_EOL;
+    $po .= '"POT-Creation-Date: \n"' . PHP_EOL;
+    $po .= '"PO-Revision-Date: \n"' . PHP_EOL;
+    $po .= '"Last-Translator: \n"' . PHP_EOL;
+    $po .= '"Language-Team: \n"' . PHP_EOL;
+    $po .= '"MIME-Version: 1.0\n"' . PHP_EOL;    
+    
+    foreach($strings as $s){
+        $ids[] = $s['string_id'];
+    }
+    if(!empty($ids)){
+        $res = $wpdb->get_results("
+            SELECT string_id, position_in_page 
+            FROM {$wpdb->prefix}icl_string_positions 
+            WHERE kind = " . ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_SOURCE . " AND string_id IN(".join(',',$ids).")");
+        foreach($res as $row){
+            $positions[$row->string_id] = $row->position_in_page;
+        }
+        
+    }
+    
+    
+    foreach($strings as $s){
+        $po .= PHP_EOL;        
+        if(!$potonly && isset($s['translations']) && isset($s['translations'][key($s['translations'])]['value'])){
+            $translation = $s['translations'][key($s['translations'])]['value'];
+            if($translation != '' && $s['translations'][key($s['translations'])]['status'] != ICL_STRING_TRANSLATION_COMPLETE){
+                $po .= '#, fuzzy' . PHP_EOL;
+            }
+        }else{
+            $translation = '';            
+        }
+        if(isset($positions[$s['string_id']])){           
+            $exp = explode('::',$positions[$s['string_id']]);
+            $file = file($exp[0]);
+        }
+        $po .= '# ' . @trim($file[$exp[1]-2])  . PHP_EOL;
+        $po .= '# ' . @trim($file[$exp[1]-1])  . PHP_EOL;
+        $po .= '# ' . @trim($file[$exp[1]])  . PHP_EOL;
+        $po .= 'msgid "'.str_replace('"', '\"', $s['value']).'"' . PHP_EOL;
+        $po .= 'msgstr "'.str_replace('"', '\"', $translation).'"' . PHP_EOL;
+    }
+    return $po;
+}
+
+function icl_st_track_string($text, $context, $kind = ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_PAGE, $file = null, $line = null){
+    global $wpdb;
+    // get string id
+    $string_id = $wpdb->get_var("SELECT id FROM {$wpdb->prefix}icl_strings WHERE context='".$wpdb->escape($context)."' AND value='".$wpdb->escape($text)."'");    
+    if($string_id){
+        // get existing records
+        $string_records_count = $wpdb->get_var("SELECT COUNT(id) 
+                                        FROM {$wpdb->prefix}icl_string_positions 
+                                        WHERE string_id = '{$string_id}' AND kind = " . $kind);
+        if(ICL_STRING_TRANSLATION_STRING_TRACKING_THRESHOLD > $string_records_count){        
+            if($kind == ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_PAGE){
+                // get page url
+                $https = $_SERVER['HTTPS'] == 'on' ? 's':'';
+                $position = 'http' . $https . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+            }else{
+                $position = $file . '::' . $line;
+            }
+            
+            if(!$wpdb->get_var("SELECT id FROM {$wpdb->prefix}icl_string_positions 
+                                WHERE string_id='{$string_id}' AND position_in_page='".$wpdb->escape($position)."' AND kind='".$kind."'")){
+                $wpdb->insert($wpdb->prefix . 'icl_string_positions', array(
+                    'string_id' => $string_id,
+                    'kind' => $kind,
+                    'position_in_page' => $position
+                ));                    
+            }
+            
+        }
+    }
+}
+
+function icl_st_string_in_page($string_id){
+    global $wpdb;
+    // get urls   
+    $urls = $wpdb->get_col("SELECT position_in_page 
+                            FROM {$wpdb->prefix}icl_string_positions 
+                            WHERE string_id = '{$string_id}' AND kind = ". ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_PAGE);
+    if(!empty($urls)){
+        $string = $wpdb->get_row("SELECT context, value FROM {$wpdb->prefix}icl_strings WHERE id='{$string_id}'");
+        echo '<div id="icl_show_source_top">';
+        for($i = 0; $i < count($urls); $i++){
+            $c = $i+1;
+            if(strpos($urls[$i], '?') !== false){
+                $urls[$i] .= '&icl_string_track_value=' . urlencode($string->value);
+            }else{
+                $urls[$i] .= '?icl_string_track_value=' . urlencode($string->value);
+            }            
+            $urls[$i] .= '&icl_string_track_context=' . urlencode($string->context);            
+            echo '<a href="#" onclick="jQuery(\'#icl_string_track_frame_wrap iframe\').attr(\'src\',\''.$urls[$i].'\');jQuery(\'#icl_string_track_url a\').html(\''.$urls[$i].'\').attr(\'href\',  \''.$urls[$i].'\'); return false;">'.$c.'</a><br />';
+            
+        }
+        echo '</div>';
+        echo '<div id="icl_string_track_frame_wrap">';        
+        echo '<iframe onload="iclResizeIframe()" src="'.$urls[0].'" width="10" height="10" frameborder="0" marginheight="0" marginwidth="0"></iframe>';
+        echo '<div id="icl_string_track_url" class="icl_string_track_url"><a href="'.$urls[0].'">' . htmlspecialchars($urls[0]) . "</a></div>\n";
+        echo '</div>';        
+    }else{
+        _e('No records found', 'sitepress');
+    }
+}
+
+function icl_st_string_in_source($string_id){
+    global $wpdb, $sitepress_settings;
+    // get positions    
+    $files = $wpdb->get_col("SELECT position_in_page 
+                            FROM {$wpdb->prefix}icl_string_positions 
+                            WHERE string_id = '{$string_id}' AND kind = ". ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_SOURCE);
+    if(!empty($files)){
+        $string = $wpdb->get_row("SELECT context, value FROM {$wpdb->prefix}icl_strings WHERE id='{$string_id}'");        
+        echo '<div id="icl_show_source_top">';
+        for($i = 0; $i < count($files); $i++){            
+            $c = $i+1;
+            $exp = explode('::', $files[$i]);
+            $line = $exp[1];
+            echo '<a href="#" onclick="icl_show_in_source('.$i.','.$line.')">'.$c.'</a><br />';
+        }
+        echo '</div>';
+        echo '<div id="icl_show_source_wrap">';
+        for($i = 0; $i < count($files); $i++){            
+            $exp = explode('::', $files[$i]);
+            $file = $exp[0];
+            $line = $exp[1];
+            echo '<div class="icl_string_track_source" id="icl_string_track_source_'.$i.'"';
+            if($i > 0){
+                echo 'style="display:none"';
+            }else{
+                $first_pos = $line;                
+            }
+            echo '>';
+            if($i == 0){
+                echo '<script type="text/javascript">icl_show_in_source_scroll_once = ' . $line . '</script>';
+            }
+            echo '<div class="icl_string_track_filename">' . $file . "</div>\n";
+            echo '<pre>';        
+            $content = file($file);
+            echo '<ol>';
+            foreach($content as $k=>$l){
+                if($k == $line-1){
+                    $hl =  ' style="background-color:'.$sitepress_settings['st']['hl_color'].';"';
+                }else{
+                    $hl = '';   
+                }
+                echo '<li id="icl_source_line_'.$i.'_'.$k.'"'.$hl.'">' . htmlspecialchars($l) . '&nbsp;</li>';
+            }
+            echo '</ol>';
+            echo '</pre>';
+            echo '</div>'; 
+        }
+        echo '</div>';
+    }else{
+        _e('No records found', 'sitepress');
+    }    
+}
+
+function _icl_st_hide_random($str){
+    $str = preg_replace('#^((.+)( - ))?([a-z0-9]{32})$#', '$2', $str);
+    return $str;
+}
+
+
+function _icl_st_get_options_writes($path){
+    static $found_writes = array();
+    if(is_dir($path)){        
+        $dh = opendir($path);
+        while($file = readdir($dh)){
+            if($file=="." || $file=="..") continue;
+            if(is_dir($path . '/' . $file)){
+                _icl_st_get_options_writes($path . '/' . $file);                
+            }elseif(preg_match('#(\.php|\.inc)$#i', $file)){
+                $content = file_get_contents($path . '/' . $file);
+                $int = preg_match_all('#(add|update)_option\(([^,]+),([^)]+)\)#im', $content, $matches);
+                if($int){
+                    foreach($matches[2] as $m){
+                        $option_name = trim($m);
+                        if(0 === strpos($option_name, '"') || 0 === strpos($option_name, "'")){
+                            $option_name = trim($option_name, "\"'");
+                        }elseif(false === strpos($option_name, '$')){
+                            $option_name = constant($option_name);
+                        }else{
+                            $option_name = false;
+                        }
+                        if($option_name){
+                            $found_writes[] = $option_name;
+                        }
+                    }
+                }
+            }
+        }
+    } 
+    return $found_writes;
+}
+
+
+function icl_st_scan_options_strings(){
+    global $wpdb;
+    
+    $options = array();
+    
+    // scan theme php file for update_option(), add_option()
+    $options_names = _icl_st_get_options_writes(get_template_directory());
+    
+    $options_names = array_merge($options_names, _icl_st_get_options_writes(get_stylesheet_directory()));
+    $options_names = array_unique($options_names);
+    
+        
+    if(!empty($options_names)){   
+        $res = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name IN ('".join("','", $options_names)."')");
+        foreach($res as $row){
+            $options[$row->option_name] = maybe_unserialize($row->option_value);
+            // try unserializing twice - just in case (see Arras Theme)
+            $options[$row->option_name] = maybe_unserialize($options[$row->option_name]);
+        }
+    }
+    
+    update_option('_icl_admin_option_names', $options_names);
+         
+    return $options;
+}
+
+function icl_st_render_option_writes($option_name, $option_value, $option_key=''){    
+    if(is_array($option_value) || is_object($option_value)){
+        echo '<h4><a class="icl_stow_toggler" href="#">- ' . $option_name . '</a></h4>';
+        echo '<ul class="icl_st_option_writes">';
+        foreach($option_value as $key=>$value){
+            echo '<li>';
+            icl_st_render_option_writes($key, $value, $option_key . '[' . $option_name . ']');    
+            echo '</li>';
+        }        
+        echo '</ul>';
+    }elseif(is_string($option_value) || is_numeric($option_value)){
+        if(icl_st_is_registered_string('admin_options_' . get_option('template'), $option_key . $option_name)){
+            $checked = ' checked="checked"';
+            if(icl_st_string_has_translations('admin_options_' . get_option('template'), $option_key . $option_name)){
+                $has_translations = ' class="icl_st_has_translations"';
+            }else{
+                $has_translations = '';
+            }            
+        }else{
+            $checked = '';
+        }        
+        if(is_numeric($option_value)){
+            $class = 'icl_st_numeric';
+        }else{
+            $class = 'icl_st_string';
+        }
+        if(trim($option_value)===''){
+            $disabled = ' disabled="disabled"';
+        }else{
+            $disabled = '';
+        }
+        echo '<div class="icl_st_admin_string '.$class.'">';
+        echo '<input'.$disabled.' type="hidden" name="icl_admin_options'.$option_key.'['.$option_name.']" value=""  />';
+        echo '<input'.$disabled.$has_translations.' type="checkbox" name="icl_admin_options'.$option_key.'['.$option_name.']" value="'.htmlspecialchars($option_value).'" 
+            '.$checked.' />';
+        echo '<input type="text" readonly="readonly" value="'.$option_name.'" size="32" />'; 
+        echo '<input type="text" value="'.htmlspecialchars($option_value).'" readonly="readonly" size="48" />';        
+        //echo '<br /><input type="text" size="100" value="icl_admin_options'.$option_key.'['.$option_name.']" />';
+        echo '</div><br clear="all" />';
+    }
+}
+
+function icl_register_admin_options($array, $key=""){    
+    foreach($array as $k=>$v){
+        if(is_array($v)){
+            icl_register_admin_options($v, $key . '['.$k.']');
+        }else{
+            if($v === ''){
+                icl_unregister_string('admin_options_' . get_option('template'), $key . $k);
+            }else{
+                icl_register_string('admin_options_' . get_option('template'), $key . $k, $v);
+            }            
+        }
+    }    
+}
+
+function _icl_st_filter_empty_options_out($array){
+    $empty_found = false;
+    foreach($array as $k=>$v){
+        if(is_array($v) && !empty($v)){
+            list($array[$k], $empty_found) = _icl_st_filter_empty_options_out($v);
+        }else{
+            if(empty($v)){
+                unset($array[$k]);
+                $empty_found = true;
+            }
+        }
+    }
+    return array($array, $empty_found);
+}
+
+function wpml_register_admin_strings($serizlized_array){
+    try{
+        icl_register_admin_options(unserialize($serizlized_array));    
+    }catch(Exception $e){
+        trigger_error($e->getMessage(), E_USER_WARNING);
+    }
+}
+
+add_action('plugins_loaded', 'icl_st_set_admin_options_filters');
+function icl_st_set_admin_options_filters(){
+    $option_names = get_option('_icl_admin_option_names');
+    foreach((array)$option_names as $option){
+        add_filter('option_'.$option, 'icl_st_translate_admin_string');
+    }
+}
+
+
+function icl_st_translate_admin_string($option_value, $key="", $name=""){
+    
+    // case of double-serialized options (See Arras theme)   
+    $serialized = false;
+    if(is_serialized( $option_value )){
+        $option_value = @unserialize($option_value);
+        $serialized = true;
+    }
+    
+    
+    if(is_array($option_value) || is_object($option_value)){
+        if(!$name){
+            $ob = debug_backtrace();
+            $name = preg_replace('@^option_@', '', $ob[3]['args'][0]);
+        }
+        
+        foreach($option_value as $k=>$value){            
+            $val = icl_st_translate_admin_string($value, $key . '[' . $name . ']' , $k);
+            if(is_object($option_value)){
+                $option_value->$k = $val;
+            }else{
+                $option_value[$k] = $val;
+            }   
+        }            
+    }else{   
+        if(!$name){
+            $ob = debug_backtrace();
+            $name = preg_replace('@^option_@', '',$ob[2]['args'][0]);
+        }
+        $tr = icl_t('admin_options_' . get_option('template'), $key . $name, $option_value);
+        if($tr !== null){
+            $option_value = $tr;
+        }            
+    }
+    
+    // case of double-serialized options (See Arras theme)   
+    if($serialized){
+        $option_value = serialize($option_value);
+    }
+    
+    return $option_value;
+}
+
+function icl_st_get_mo_files($path){
+    static $mo_files;
+    
+    $dh = opendir($path);
+    while($f = readdir($dh)){            
+        if(0 !== strpos($f, '.')){    
+            if(is_dir($path . '/' . $f)){
+                icl_st_get_mo_files($path . '/' . $f);
+            }else{
+                if(preg_match('#\.mo$#', $f)){                    
+                    $mo_files[] = $path . '/' . $f;
+                }
+            }
+        }
+    }
+    
+    return $mo_files;
+}
+
+function icl_st_load_translations_from_mo($mo_file){
+    $translations = array();
+    $mo = new MO();     
+    $mo->import_from_file( $mo_file );
+    foreach($mo->entries as $str=>$v){
+        $str = str_replace("\n",'\n', $str);
+        $translations[$str] = $v->translations[0];
+    }
+    return $translations;
+}
+
+
+// fix links in existing strings according to the new translation added
+function icl_st_fix_links_in_strings($post_id){
+    static $runnonce = false;
+    if($runnonce){
+        return;
+    }
+    $runonce = true;
+    
+    if($_POST['autosave']) return;
+    
+    if(isset($_POST['post_ID'])){
+        $post_id = $_POST['post_ID'];
+    }
+    
+    global $wpdb, $sitepress;
+    $language = $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE element_type='post' AND element_id={$post_id}");    
+    if($language){
+        if($sitepress->get_default_language()==$language){
+            $strings = $wpdb->get_col("SELECT id FROM {$wpdb->prefix}icl_strings WHERE language='$language'");
+        }else{
+            $strings = $wpdb->get_col("SELECT id FROM {$wpdb->prefix}icl_string_translations WHERE language='$language'");
+        }
+            
+        foreach($strings as $string_id){
+            _icl_content_fix_links_to_translated_content($string_id, $language, 'string');
+        }
+    
+    }
+}
+
+
+
+function icl_st_debug($str){
+    trigger_error($str, E_USER_WARNING);
+}
+
+
+
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/functions-troubleshooting.php b/wp-content/plugins/sitepress-multilingual-cms/inc/functions-troubleshooting.php
new file mode 100644
index 0000000..ec2713b
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/functions-troubleshooting.php
@@ -0,0 +1,257 @@
+<?php
+/*
+if ( !function_exists('sys_get_temp_dir')) {
+  function sys_get_temp_dir() {
+      if( $temp=getenv('TMP') )        return $temp;
+      if( $temp=getenv('TEMP') )        return $temp;
+      if( $temp=getenv('TMPDIR') )    return $temp;
+      $temp=tempnam(__FILE__,'');
+      if (file_exists($temp)) {
+          unlink($temp);
+          return dirname($temp);
+      }
+      return null;
+  }
+}
+*/  
+function icl_troubleshooting_dumpdb(){
+    ini_set('memory_limit','128M');
+
+    $dump = _icl_ts_mysqldump(DB_NAME);
+    $gzdump = gzencode($dump, 9);
+    
+    header("Content-Type: application/force-download");
+    header("Content-Type: application/octet-stream");
+    header("Content-Type: application/download");
+    header("Content-Disposition: attachment; filename=" . DB_NAME . ".sql.gz");
+    //header("Content-Encoding: gzip");
+    header("Content-Length: ". strlen($gzdump));
+    
+    echo $gzdump;
+}
+
+
+
+
+function _icl_ts_mysqldump($mysql_database)
+{
+    global $wpdb;
+    $upload_folder = wp_upload_dir();
+    $dump_tmp_file = $upload_folder['path'] . '/' . '__icl_mysqldump.sql';
+    
+    $fp = @fopen($dump_tmp_file, 'w');        
+    if(!$fp){
+        $fp = fopen('php://output', 'w');        
+        ob_start();
+    }
+    
+    $sql="SHOW TABLES LIKE '".str_replace('_','\_',$wpdb->prefix)."%';";
+    
+    $result= mysql_query($sql);
+    if( $result)
+    {
+        while( $row= mysql_fetch_row($result))
+        {
+            //_icl_ts_mysqldump_table_structure($row[0]);
+            //_icl_ts_mysqldump_table_data($row[0]);
+            _icl_ts_backup_table($row[0], 0, $fp);            
+        }
+    }
+    else
+    {
+        echo "/* no tables in $mysql_database */\n";
+    }
+    mysql_free_result($result);
+    fclose ($fp);
+    
+    
+    if(file_exists($dump_tmp_file)){
+        $data = file_get_contents($dump_tmp_file);
+        @unlink($dump_tmp_file);    
+    }else{
+        $data = ob_get_contents();
+        ob_end_clean();
+    }
+    
+    return $data ;
+}
+
+/*
+function _icl_ts_mysqldump_table_structure($table)
+{
+    echo "DROP TABLE IF EXISTS `$table`;\n\n";
+        
+    $sql="show create table `$table`; ";
+    $result=mysql_query($sql);
+    if( $result)
+    {
+        if($row= mysql_fetch_assoc($result))
+        {
+            echo $row['Create Table'].";\n\n";
+        }
+    }
+    mysql_free_result($result);
+
+}
+*/
+
+/*
+function _icl_ts_mysqldump_table_data($table)
+{
+    
+    $sql="select * from `$table`;";
+    $result=mysql_query($sql);
+    if( $result)
+    {
+        $num_rows= mysql_num_rows($result);
+        $num_fields= mysql_num_fields($result);
+        
+        if( $num_rows > 0)
+        {
+            $field_type=array();
+            $i=0;
+            while( $i < $num_fields)
+            {
+                $meta= mysql_fetch_field($result, $i);
+                array_push($field_type, $meta->type);
+                $i++;
+            }
+            
+            echo "INSERT INTO `$table` VALUES\n";
+            $index=0;
+            while( $row= mysql_fetch_row($result))
+            {
+                echo "(";
+                for( $i=0; $i < $num_fields; $i++)
+                {
+                    if( is_null( $row[$i]))
+                        echo "null";
+                    else
+                    {
+                        switch( $field_type[$i])
+                        {
+                            case 'int':
+                                echo $row[$i];
+                                break;
+                            case 'string':
+                            case 'blob' :
+                            default:
+                                echo "'".mysql_real_escape_string($row[$i])."'";
+                                
+                        }
+                    }
+                    if( $i < $num_fields-1)
+                        echo ",";
+                }
+                echo ")";
+                
+                if( $index < $num_rows-1)
+                    echo ",";
+                else
+                    echo ";";
+                echo "\n";
+                
+                $index++;
+            }
+        }
+    }
+    mysql_free_result($result);
+    echo "\n";
+}
+*/
+
+if ( ! defined('ROWS_PER_SEGMENT') ) define('ROWS_PER_SEGMENT', 100);
+
+function _icl_ts_stow($query_line, $fp) {
+    if(! @fwrite($fp, $query_line,strlen($query_line)))
+        die(__('Error writing query:','sitepress') . '  ' . $query_line);
+}
+ 
+function _icl_ts_backquote($a_name) {
+    if (!empty($a_name) && $a_name != '*') {
+        if (is_array($a_name)) {
+            $result = array();
+            reset($a_name);
+            while(list($key, $val) = each($a_name)) 
+                $result[$key] = '`' . $val . '`';
+            return $result;
+        } else {
+            return '`' . $a_name . '`';
+        }
+    } else {
+        return $a_name;
+    }
+} 
+      
+function _icl_ts_backup_table($table, $segment = 'none', $fp) {
+        global $wpdb;
+
+        $table_structure = $wpdb->get_results("DESCRIBE $table");        
+        if(($segment == 'none') || ($segment == 0)) {
+            _icl_ts_stow("\n\n", $fp);
+            _icl_ts_stow("DROP TABLE IF EXISTS " . _icl_ts_backquote($table) . ";\n", $fp);
+            // Table structure
+            _icl_ts_stow("\n\n", $fp);
+            $create_table = $wpdb->get_results("SHOW CREATE TABLE $table", ARRAY_N);
+            _icl_ts_stow($create_table[0][1] . ' ;', $fp);
+            _icl_ts_stow("\n\n", $fp);
+        }
+        
+        if(($segment == 'none') || ($segment >= 0)) {
+            $defs = array();
+            $ints = array();
+            foreach ($table_structure as $struct) {
+                if ( (0 === strpos($struct->Type, 'tinyint')) ||
+                    (0 === strpos(strtolower($struct->Type), 'smallint')) ||
+                    (0 === strpos(strtolower($struct->Type), 'mediumint')) ||
+                    (0 === strpos(strtolower($struct->Type), 'int')) ||
+                    (0 === strpos(strtolower($struct->Type), 'bigint')) ) {
+                        $defs[strtolower($struct->Field)] = ( null === $struct->Default ) ? 'NULL' : $struct->Default;
+                        $ints[strtolower($struct->Field)] = "1";
+                }
+            }
+            
+            
+            // Batch by $row_inc
+            
+            if($segment == 'none') {
+                $row_start = 0;
+                $row_inc = ROWS_PER_SEGMENT;
+            } else {
+                $row_start = $segment * ROWS_PER_SEGMENT;
+                $row_inc = ROWS_PER_SEGMENT;
+            }
+            
+            do {    
+                $table_data = $wpdb->get_results("SELECT * FROM $table LIMIT {$row_start}, {$row_inc}", ARRAY_A);
+
+                $entries = 'INSERT INTO ' . _icl_ts_backquote($table) . ' VALUES (';    
+                //    \x08\\x09, not required
+                $search = array("\x00", "\x0a", "\x0d", "\x1a");
+                $replace = array('\0', '\n', '\r', '\Z');
+                if($table_data) {
+                    foreach ($table_data as $row) {
+                        $values = array();
+                        foreach ($row as $key => $value) {
+                            if ($ints[strtolower($key)]) {
+                                // make sure there are no blank spots in the insert syntax,
+                                // yet try to avoid quotation marks around integers
+                                $value = ( null === $value || '' === $value) ? $defs[strtolower($key)] : $value;
+                                $values[] = ( '' === $value ) ? "''" : $value;
+                            } else {
+                                $values[] = "'" . str_replace($search, $replace, $wpdb->escape($value)) . "'";
+                            }
+                        }
+                        _icl_ts_stow(" \n" . $entries . implode(', ', $values) . ');', $fp);
+                    }
+                    $row_start += $row_inc;
+                }
+            } while((count($table_data) > 0) and ($segment=='none'));
+        }
+        
+        if(($segment == 'none') || ($segment < 0)) {
+            // Create footer/closing comment in SQL-file
+            _icl_ts_stow("\n", $fp);
+        }
+    } // end backup_table()  
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php b/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php
new file mode 100644
index 0000000..db30420
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/functions.php
@@ -0,0 +1,81 @@
+<?php 
+
+/**
+ * Add settings link to plugin page.
+*/
+function icl_plugin_action_links($links, $file) {
+    $this_plugin = basename(ICL_PLUGIN_PATH) . '/sitepress.php';
+    global $sitepress_settings;
+    if($file == $this_plugin) {
+        if($sitepress_settings['basic_menu']){
+            $links[] = '<a href="admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/languages.php">' . __('Configure', 'sitepress') . '</a>';
+        }else{
+            $links[] = '<a href="admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/overview.php">' . __('Configure', 'sitepress') . '</a>';
+        }        
+    }
+    return $links;
+}
+ 
+
+if(defined('ICL_DEBUG_MODE') && ICL_DEBUG_MODE && !function_exists('icl_error_handler')){           
+    ini_set('error_reporting',E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+    ini_set('display_errors', 'on');
+    function icl_error_handler($errno, $errstr, $errfile, $errline){        
+        global $icl_errors_stack;        
+        $err = '<strong>'.$errstr.'</strong> ('. $errno . ')<br />';
+        $err .= 'File: <i>'.$errfile.'</i><br />';
+        $err .= 'Line: <i>'.$errline.'</i><br />';
+        $err .= '<hr style="line-height:1px;border:none;border-top:1px solid #fff;" />';
+        $icl_errors_stack[] = $err;
+        return true;
+    }
+    if(defined('WP_ADMIN')){
+        add_action('admin_footer', 'icl_display_errors_stack');
+    }else{
+        add_action('wp_footer', 'icl_display_errors_stack');
+    }
+    
+    function icl_display_errors_stack($onactivate = false){        
+        global $icl_errors_stack, $EZSQL_ERROR;
+        if(isset($icl_errors_stack) || $EZSQL_ERROR){
+            echo '<div id="icl_display_errors_stack" style="font:11px Arial;background-color:pink;padding:10px;border:1px solid #f00;width:98%;top:0;background-color:rgba(255,192,203,0.95);max-height:500px;overflow:auto;z-index:1000;';
+            if(!$onactivate){
+                echo 'position:fixed;';
+            }
+            echo '">';
+            if(!$onactivate){
+                echo '<a style="float:right" href="#" onclick="try{jQuery(\'#icl_display_errors_stack\').slideUp()}catch(err){document.getElementById(\'icl_display_errors_stack\').style.display=\'none\'}">[close]</a><br clear="all" />';
+            }
+            foreach($icl_errors_stack as $ies){
+                echo $ies;
+            }
+
+            if(isset($EZSQL_ERROR)){
+                foreach($EZSQL_ERROR as $k=>$v){
+                    echo $v['error_str'] . '<br />';
+                    echo '<strong>Query</strong>: ' . $v['query'];
+                    echo '<hr style="line-height:1px;border:none;border-top:1px solid #fff;" />';
+                }
+            }            
+            echo '</div>';
+            if($onactivate){
+                $errc = count($EZSQL_ERROR)+count($icl_errors_stack);
+                $frameheight = ( $errc * 70 < 550)?$errc * 70:550;
+                echo '<script type="text/javascript">
+                        parent.document.getElementById("message").style.maxHeight="550px";
+                        chld = parent.document.getElementById("message").childNodes;
+                        chld[2].setAttribute("height","'.$frameheight.'");                        
+                    </script>';
+                die();                
+            }
+        }
+    }
+    set_error_handler("icl_error_handler",E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+}
+
+function icl_js_escape($str){
+    $str = esc_js($str);
+    $str = htmlspecialchars_decode($str);
+    return $str;
+}       
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/hacks.php b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks.php
new file mode 100644
index 0000000..5a66712
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks.php
@@ -0,0 +1,14 @@
+<?php
+//using this file to handle particular situations that would involve more ellaborate solutions
+
+add_action('init', 'icl_load_hacks');  
+
+function icl_load_hacks(){    
+    include ICL_PLUGIN_PATH . '/inc/hacks/language-domains-preview.php';    
+    //include ICL_PLUGIN_PATH . '/inc/hacks/supress-warnings-for-xmlrpc.php';        
+    include ICL_PLUGIN_PATH . '/inc/hacks/language-canonical-redirects.php';            
+}
+
+
+include ICL_PLUGIN_PATH . '/inc/hacks/missing-php-functions.php';            
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/debug-actions.php b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/debug-actions.php
new file mode 100644
index 0000000..c3a6948
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/debug-actions.php
@@ -0,0 +1,35 @@
+<?php
+require_once ABSPATH . WPINC . '/pluggable.php';
+if(isset($_GET['debug_action']) && $_GET['nonce']==wp_create_nonce($_GET['debug_action']))
+switch($_GET['debug_action']){
+    case 'reset_pro_translation_configuration':
+        $sitepress_settings = get_option('icl_sitepress_settings');
+        
+        $sitepress_settings['content_translation_languages_setup'] = false;
+        $sitepress_settings['content_translation_setup_complete'] = false;        
+        unset($sitepress_settings['content_translation_setup_wizard_step']);
+        unset($sitepress_settings['site_id']);
+        unset($sitepress_settings['access_key']);
+        unset($sitepress_settings['translator_choice']);
+        unset($sitepress_settings['icl_lang_status']);
+        unset($sitepress_settings['icl_balance']);
+        unset($sitepress_settings['icl_support_ticket_id']);
+        unset($sitepress_settings['icl_current_session']);
+        unset($sitepress_settings['last_get_translator_status_call']);
+        unset($sitepress_settings['last_icl_reminder_fetch']);
+        unset($sitepress_settings['icl_account_email']);
+
+        update_option('icl_sitepress_settings', $sitepress_settings);
+        
+        mysql_query("TRUNCATE TABLE {$wpdb->prefix}icl_core_status");
+        mysql_query("TRUNCATE TABLE {$wpdb->prefix}icl_content_status");
+        mysql_query("TRUNCATE TABLE {$wpdb->prefix}icl_string_status");
+        mysql_query("TRUNCATE TABLE {$wpdb->prefix}icl_node");
+        mysql_query("TRUNCATE TABLE {$wpdb->prefix}icl_reminders");
+        
+        header("Location: admin.php?page=".basename(ICL_PLUGIN_PATH).'/menu/content-translation.php');
+        exit;
+    
+}
+  
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/language-canonical-redirects.php b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/language-canonical-redirects.php
new file mode 100644
index 0000000..ffaa402
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/language-canonical-redirects.php
@@ -0,0 +1,19 @@
+<?php
+if(defined('WP_ADMIN')) return;
+
+add_action('template_redirect', 'icl_language_canonical_redirects', 1);
+
+function icl_language_canonical_redirects () {
+    global $wp_query, $sitepress_settings;
+    if(3 == $sitepress_settings['language_negotiation_type'] && is_singular() && empty($wp_query->posts)){
+        global $wpdb;
+        $pid = get_query_var('p');
+        $permalink = html_entity_decode(get_permalink($pid));
+        if($permalink){
+            header ('HTTP/1.1 301 Moved Permanently');
+            header ('Location: '. $permalink);
+            exit;
+        }
+    }
+}  
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/language-domains-preview.php b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/language-domains-preview.php
new file mode 100644
index 0000000..69f1e19
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/language-domains-preview.php
@@ -0,0 +1,25 @@
+<?php
+//fixes preview function for the case of using separate domains for the language negotion
+
+global $sitepress, $sitepress_settings;
+if(isset($_GET['preview']) && $sitepress_settings['language_negotiation_type'] == 2 && $sitepress->get_current_language() != $sitepress->get_default_language()){
+    $post_id = $_GET['p'];
+    $lang = $sitepress->get_current_language();
+    $default_home = get_option('home');    
+    $_GET['lang'] = $lang;
+    $redir = $default_home . '?' . http_build_query($_GET);
+    wp_redirect($redir);
+    exit;
+}
+
+if(isset($_GET['preview']) && $sitepress_settings['language_negotiation_type'] == 2){
+    add_filter('icl_current_language', 'icl_current_language_preview_hack_filter');
+    function icl_current_language_preview_hack_filter($lang){
+        if(isset($_GET['lang'])){
+            $lang = $_GET['lang'];
+        }
+        return $lang;
+    }   
+}
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/missing-php-functions.php b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/missing-php-functions.php
new file mode 100644
index 0000000..93db08d
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/missing-php-functions.php
@@ -0,0 +1,40 @@
+<?php
+
+// json_decode
+if ( !function_exists('json_decode') ){
+    include_once ICL_PLUGIN_PATH . '/lib/JSON.php';
+    function json_decode($data, $bool) {
+        if ($bool) {
+            $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
+        } else {
+            $json = new Services_JSON();
+        }
+        return( $json->decode($data) );
+    }
+}   
+
+if(!function_exists('_cleanup_header_comment')){
+    function _cleanup_header_comment($str) {
+        return trim(preg_replace("/\s*(?:\*\/|\?>).*/", '', $str));
+    } 
+}
+
+/* remove this when we stop supporting WP versions below 3.0 */
+if(!function_exists('wp_get_mu_plugins')){
+    function wp_get_mu_plugins() {
+        $mu_plugins = array();
+        if ( !is_dir( WPMU_PLUGIN_DIR ) )
+            return $mu_plugins;
+        if ( ! $dh = opendir( WPMU_PLUGIN_DIR ) )
+            return $mu_plugins;
+        while ( ( $plugin = readdir( $dh ) ) !== false ) {
+            if ( substr( $plugin, -4 ) == '.php' )
+                $mu_plugins[] = WPMU_PLUGIN_DIR . '/' . $plugin;
+        }
+        closedir( $dh );
+        sort( $mu_plugins );
+
+        return $mu_plugins;
+    }
+}
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/supress-warnings-for-xmlrpc.php b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/supress-warnings-for-xmlrpc.php
new file mode 100644
index 0000000..8b14a0d
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/hacks/supress-warnings-for-xmlrpc.php
@@ -0,0 +1,11 @@
+<?php  
+/*  
+    $_pingback_url_parts = parse_url(get_bloginfo('pingback_url'));
+    if($_SERVER['REQUEST_URI'] == $_pingback_url_parts['path']){
+        function __icl_void_error_handler($errno, $errstr, $errfile, $errline){
+            throw new Exception ($errstr . ' [' . $errno . '] in '. $errfile . ':' . $errline);
+        }        
+        set_error_handler('__icl_void_error_handler',E_ALL);        
+    }    
+*/
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/icl-recent-comments-widget.php b/wp-content/plugins/sitepress-multilingual-cms/inc/icl-recent-comments-widget.php
new file mode 100644
index 0000000..ec5b3de
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/icl-recent-comments-widget.php
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Customized version of WP original recent comments widget
+    It overrides the original
+ */
+function icl_wp_widget_recent_comments($args) {
+    global $wpdb, $comments, $comment, $sitepress;
+    extract($args, EXTR_SKIP);
+    $options = get_option('widget_recent_comments');
+    $title = empty($options['title']) ? __('Recent Comments', 'sitepress') : apply_filters('widget_title', $options['title']);
+    if ( !$number = (int) $options['number'] )
+        $number = 5;
+    else if ( $number < 1 )
+        $number = 1;
+    else if ( $number > 15 )
+        $number = 15;
+
+    if ( !$comments = wp_cache_get( 'recent_comments-'.$sitepress->get_current_language(), 'widget' ) ) {
+        $comments = $wpdb->get_results("
+            SELECT * FROM {$wpdb->comments} c
+                JOIN {$wpdb->prefix}icl_translations t ON c.comment_post_id = t.element_id AND t.element_type='post'
+            WHERE comment_approved = '1' AND language_code = '".$sitepress->get_current_language()."'
+            ORDER BY comment_date_gmt DESC LIMIT {$number}
+        ");
+        wp_cache_add( 'recent_comments-'.$sitepress->get_current_language(), $comments, 'widget' );
+    }
+?>
+
+        <?php echo $before_widget; ?>
+            <?php echo $before_title . $title . $after_title; ?>
+            <ul id="recentcomments"><?php
+            if ( $comments ) : foreach ( (array) $comments as $comment) :
+            echo  '<li class="recentcomments">' . sprintf(__('%1$s on %2$s', 'sitepress'), get_comment_author_link(), '<a href="'. get_comment_link($comment->comment_ID) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
+            endforeach; endif;?></ul>
+        <?php echo $after_widget; ?>
+<?php
+}
+
+/**
+ * Remove the cache for recent comments widget.
+ *
+ * @since 2.2.0
+ */
+function icl_wp_delete_recent_comments_cache() {
+    global $sitepress;
+    wp_cache_delete( 'recent_comments-'.$sitepress->get_current_language(), 'widget' );
+}
+add_action( 'comment_post', 'icl_wp_delete_recent_comments_cache' );
+add_action( 'wp_set_comment_status', 'icl_wp_delete_recent_comments_cache' );
+
+/**
+ * Display and process recent comments widget options form.
+ *
+ * @since 2.2.0
+ */
+function icl_wp_widget_recent_comments_control() {
+    $options = $newoptions = get_option('widget_recent_comments');
+    if ( isset($_POST["recent-comments-submit"]) ) {
+        $newoptions['title'] = strip_tags(stripslashes($_POST["recent-comments-title"]));
+        $newoptions['number'] = (int) $_POST["recent-comments-number"];
+    }
+    if ( $options != $newoptions ) {
+        $options = $newoptions;
+        update_option('widget_recent_comments', $options);
+        icl_wp_delete_recent_comments_cache();
+    }
+    $title = attribute_escape($options['title']);
+    if ( !$number = (int) $options['number'] )
+        $number = 5;
+?>
+            <p><label for="recent-comments-title"><?php _e('Title:','sitepress'); ?> <input class="widefat" id="recent-comments-title" name="recent-comments-title" type="text" value="<?php echo $title; ?>" /></label></p>
+            <p>
+                <label for="recent-comments-number"><?php _e('Number of comments to show:','sitepress'); ?> <input style="width: 25px; text-align: center;" id="recent-comments-number" name="recent-comments-number" type="text" value="<?php echo $number; ?>" /></label>
+                <br />
+                <small><?php _e('(at most 15)','sitepress'); ?></small>
+            </p>
+            <input type="hidden" id="recent-comments-submit" name="recent-comments-submit" value="1" />
+<?php
+}
+
+/**
+ * Display the style for recent comments widget.
+ *
+ * @since 2.2.0
+ */
+function icl_wp_widget_recent_comments_style() {
+?>
+<style type="text/css">.recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}</style>
+<?php
+}
+
+/**
+ * Register recent comments with control and hook for 'wp_head' action.
+ *
+ * @since 2.2.0
+ */
+function icl_wp_widget_recent_comments_register() {
+    $widget_ops = array('classname' => 'widget_recent_comments', 'description' => __( 'The most recent comments', 'sitepress') );
+    wp_register_sidebar_widget('recent-comments', __('Recent Comments', 'sitepress'), 'icl_wp_widget_recent_comments', $widget_ops);
+    wp_register_widget_control('recent-comments', __('Recent Comments', 'sitepress'), 'icl_wp_widget_recent_comments_control');
+
+    if ( is_active_widget('icl_wp_widget_recent_comments') )
+        add_action('wp_head', 'icl_wp_widget_recent_comments_style');
+}  
+
+add_action('init', 'icl_wp_widget_recent_comments_register', 1);
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/import-xml.php b/wp-content/plugins/sitepress-multilingual-cms/inc/import-xml.php
new file mode 100644
index 0000000..b079f6b
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/import-xml.php
@@ -0,0 +1,39 @@
+<?php
+
+global $pagenow;
+if ($pagenow == 'admin.php' && isset($_GET['import']) && $_GET['import'] == 'wordpress' && isset($_GET['step']) && $_GET['step'] == 1) {
+	add_action('admin_head', 'icl_import_xml');
+}
+
+function icl_import_xml() {
+	global $sitepress;
+	$langs = $sitepress->get_active_languages();
+	if (empty($langs)) {
+		return;
+	}
+	$default = $sitepress->get_default_language();
+	
+		$out = '<h2>' . __('Select Language', 'sitepress') . '<\/h2><p><select name="icl_post_language">';
+		foreach ($langs as $lang) {
+			$out .= '<option value="' . $lang['code'] . '"';
+			if ($default == $lang['code']) {
+				$out .= ' selected="selected"';
+			}
+			$out .= '>' . $lang['native_name'] . '<\/option>';
+		}
+		$out .= '<\/select><\/p>';
+	
+	echo '
+	<script type="text/javascript">
+		jQuery(document).ready(function(){
+			jQuery("#wpbody-content .submit").before(\'' . $out . '\');
+		});
+	</script>
+	';
+}
+
+add_action('import_start', 'icl_import_xml_start', 0);
+function icl_import_xml_start() {
+	set_time_limit(0);
+	$_POST['icl_tax_post_tag_language'] = $_POST['icl_tax_category_language'] = $_POST['icl_tax_language'] = $_POST['icl_post_language'];
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/lang-data.inc b/wp-content/plugins/sitepress-multilingual-cms/inc/lang-data.inc
new file mode 100644
index 0000000..a1c1fc6
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/lang-data.inc
@@ -0,0 +1,274 @@
+<?php
+
+// loads language array into  $__icl_lang_names
+require_once ICL_PLUGIN_PATH . '/res/languages.csv.php';
+$langs_names = unserialize($__icl_lang_names); 
+
+/* - disabled this in favor of reading from a php file 
+$fh = fopen(ICL_PLUGIN_PATH . '/res/languages.csv', 'r');
+$idx = 0;
+while($data = fgetcsv($fh)){
+    if($idx == 0){
+        foreach($data as $k=>$v){
+            if($k < 3) continue;
+            $lang_idxs[] = $v; 
+        }
+    }else{
+        foreach($data as $k=>$v){
+            if($k < 2) continue;                    
+            if($k == 2){
+                $langs_names[$lang_idxs[$idx-1]]['major'] = intval($v);
+                continue;
+            }
+            $langs_names[$lang_idxs[$idx-1]]['tr'][$lang_idxs[$k-3]] = $v; 
+        }
+    }
+    $idx++;
+}
+*/
+
+$lang_codes = array(
+    'Afar'    => 'aa',
+    'Abkhazian'    => 'ab',
+    'Avestan'    => 'ae',
+    'Afrikaans'    => 'af',
+    'Akan'    => 'ak',
+    'Amharic'    => 'am',
+    'Arabic'    => 'ar',
+    'Assamese'    => 'as',
+    'Avar'    => 'av',
+    'Aymara'    => 'ay',
+    'Azerbaijani'    => 'az',
+    'Bashkir'    => 'ba',
+    'Belarusian'    => 'be',
+    'Bulgarian'    => 'bg',
+    'Bihari'    => 'bh',
+    'Bislama'    => 'bi',
+    'Bambara'    => 'bm',
+    'Bengali'    => 'bn',
+    'Tibetan'    => 'bo',
+    'Breton'    => 'br',
+    'Bosnian'    => 'bs',
+    'Catalan'    => 'ca',
+    'Chechen'    => 'ce',
+    'Chamorro'    => 'ch',
+    'Corsican'    => 'co',
+    'Cree'    => 'cr',
+    'Czech'    => 'cs',
+    'Old Slavonic'    => 'cu',
+    'Chuvash'    => 'cv',
+    'Welsh'    => 'cy',
+    'Danish'    => 'da',
+    'German'    => 'de',
+    'Maldivian'    => 'dv',
+    'Bhutani'    => 'dz',
+    'Ewe'    => 'ee',
+    'Greek'    => 'el',
+    'English'    => 'en',
+    'Esperanto'    => 'eo',
+    'Spanish'    => 'es',
+    'Estonian'    => 'et',
+    'Basque'    => 'eu',
+    'Persian'    => 'fa',
+    'Fulah'    => 'ff',
+    'Finnish'    => 'fi',
+    'Fiji'    => 'fj',
+    'Faeroese'    => 'fo',
+    'French'    => 'fr',
+    'Frisian'    => 'fy',
+    'Irish'    => 'ga',
+    'Scots Gaelic'    => 'gd',
+    'Galician'    => 'gl',
+    'Guarani'    => 'gn',
+    'Gujarati'    => 'gu',
+    'Manx'    => 'gv',
+    'Hausa'    => 'ha',
+    'Hebrew'    => 'he',
+    'Hindi'    => 'hi',
+    'Hiri Motu'    => 'ho',
+    'Croatian'    => 'hr',
+    'Hungarian'    => 'hu',
+    'Armenian'    => 'hy',
+    'Herero'    => 'hz',
+    'Interlingua'    => 'ia',
+    'Indonesian'    => 'id',
+    'Interlingue'    => 'ie',
+    'Igbo'    => 'ig',
+    'Inupiak'    => 'ik',
+    'Icelandic'    => 'is',
+    'Italian'    => 'it',
+    'Inuktitut'    => 'iu',
+    'Japanese'    => 'ja',
+    'Javanese'    => 'jv',
+    'Georgian'    => 'ka',
+    'Kongo'    => 'kg',
+    'Kikuyu'    => 'ki',
+    'Kwanyama'    => 'kj',
+    'Kazakh'    => 'kk',
+    'Greenlandic'    => 'kl',
+    'Cambodian'    => 'km',
+    'Kannada'    => 'kn',
+    'Korean'    => 'ko',
+    'Kanuri'    => 'kr',
+    'Kashmiri'    => 'ks',
+    'Kurdish'    => 'ku',
+    'Komi'    => 'kv',
+    'Cornish'    => 'kw',
+    'Kirghiz'    => 'ky',
+    'Latin'    => 'la',
+    'Luxembourgish'    => 'lb',
+    'Luganda'    => 'lg',
+    'Lingala'    => 'ln',
+    'Laothian'    => 'lo',
+    'Lithuanian'    => 'lt',
+    'Latvian'    => 'lv',
+    'Malagasy'    => 'mg',
+    'Marshallese'    => 'mh',
+    'Maori'    => 'mi',
+    'Macedonian'    => 'mk',
+    'Malayalam'    => 'ml',
+    'Mongolian'    => 'mn',
+    'Moldavian'    => 'mo',
+    'Marathi'    => 'mr',
+    'Malay'    => 'ms',
+    'Maltese'    => 'mt',
+    'Burmese'    => 'my',
+    'Nauru'    => 'na',
+    'North Ndebele'    => 'nd',
+    'Nepali'    => 'ne',
+    'Ndonga'    => 'ng',
+    'Dutch'    => 'nl',            
+    'Norwegian Bokmål'    => 'nb',
+    'Norwegian Nynorsk'    => 'nn',
+    'South Ndebele'    => 'nr',
+    'Navajo'    => 'nv',
+    'Chichewa'    => 'ny',
+    'Occitan'    => 'oc',
+    'Oromo'    => 'om',
+    'Oriya'    => 'or',
+    'Ossetian'    => 'os',
+    'Punjabi'    => 'pa',
+    'Pali'    => 'pi',
+    'Polish'    => 'pl',
+    'Pashto'    => 'ps',
+    'Portuguese, Portugal'    => 'pt-pt',
+    'Portuguese, Brazil'    => 'pt-br',
+    'Quechua'    => 'qu',
+    'Rhaeto-Romance'    => 'rm',
+    'Kirundi'    => 'rn',
+    'Romanian'    => 'ro',
+    'Russian'    => 'ru',
+    'Kinyarwanda'    => 'rw',
+    'Sanskrit'    => 'sa',
+    'Sardinian'    => 'sc',
+    'Sindhi'    => 'sd',
+    'Northern Sami'    => 'se',
+    'Sango'    => 'sg',
+    'Serbo-Croatian'    => 'sh',
+    'Singhalese'    => 'si',
+    'Slovak'    => 'sk',
+    'Slovenian'    => 'sl',
+    'Samoan'    => 'sm',
+    'Shona'    => 'sn',
+    'Somali'    => 'so',
+    'Albanian'    => 'sq',
+    'Serbian'    => 'sr',
+    'Siswati'    => 'ss',
+    'Sesotho'    => 'st',
+    'Sudanese'    => 'su',
+    'Swedish'    => 'sv',
+    'Swahili'    => 'sw',
+    'Tamil'    => 'ta',
+    'Telugu'    => 'te',
+    'Tajik'    => 'tg',
+    'Thai'    => 'th',
+    'Tigrinya'    => 'ti',
+    'Turkmen'    => 'tk',
+    'Tagalog'    => 'tl',
+    'Setswana'    => 'tn',
+    'Tonga'    => 'to',
+    'Turkish'    => 'tr',
+    'Tsonga'    => 'ts',
+    'Tatar'    => 'tt',
+    'Twi'    => 'tw',
+    'Tahitian'    => 'ty',
+    'Uighur'    => 'ug',
+    'Ukrainian'    => 'uk',
+    'Urdu'    => 'ur',
+    'Uzbek'    => 'uz',
+    'Venda'    => 've',
+    'Vietnamese'    => 'vi',
+    'Wolof'    => 'wo',
+    'Xhosa'    => 'xh',
+    'Yiddish'    => 'yi',
+    'Yoruba'    => 'yo',
+    'Zhuang'    => 'za',
+    'Chinese (Simplified)'    => 'zh-hans',
+    'Chinese (Traditional)'    => 'zh-hant',
+    'Zulu'    => 'zu',
+    'Slavic'    => 'sla'
+);  
+
+$lang_locales = array(
+    'en'    => 'en_US',
+    'af'    => 'af',
+    'ar'    => 'ar',
+    'bn'    => 'bn_BD',
+    'eu'    => 'eu',
+    'be'    => 'be_BY',
+    'bg'    => 'bg_BG',
+    'ca'    => 'ca',
+    'zh-hans'=> 'zh_CN',
+    'zh-hant'=> 'zh_TW',
+    'hr'    => 'hr',
+    'cs'    => 'cs_CZ',
+    'da'    => 'da_DK',
+    'nl'    => 'nl_NL',
+    'eo'    => 'eo',
+    'et'    => 'et',
+    'fo'    => 'fo',
+    'fi'    => 'fi_FI',
+    'fr'    => 'fr_FR',
+    'gl'    => 'gl_ES',
+    'ka'    => 'ge_GE',
+    'de'    => 'de_DE',
+    'el'    => 'el',
+    'he'    => 'he_IL',
+    'hu'    => 'hu_HU',
+    'is'    => 'is_IS',
+    'id'    => 'id_ID',
+    'it'    => 'it',
+    'ja'    => 'ja',
+    'km'    => 'km_KH',
+    'ko'    => 'ko_KR',
+    'ku'    => 'ku',
+    'lv'    => 'lv',
+    'lt'    => 'lt',
+    'mk'    => 'mk_MK',
+    'mg'    => 'mg_MG',
+    'ms'    => 'ms_MY',
+    'ni'    => 'ni_ID',
+    'nb'    => 'nb_NO',
+    'fa'    => 'fa_IR',
+    'pl'    => 'pl_PL',
+    'pt-pt' => 'pt_PT',
+    'pt-br' => 'pt_BR',
+    'ro'    => 'ro_RO',
+    'ru'    => 'ru_RU',
+    'sr'    => 'sr_RS',
+    'si'    => 'si_LK',          
+    'sk'    => 'sk_SK',
+    'sl'    => 'sl_SI',
+    'es'    => 'es_ES',
+    'su'    => 'su_ID',
+    'sv'    => 'sv_SE',
+    'tg'    => 'tg',
+    'th'    => 'th',
+    'tr'    => 'tr',
+    'uk'    => 'uk_UA',
+    'ug'    => 'ug',
+    'uz'    => 'uz_UZ',
+    'vi'    => 'vi',
+    'cy'    => 'cy'
+)
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/language-switcher.php b/wp-content/plugins/sitepress-multilingual-cms/inc/language-switcher.php
new file mode 100644
index 0000000..9b438c2
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/language-switcher.php
@@ -0,0 +1,704 @@
+<?php
+
+class SitePressLanguageSwitcher {
+	
+	var $widget_preview = false;
+	var $widget_css_defaults;
+	
+	var $footer_preview = false;
+	var $footer_css_defaults;
+	
+	var $color_schemes = array(
+			'Gray' => array(
+                'font-current-normal' => '#222222',
+                'font-current-hover' => '#000000',
+                'background-current-normal' => '#eeeeee',
+                'background-current-hover' => '#eeeeee',
+                'font-other-normal' => '#222222',
+                'font-other-hover' => '#000000',
+                'background-other-normal' => '#e5e5e5',
+                'background-other-hover' => '#eeeeee',
+                'border' => '#cdcdcd',
+				'background' => '#e5e5e5'
+            ),
+            'White' => array(
+                'font-current-normal' => '#444444',
+                'font-current-hover' => '#000000',
+                'background-current-normal' => '#ffffff',
+                'background-current-hover' => '#eeeeee',
+                'font-other-normal' => '#444444',
+                'font-other-hover' => '#000000',
+                'background-other-normal' => '#ffffff',
+                'background-other-hover' => '#eeeeee',
+                'border' => '#cdcdcd',
+				'background' => '#ffffff'
+            ),
+            'Blue' => array(
+                'font-current-normal' => '#ffffff',
+                'font-current-hover' => '#000000',
+                'background-current-normal' => '#95bedd',
+                'background-current-hover' => '#95bedd',
+                'font-other-normal' => '#000000',
+                'font-other-hover' => '#ffffff',
+                'background-other-normal' => '#cbddeb',
+                'background-other-hover' => '#95bedd',
+                'border' => '#0099cc',
+				'background' => '#cbddeb'
+            )
+	);
+	
+	function __construct(){
+		
+		$this->widget_css_defaults = $this->color_schemes['White'];
+		$this->footer_css_defaults = $this->color_schemes['White'];
+		
+		add_action('plugins_loaded',array(&$this,'init'));
+	}
+	
+	function init(){
+		
+		global $sitepress_settings;
+		$this->settings = $sitepress_settings;
+        if ($this->settings['icl_lang_sel_footer']){
+            add_action('wp_head', array(&$this, 'language_selector_footer_style'),19);
+            add_action('wp_footer', array(&$this, 'language_selector_footer'),19);
+		}
+		if (is_admin()) {
+			add_action('icl_language_switcher_options',array(&$this,'admin'),1);
+		} else if ($this->settings['icl_post_availability']) {
+			icl_register_string('WPML', 'Text for alternative languages for posts', $this->settings['icl_post_availability_text']);
+			add_filter('the_content', array(&$this, 'post_availability'));
+		}
+		// the language selector widget      
+        $this->language_selector_widget_init();
+		if(is_admin() && $_GET['page'] == ICL_PLUGIN_FOLDER . '/menu/languages.php'){
+			add_action('admin_head', 'icl_lang_sel_nav_css', 1, 1, true);
+			add_action('admin_head', array(&$this, 'custom_language_switcher_style'));
+        }
+		if(!is_admin()){
+			add_action('wp_head', array(&$this, 'custom_language_switcher_style'));
+		}
+	}
+	
+	function language_selector_widget_init(){ 
+        register_sidebar_widget(__('Language Selector', 'sitepress'), 'language_selector_widget', 'icl_languages_selector');
+		register_widget_control(__('Language Selector', 'sitepress'), array(&$this, 'set_widget') );
+        add_action('template_redirect','icl_lang_sel_nav_ob_start');
+        add_action('wp_head','icl_lang_sel_nav_ob_end');
+    }
+	
+	function set_widget(){
+		global $sitepress, $sitepress_settings;
+		if (isset($_POST['icl_widget_update'])){
+			$sitepress_settings['icl_widget_title_show'] = (isset($_POST['icl_widget_title_show'])) ? 1 : 0;
+			$sitepress->save_settings($sitepress_settings);
+		}
+		echo '<input type="hidden" name="icl_widget_update" value="1">';
+		echo '<label><input type="checkbox" name="icl_widget_title_show" value="1"';
+		if ($sitepress_settings['icl_widget_title_show']) echo ' checked="checked"';
+		echo '>&nbsp;' . __('Display \'Languages\' as the widget\'s title', 'sitepress') . '</label><br>';
+	}
+	
+	function post_availability($content){
+		$out = '';
+        if(is_singular()){
+            $languages = icl_get_languages('skip_missing=true');
+            if(1 < count($languages)){
+                //$out .= $this->settings['post_available_before'] ? $this->settings['post_available_before'] : ''; 
+                foreach($languages as $l){
+                    if(!$l['active']) $langs[] = '<a href="'.$l['url'].'">'.$l['translated_name'].'</a>';
+                }
+                $out .= join(', ', $langs);
+                //$out .= $this->settings['post_available_after'] ? $this->settings['post_available_after'] : '';
+				$out = '<p>' . sprintf(icl_t('WPML', 'Text for alternative languages for posts', $this->settings['icl_post_availability_text']), $out) . '</p>';
+            }
+        }
+         if ($this->settings['icl_post_availability_position'] == 'above')
+            return $out . $content;
+        else return $content . $out;
+	}
+	
+	function language_selector_footer_style(){
+		
+        $add = false;
+        foreach($this->footer_css_defaults as $key=>$d){
+            if (isset($this->settings['icl_lang_sel_footer_config'][$key]) && $this->settings['icl_lang_sel_footer_config'][$key] != $d){
+                $this->settings['icl_lang_sel_footer_config'][$key] . "\n";
+                $add = true;
+                break;
+            }
+        }
+        if($add){
+            echo "\n<style type=\"text/css\">";
+            foreach($this->settings['icl_lang_sel_footer_config'] as $k=>$v){
+                switch($k){
+                    case 'font-current-normal': 
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer a, #lang_sel_footer a.lang_sel_sel, #lang_sel_footer a.lang_sel_sel:visited{color:'.$v.';}'; 
+                        break;
+                    case 'font-current-hover': 
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer a:hover, #lang_sel_footer a.lang_sel_sel:hover{color:'.$v.';}';
+                        break;
+                    case 'background-current-normal': 
+                        //if($v != $this->color_schemes[$k])
+							echo '#lang_sel_footer a.lang_sel_sel, #lang_sel_footer a.lang_sel_sel:visited{background-color:'.$v.';}'; 
+                        break;
+                    case 'background-current-hover': 
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer a.lang_sel_sel:hover{background-color:'.$v.';}'; 
+                        break;
+                    case 'font-other-normal':
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer ul a, #lang_sel_footer ul a:visited{color:'.$v.';}'; 
+                        break;
+                    case 'font-other-hover': 
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer ul a:hover{color:'.$v.';}'; 
+                        break;
+                    case 'background-other-normal': 
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer ul a, #lang_sel_footer ul a:visited{background-color:'.$v.';}'; 
+                        break;
+                    case 'background-other-hover': 
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer ul a:hover{background-color:'.$v.';}'; 
+                        break;
+                    case 'border': 
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer{border-color:'.$v.';}';
+                        break;
+                    case 'background': 
+                        //if($v != $this->color_schemes[$k])
+                            echo '#lang_sel_footer{background-color:'.$v.';}';
+                        break;
+                }
+            }
+            echo "</style>\n";
+        }
+    }
+	
+	function language_selector_footer() {
+        $languages = icl_get_languages('orderby=id&order=asc&skip_missing=0');
+        if(!empty($languages)){
+            echo '
+                <div id="lang_sel_footer">
+                    <ul>
+                    ';
+                foreach($languages as $lang){
+                    echo '	<li>';
+					echo '<a href="'.$lang['url'].'"';
+                    if($lang['active']) echo ' class="lang_sel_sel"';
+					echo '>';
+                    if ($this->settings['icl_lso_flags'] || $this->footer_preview) echo '<img src="'.$lang['country_flag_url'].'" alt="'.$lang['language_code'].'" class="iclflag"';
+					if (!$this->settings['icl_lso_flags'] && $this->footer_preview) echo ' style="display:none;"';
+					if ($this->settings['icl_lso_flags'] || $this->footer_preview) echo ' />&nbsp;';
+                    //if(!$l['active']) echo '</a>';
+                    //if(!$l['active']) echo '<a href="'.$l['url'].'">';
+                    if($this->footer_preview){
+                            $lang_native = $lang['native_name'];
+                            if($this->settings['icl_lso_native_lang']){
+                                $lang_native_hidden = false;
+                            }else{
+                                $lang_native_hidden = true;
+                            }
+                            $lang_translated = $lang['translated_name'];
+                            if($this->settings['icl_lso_display_lang']){
+                                $lang_translated_hidden = false;
+                            }else{
+                                $lang_translated_hidden = true;
+                            }                            
+                        }else{
+                            if($this->settings['icl_lso_native_lang']){
+                                $lang_native = $lang['native_name'];
+                            }else{
+                                $lang_native = false;
+                            }
+                            if($this->settings['icl_lso_display_lang']){
+                                $lang_translated = $lang['translated_name'];
+                            }else{
+                                $lang_translated = false;
+                            }
+                        }
+                        echo icl_disp_language($lang_native, $lang_translated, $lang_native_hidden, $lang_translated_hidden);
+                    //echo icl_disp_language( $this->settings['icl_lso_native_lang'] ? $l['native_name'] : null, $this->settings['icl_lso_display_lang'] ? $l['translated_name'] : null );
+                    //if(!$l['active']) echo '</a>';
+					echo '</a>';
+                    echo '</li>
+                    ';
+                }
+            echo '</ul>
+                </div>';
+            }
+    }
+
+	function admin(){
+		foreach($this->color_schemes as $key=>$val): ?>
+			<?php foreach($this->widget_css_defaults as $k=>$v): ?>                                                
+                                                <input type="hidden" id="icl_lang_sel_config_alt_<?php echo $key ?>_<?php echo $k ?>" value="<?php echo $this->color_schemes[$key][$k] ?>" />
+                                                <?php endforeach; ?>
+                                            <?php endforeach; ?>
+											
+		<?php if(!defined('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS') || !ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS): ?>
+                                            <br />
+                                            <a href="#" onclick="jQuery(this).next().slideToggle();return false;"><?php _e('Edit the language switcher widget colors', 'sitepress')?></a>                                            
+                                            <div style="display:none">                                          
+                                                <table id="icl_lang_preview_config" style="width:auto;">
+                                                    <thead>
+                                                    <tr>
+                                                        <th>&nbsp;</th>
+                                                        <th><?php _e('Normal', 'sitepress')?></th>
+                                                        <th><?php _e('Hover', 'sitepress')?></th>
+                                                    </tr>
+                                                    </thead>
+								                    <tbody>                                                
+                                                    <tr>
+                                                        <td><?php _e('Current language font color', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-font-current-normal" name="icl_lang_sel_config[font-current-normal]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['font-current-normal'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['font-current-normal']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['font-current-normal'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-font-current-normal-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-font-current-normal';cp.show('icl-font-current-normal-picker');return false;" /></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-font-current-hover" name="icl_lang_sel_config[font-current-hover]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['font-current-hover'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['font-current-hover']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['font-current-hover'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-font-current-hover-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-font-current-hover';cp.show('icl-font-current-hover-picker');return false;" /></td>
+                                                    </tr>                                                
+                                                    <tr>
+                                                        <td><?php _e('Current language background color', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-background-current-normal" name="icl_lang_sel_config[background-current-normal]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['background-current-normal'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['background-current-normal']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['background-current-normal'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-current-normal-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-background-current-normal';cp.show('icl-background-current-normal-picker');return false;" /></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-background-current-hover" name="icl_lang_sel_config[background-current-hover]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['background-current-hover'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['background-current-hover']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['background-current-hover'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-current-hover-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-background-current-hover';cp.show('icl-background-current-hover-picker');return false;" /></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td><?php _e('Other languages font color', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-font-other-normal" name="icl_lang_sel_config[font-other-normal]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['font-other-normal'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['font-other-normal']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['font-other-normal'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-font-other-normal-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-font-other-normal';cp.show('icl-font-other-normal-picker');return false;" /></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-font-other-hover" name="icl_lang_sel_config[font-other-hover]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['font-other-hover'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['font-other-hover']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['font-other-hover'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-font-other-hover-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-font-other-hover';cp.show('icl-font-other-hover-picker');return false;" /></td>
+                                                    </tr>                                                
+                                                    <tr>
+                                                        <td><?php _e('Other languages background color', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-background-other-normal" name="icl_lang_sel_config[background-other-normal]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['background-other-normal'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['background-other-normal']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['background-other-normal'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-other-normal-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-background-other-normal';cp.show('icl-background-other-normal-picker');return false;" /></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-background-other-hover" name="icl_lang_sel_config[background-other-hover]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['background-other-hover'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['background-other-hover']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['background-other-hover'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-other-hover-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-background-other-hover';cp.show('icl-background-other-hover-picker');return false;" /></td>
+                                                    </tr>                                                
+                                                    <tr>
+                                                        <td><?php _e('Border', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-config-border" name="icl_lang_sel_config[border]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_config']['border'])) 
+                                                                echo $this->settings['icl_lang_sel_config']['border']; 
+                                                            else 
+                                                                echo $this->widget_css_defaults['border'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-border-picker" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-config-border';cp.show('icl-border-picker');return false;" /></td>
+                                                        <td>&nbsp;</td>
+                                                    </tr>
+                                                    </tbody>                                                
+                                                    
+                                                </table>
+
+                                                <?php _e('Presets:', 'sitepress')?>
+                                                <select id="icl_lang_sel_color_scheme" name="icl_lang_sel_color_scheme">
+                                                    <option value=""><?php _e('--select--', 'sitepress') ?>&nbsp;</option>
+                                                    <option value="Gray"><?php _e('Gray', 'sitepress') ?>&nbsp;</option>
+                                                    <option value="White"><?php _e('White', 'sitepress') ?>&nbsp;</option>                                                    
+                                                    <option value="Blue"><?php _e('Blue', 'sitepress') ?>&nbsp;</option>
+                                                </select>
+                                                <span style="display:none"><?php _e("Are you sure? The customization you may have made will be overriden once you click 'Apply'", 'sitepress')?></span>
+                                            </div>   
+                                            <?php else: ?>
+                                            <em><?php printf(__("%s is defined in your theme. The language switcher can only be customized using the theme's CSS.", 'sitepress'), 'ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS') ?></em>
+                                            <?php endif; ?>
+                                        </li>
+<?php
+		if (defined('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS')) return;
+?>
+
+										<li>
+                                            <h4><?php echo __('Footer language switcher style', 'sitepress')?></h4>
+                                            <ul>
+                                                <li>
+                                                    <label>
+                                                        <input type="checkbox" name="icl_lang_sel_footer" value="1" <?php if($this->settings['icl_lang_sel_footer']):?>checked="checked"<?php endif?> />
+                                                        <?php echo __('Show language switcher in footer', 'sitepress') ?>
+                                                    </label>
+                                                </li>
+                                            </ul>
+                                        </li>
+										<li>                                        
+                                            <div id="icl_lang_sel_footer_preview_wrap" style="<?php if (!$this->settings['icl_lang_sel_footer']) echo 'display:none; '; ?>height:80px">                                            
+                                            <div id="icl_lang_sel_footer_preview">                                            
+                                            <h4><?php _e('Footer language switcher preview', 'sitepress')?></h4>
+<?php 
+		$this->footer_preview = true;
+		$this->language_selector_footer(); 
+?>                                                                          
+                                            </div>                                                                     
+                                            </div>
+
+<?php foreach($this->color_schemes as $key=>$val): ?>
+                                                <?php foreach($this->footer_css_defaults as $k=>$v): ?>                                                
+                                                <input type="hidden" id="icl_lang_sel_footer_config_alt_<?php echo $key ?>_<?php echo $k ?>" value="<?php echo $this->color_schemes[$key][$k] ?>" />
+                                                <?php endforeach; ?>
+                                            <?php endforeach; ?>                                            
+                                            
+                            
+                                            
+                                            <a href="#" onclick="jQuery(this).next().slideToggle();return false;" id="icl_lang_sel_footer_preview_link" <?php if (!$this->settings['icl_lang_sel_footer']) echo 'style="display:none;" '; ?>><?php _e('Edit the footer language switcher colors', 'sitepress')?></a>                                            
+                                            <div style="display:none" id="icl_lang_preview_config_footer_editor_wrapper">                                          
+                                                <table id="icl_lang_preview_config_footer" style="width:auto;">
+                                                    <thead>
+                                                    <tr>
+                                                        <th>&nbsp;</th>
+                                                        <th><?php _e('Normal', 'sitepress')?></th>
+                                                        <th><?php _e('Hover', 'sitepress')?></th>
+                                                    </tr>
+                                                    </thead>
+								                    <tbody>                                                
+                                                    <tr>
+                                                        <td><?php _e('Current language font color', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-font-current-normal" name="icl_lang_sel_footer_config[font-current-normal]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['font-current-normal'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['font-current-normal']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['font-current-normal'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-font-current-normal-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-font-current-normal';cp.show('icl-font-current-normal-picker-footer');return false;" /></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-font-current-hover" name="icl_lang_sel_footer_config[font-current-hover]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['font-current-hover'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['font-current-hover']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['font-current-hover'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-font-current-hover-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-font-current-hover';cp.show('icl-font-current-hover-picker-footer');return false;" /></td>
+                                                    </tr>                                                
+                                                    <tr>
+                                                        <td><?php _e('Current language background color', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-background-current-normal" name="icl_lang_sel_footer_config[background-current-normal]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['background-current-normal'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['background-current-normal']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['background-current-normal'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-current-normal-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-background-current-normal';cp.show('icl-background-current-normal-picker-footer');return false;" /></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-background-current-hover" name="icl_lang_sel_footer_config[background-current-hover]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['background-current-hover'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['background-current-hover']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['background-current-hover'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-current-hover-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-background-current-hover';cp.show('icl-background-current-hover-picker-footer');return false;" /></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td><?php _e('Other languages font color', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-font-other-normal" name="icl_lang_sel_footer_config[font-other-normal]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['font-other-normal'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['font-other-normal']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['font-other-normal'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-font-other-normal-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-font-other-normal';cp.show('icl-font-other-normal-picker-footer');return false;" /></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-font-other-hover" name="icl_lang_sel_footer_config[font-other-hover]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['font-other-hover'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['font-other-hover']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['font-other-hover'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-font-other-hover-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-font-other-hover';cp.show('icl-font-other-hover-picker-footer');return false;" /></td>
+                                                    </tr>                                                
+                                                    <tr>
+                                                        <td><?php _e('Other languages background color', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-background-other-normal" name="icl_lang_sel_footer_config[background-other-normal]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['background-other-normal'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['background-other-normal']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['background-other-normal'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-other-normal-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-background-other-normal';cp.show('icl-background-other-normal-picker-footer');return false;" /></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-background-other-hover" name="icl_lang_sel_footer_config[background-other-hover]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['background-other-hover'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['background-other-hover']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['background-other-hover'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-other-hover-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-background-other-hover';cp.show('icl-background-other-hover-picker-footer');return false;" /></td>
+                                                    </tr> 
+													
+													<tr>
+                                                        <td><?php _e('Background', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-background" name="icl_lang_sel_footer_config[background]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['background'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['background']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['background'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-background-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-background';cp.show('icl-background-picker-footer');return false;" /></td>
+                                                        <td>&nbsp;</td>
+                                                    </tr>
+													                                              
+                                                    <tr>
+                                                        <td><?php _e('Border', 'sitepress')?></td>
+                                                        <td><input type="text" size="7" id="icl-lang-sel-footer-config-border" name="icl_lang_sel_footer_config[border]" value="<?php 
+                                                            if(isset($this->settings['icl_lang_sel_footer_config']['border'])) 
+                                                                echo $this->settings['icl_lang_sel_footer_config']['border']; 
+                                                            else 
+                                                                echo $this->footer_css_defaults['border'] ;
+                                                            ?>" /><img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl-border-picker-footer" alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" onclick="icl_cp_target='icl-lang-sel-footer-config-border';cp.show('icl-border-picker-footer');return false;" /></td>
+                                                        <td>&nbsp;</td>
+                                                    </tr>
+                                                    </tbody>                                                
+                                                    
+                                                </table>
+
+                                                <?php _e('Presets:', 'sitepress')?>
+                                                <select id="icl_lang_sel_footer_color_scheme" name="icl_lang_sel_footer_color_scheme">
+                                                    <option value=""><?php _e('--select--', 'sitepress') ?>&nbsp;</option>
+                                                    <option value="Gray"><?php _e('Gray', 'sitepress') ?>&nbsp;</option>
+                                                    <option value="White"><?php _e('White', 'sitepress') ?>&nbsp;</option>                                                    
+                                                    <option value="Blue"><?php _e('Blue', 'sitepress') ?>&nbsp;</option>
+                                                </select>
+                                                <span style="display:none"><?php _e("Are you sure? The customization you may have made will be overriden once you click 'Apply'", 'sitepress')?></span>
+                                            </div>   
+                                            <br />
+                                        </li>
+										
+										<li>
+                                            <h4><?php _e('Show post translation links', 'sitepress'); ?></h4>
+                                            <ul>
+                                                <li>
+                                                    <label>
+                                                        <input type="checkbox" name="icl_post_availability" value="1" <?php if($this->settings['icl_post_availability']):?>checked="checked"<?php endif?> />
+                                                        <?php _e('Yes', 'sitepress'); ?>
+                                                    </label>
+                                                </li>
+												 <li>
+                                                    <label>
+														<?php _e('Position', 'sitepress'); ?>&nbsp;
+                                                       <select name="icl_post_availability_position">
+															<option value="above"<?php if($this->settings['icl_post_availability_position'] == 'above'):?> selected="selected"<?php endif?>><?php _e('Above post', 'sitepress'); ?>&nbsp;&nbsp;</option>
+															<option value="bellow"<?php if(! $this->settings['icl_post_availability_position'] || $this->settings['icl_post_availability_position'] == 'bellow'):?> selected="selected"<?php endif?>><?php _e('Below post', 'sitepress'); ?>&nbsp;&nbsp;</option>
+														</select>
+                                                    </label>
+                                                </li>
+												<li>
+                                                    <label>
+                                                      <?php _e('Text for alternative languages for posts', 'sitepress'); ?><br /><input type="text" name="icl_post_availability_text" value="<?php if($this->settings['icl_post_availability_text']) echo $this->settings['icl_post_availability_text']; else _e('This post is also available in: %s','sitepress'); ?>" size="40" />
+                                                    </label>
+													<br /><br />
+                                                </li>
+                                            </ul>
+                                        </li>
+										
+<?php
+	}
+	
+	function widget_list(){
+		global $sitepress, $w_this_lang, $icl_language_switcher_preview;
+		if($w_this_lang['code']=='all'){
+    		$main_language['native_name'] = __('All languages', 'sitepress');
+		}
+		$active_languages = icl_get_languages('orderby=id&order=asc&skip_missing=0');
+		if(empty($active_languages)) return; ?>
+		
+<div id="lang_sel_list"<?php if(!$this->settings['icl_lang_sel_type'] || $this->settings['icl_lang_sel_type'] == 'dropdown') echo ' style="display:none;"';?>>           
+            <ul>
+                <?php foreach($active_languages as $lang): ?>
+                <li class="icl-<?php echo $lang['language_code'] ?>">          
+                    <a href="<?php echo $lang['url']?>"<?php if ($lang['language_code'] == $sitepress->get_current_language()) echo ' class="lang_sel_sel"'; else echo ' class="lang_sel_other"'; ?>>
+                    <?php if( $this->settings['icl_lso_flags'] || $icl_language_switcher_preview):?>                
+                    <img <?php if( !$this->settings['icl_lso_flags'] ):?>style="display:none"<?php endif?> class="iclflag" src="<?php echo $lang['country_flag_url'] ?>" alt="<?php echo $lang['language_code'] ?>" />&nbsp;                    
+                    <?php endif; ?>
+                    <?php 
+                        if($icl_language_switcher_preview){
+                            $lang_native = $lang['native_name'];
+                            if($this->settings['icl_lso_native_lang']){
+                                $lang_native_hidden = false;
+                            }else{
+                                $lang_native_hidden = true;
+                            }
+                            $lang_translated = $lang['translated_name'];
+                            if($this->settings['icl_lso_display_lang']){
+                                $lang_translated_hidden = false;
+                            }else{
+                                $lang_translated_hidden = true;
+                            }                            
+                        }else{
+                            if($this->settings['icl_lso_native_lang']){
+                                $lang_native = $lang['native_name'];
+                            }else{
+                                $lang_native = false;
+                            }
+                            if($this->settings['icl_lso_display_lang']){
+                                $lang_translated = $lang['translated_name'];
+                            }else{
+                                $lang_translated = false;
+                            }
+                        }
+                        echo icl_disp_language($lang_native, $lang_translated, $lang_native_hidden, $lang_translated_hidden);
+                         ?>
+                    </a>
+                </li>
+                <?php endforeach; ?>
+            </ul>
+</div>
+<?php
+	}
+	
+	function custom_language_switcher_style(){
+        if(defined('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS') && ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS){
+            return;
+        }
+		$this->widget_css_defaults = $this->widget_css_defaults;
+        $add = false;
+        foreach($this->widget_css_defaults as $key=>$d){
+            if(isset($this->settings['icl_lang_sel_config'][$key]) && $this->settings['icl_lang_sel_config'][$key] != $d){
+                $this->settings['icl_lang_sel_config'][$key] . "\n";
+                $add = true;
+                break;
+            }
+        }
+        if($add){
+			$list = ($this->settings['icl_lang_sel_type'] == 'list') ? true : false;
+            echo "\n<style type=\"text/css\">";
+            foreach($this->settings['icl_lang_sel_config'] as $k=>$v){
+                switch($k){
+                    case 'font-current-normal': 
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							echo '#lang_sel_list a.lang_sel_sel, #lang_sel_list a.lang_sel_sel:visited{color:'.$v.';}';
+						else
+                            echo '#lang_sel a, #lang_sel a.lang_sel_sel{color:'.$v.';}'; 
+                        break;
+                    case 'font-current-hover': 
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							echo '#lang_sel_list a:hover, #lang_sel_list a.lang_sel_sel:hover{color:'.$v.';}';
+						else
+                            echo '#lang_sel a:hover, #lang_sel a.lang_sel_sel:hover{color:'.$v.';}';
+                        break;
+                    case 'background-current-normal': 
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							echo '#lang_sel_list a.lang_sel_sel, #lang_sel_list a.lang_sel_sel:visited{background-color:'.$v.';}';
+						else
+							echo '#lang_sel a.lang_sel_sel, #lang_sel a.lang_sel_sel:visited{background-color:'.$v.';}'; 
+                        break;
+                    case 'background-current-hover': 
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							echo '#lang_sel_list a.lang_sel_sel:hover{background-color:'.$v.';}'; 
+						else
+                            echo '#lang_sel a.lang_sel_sel:hover{background-color:'.$v.';}'; 
+                        break;
+                    case 'font-other-normal':
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							echo '#lang_sel_list ul a.lang_sel_other, #lang_sel_list ul a.lang_sel_other:visited{color:'.$v.';}'; 
+						else
+                            echo '#lang_sel li ul a, #lang_sel li ul a:visited{color:'.$v.';}'; 
+                        break;
+                    case 'font-other-hover': 
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							echo '#lang_sel_list ul a.lang_sel_other:hover{color:'.$v.';}'; 
+						else
+                            echo '#lang_sel li ul a:hover{color:'.$v.';}'; 
+                        break;
+                    case 'background-other-normal': 
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							 echo '#lang_sel_list ul a.lang_sel_other, #lang_sel li ul a:link, #lang_sel_list ul a.lang_sel_other:visited{background-color:'.$v.';}'; 
+						else
+                            echo '#lang_sel li ul a, #lang_sel li ul a:link, #lang_sel li ul a:visited{background-color:'.$v.';}'; 
+                        break;
+                    case 'background-other-hover': 
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							 echo '#lang_sel_list ul a.lang_sel_other:hover{background-color:'.$v.';}'; 
+						else
+                            echo '#lang_sel li ul a:hover{background-color:'.$v.';}'; 
+                        break;
+                    case 'border': 
+                        //if($v != $this->widget_css_defaults[$k])
+						if ($list)
+							 echo '#lang_sel_list a, #lang_sel_list a:visited{border-color:'.$v.';} #lang_sel_list  ul{border-top:1px solid '.$v.';}';
+						else
+                            echo '#lang_sel a, #lang_sel a:visited{border-color:'.$v.';} #lang_sel ul ul{border-top:1px solid '.$v.';}';
+                        break;
+                    
+                }
+            }
+            echo "</style>\n";
+        }
+    }
+} // end class
+
+
+
+
+
+// language switcher functions
+	function language_selector_widget($args){            
+    	global $sitepress, $sitepress_settings;
+    	extract($args, EXTR_SKIP);
+    	echo $before_widget;
+		if ($sitepress_settings['icl_widget_title_show']) {
+			echo $args['before_title'];
+			echo icl_t('WPML', 'Widget title', __('Languages','sitepress'));
+			echo $args['after_title'];
+		}
+    	$sitepress->language_selector();
+    	echo $after_widget;
+	}
+
+	function icl_lang_sel_nav_ob_start(){ 
+   		if(is_feed()) return;
+    	ob_start('icl_lang_sel_nav_prepend_css'); 
+	}
+
+	function icl_lang_sel_nav_ob_end(){ ob_end_flush();}
+
+	function icl_lang_sel_nav_prepend_css($buf){
+    	if(defined('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS') && ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS){
+    	    return $buf;
+   		}
+    	return preg_replace('#</title>#i','</title>' . PHP_EOL . PHP_EOL . icl_lang_sel_nav_css(false), $buf);
+	}
+
+	function icl_lang_sel_nav_css($show = true){
+    	if(defined('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS') && ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS){
+        	return '';
+    	}
+    	$link_tag = '<link rel="stylesheet" href="'. ICL_PLUGIN_URL . '/res/css/language-selector.css?v='.ICL_SITEPRESS_VERSION.'" type="text/css" media="all" />';
+    	if(!$show && (!isset($_GET['page']) || $_GET['page'] != ICL_PLUGIN_FOLDER . '/menu/languages.php')){
+        	return $link_tag;
+    	}else{
+        	echo $link_tag;
+    	}
+	}
+
+
+
+
+global $icl_language_switcher;
+$icl_language_switcher = new SitePressLanguageSwitcher;
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/not-compatible-plugins.php b/wp-content/plugins/sitepress-multilingual-cms/inc/not-compatible-plugins.php
new file mode 100644
index 0000000..53533ab
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/not-compatible-plugins.php
@@ -0,0 +1,44 @@
+<?php
+$icl_ncp_plugins = array(
+    'absolute-links/absolute-links-plugin.php',
+    'cms-navigation/CMS-Navigation.php'
+);  
+$active_plugins = get_option('active_plugins');
+
+$icl_ncp_plugins = array_intersect($icl_ncp_plugins, $active_plugins);
+
+if(!empty($icl_ncp_plugins)){
+    $icl_sitepress_disabled = true;
+    $icl_sitepress_idx = array_search('sitepress-multilingual-cms/sitepress.php', $active_plugins);
+    if(false !== $icl_sitepress_idx){
+        unset($active_plugins[$icl_sitepress_idx]);
+        update_option('active_plugins', $active_plugins);
+        unset($_GET['activate']);
+        $recently_activated = get_option('recently_activated');
+        if(!isset($recently_activated['sitepress-multilingual-cms/sitepress.php'])){
+            $recently_activated['sitepress-multilingual-cms/sitepress.php'] = time();
+            update_option('recently_activated', $recently_activated);
+        }
+    }
+    
+    
+    add_action('admin_notices', 'icl_incomp_plugins_warn');
+    function icl_incomp_plugins_warn(){
+        global $icl_ncp_plugins;
+        echo '<div class="error"><ul><li><strong>';
+        echo __('WPML cannot be activated together with these older plugins:', 'sitepress');
+        echo '<ul style="list-style:disc;margin:20px;">';
+        foreach($icl_ncp_plugins as $incp){
+            echo '<li>'.$incp.'</li>';
+        }
+        echo '</ul>';
+        echo __('WPML will be deactivated', 'sitepress');
+        echo '</strong></li></ul></div>';        
+    }
+}else{
+    $icl_sitepress_disabled = false;
+}
+
+
+
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/php-version-check.php b/wp-content/plugins/sitepress-multilingual-cms/inc/php-version-check.php
new file mode 100644
index 0000000..eec4c28
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/php-version-check.php
@@ -0,0 +1,66 @@
+<?php
+if(isset($_GET['icl_phpinfo']) && $_GET['icl_phpinfo']==1){
+    ob_start();
+    phpinfo();
+    $phpinfo = ob_get_contents();
+    ob_end_clean();
+    echo $phpinfo;
+    exit;
+}
+
+  if(version_compare(phpversion(), '5', '<')){
+      add_action('admin_notices', 'icl_php_version_warn');
+      add_action('admin_print_scripts', 'icl_php_version_warn_js');
+      
+      function icl_php_version_warn(){
+          echo '<div class="error"><ul><li><strong>';
+          echo __('WPML cannot be activated because your version of PHP is too old. To run correctly, you must have PHP5 installed.<br /> We recommend that you contact your hosting company and request them to switch you to PHP5.', 'sitepress');
+          echo sprintf('<br />PHP reports version %s -  (<a href="#phpinfo">show detailed phpinfo</a>)',phpversion());
+          echo '</strong></li></ul>';     
+          echo '<div id="phpinfo_container"></div>';               
+          echo '</div>';
+      }
+      
+      $active_plugins = get_option('active_plugins');
+      $icl_sitepress_idx = array_search('sitepress-multilingual-cms/sitepress.php', $active_plugins);
+      if(false !== $icl_sitepress_idx){
+          unset($active_plugins[$icl_sitepress_idx]);
+          update_option('active_plugins', $active_plugins);
+          unset($_GET['activate']);
+          $recently_activated = get_option('recently_activated');
+          if(!isset($recently_activated['sitepress-multilingual-cms/sitepress.php'])){
+              $recently_activated['sitepress-multilingual-cms/sitepress.php'] = time();
+              update_option('recently_activated', $recently_activated);
+          }
+      }  
+      define('PHP_VERSION_INCOMPATIBLE', true);    
+      
+      function icl_php_version_warn_js(){
+        ?>
+        <script type="text/javascript">        
+        addLoadEvent(function(){
+            jQuery('a[href="#phpinfo"]').click(function(){                
+                
+                var pleft = (jQuery('body').width() - 700)/2;
+                jQuery('#phpinfo_container').css('left', pleft+'px');
+                
+                jQuery('#phpinfo_container').html('<div style="background-color:#fff;padding-right:10px;font-weight:bold;text-align:right;"><a href="#phpinfo-close"><?php echo __('Close', 'sitepress')?></a></div><iframe width="700" height="600" src="<?php echo ICL_PLUGIN_URL ?>/inc/php-version-check.php?icl_phpinfo=1">Loading...</iframe>')
+                jQuery('a[href="#phpinfo-close"]').click(function(){
+                    jQuery('#phpinfo_container').html('');
+                });                
+            });
+        });        
+        </script>        
+        <style type="text/css">
+        #phpinfo_container{
+            position:absolute;
+            top:10px;
+            z-index:1000;
+            border:1px solid #ccc;
+            margin:0 auto;
+        }
+        </style>
+        <?php          
+      }
+  }  
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/plugins-texts-functions.php b/wp-content/plugins/sitepress-multilingual-cms/inc/plugins-texts-functions.php
new file mode 100644
index 0000000..c46a16e
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/plugins-texts-functions.php
@@ -0,0 +1,125 @@
+<?php
+  
+function icl_pt_get_texts(){
+    global $wpdb;
+    $active_plugins = get_option('active_plugins');    
+    $enabled_plugins = (array)get_option('icl_plugins_texts_enabled');
+    foreach($active_plugins as $ap){
+        $aps[] = "'" . $ap . "'";
+    }
+    $res = $wpdb->get_results("SELECT plugin_name, attribute_name, translate FROM {$wpdb->prefix}icl_plugins_texts WHERE plugin_name IN (". join(',', $aps).") ");
+    foreach($res as $r){  
+        $t = $r->translate?__('translate','sitepress'):__('synchronize','sitepress');      
+        $rs[$r->plugin_name][] = $r->attribute_name . ' (' . $t . ')';
+    }
+    foreach($active_plugins as $ap){    
+        $plugin_name_short = str_replace('_', ' ', false!==strpos($ap,'/')?dirname($ap):preg_replace('#\.php$#','',$ap));    
+        if(isset($rs[$ap])){
+            $fields_list = join(', ', $rs[$ap]);
+            $active = 1;
+        }else{
+            if($plugin_name_short=='sitepress-multilingual-cms'){
+                continue;
+            }
+            $fields_list = sprintf(__('WPML doesn\'t know how to translate this plugin. If it has texts that require translation, contact us by opening an issue in our forum: %s', 'sitepress'), '<a href="http://forum.wpml.org";>http://forum.wpml.org</a>');
+            $active = 0;
+        }                
+        //exception for WPML
+        if($plugin_name_short=='sitepress-multilingual-cms') $plugin_name_short = 'WPML';
+        $texts[] = array(
+            'active' => $active,
+            'enabled' => intval(in_array($ap, $enabled_plugins)),
+            'plugin_name' => $ap,
+            'plugin_name_short' => $plugin_name_short,
+            'fields_list' => $fields_list
+        );
+        
+    }
+    return $texts;
+} 
+
+function icl_get_posts_translatable_fields($only_sync = false){
+    global $wpdb;
+    $enabled_plugins = get_option('icl_plugins_texts_enabled');
+    if(!empty($enabled_plugins)){
+        foreach($enabled_plugins as $ap){
+            $aps[] = "'" . $ap . "'";
+        }    
+        if($only_sync == true){
+            $extra_cond = ' AND translate = 0';
+        }else{
+            $extra_cond = '';
+        }
+        $res = $wpdb->get_results("SELECT plugin_name, attribute_name, attribute_type, translate FROM {$wpdb->prefix}icl_plugins_texts WHERE plugin_name IN (". join(',', $aps).") {$extra_cond}");
+    }else{
+        $res = array();
+    }
+    return $res;
+} 
+
+function icl_pt_sync_pugins_texts($post_id, $trid){
+    global $sitepress;
+    if(!$trid) return;
+    $translations = $sitepress->get_element_translations($trid);
+    $fields_2_sync = icl_get_posts_translatable_fields(true);
+    $custom_fields = array();
+    foreach($fields_2_sync as $f2s){
+        if($f2s->attribute_type == 'custom_field'){
+            $custom_fields[] = $f2s->attribute_name;
+        }
+    } 
+    if(!empty($custom_fields)){
+        $sitepress->sync_custom_fields($post_id, $custom_fields, true);
+    }    
+}
+
+function icl_pt_handle_upload(){
+    global $wpdb;    
+    $file = $_FILES['plugins_texts_csv'];
+    
+    $fh = fopen($file['tmp_name'], 'r');
+    $uplerr = false;
+    while($data = fgetcsv($fh)){
+        if(count($data) != 5){
+            $uplerr = __('Incorrect CSV file format (there should be exactly 5 columns).','sitepress');            
+            break;
+        }
+        if($data[4] != 0  && $data[4] != 1){
+            $uplerr = __('The fifth column values should be \'0\' or \'1\'.','sitepress');            
+            break;
+        }        
+        if(!isset($plugin)){
+            $plugin = $data[0];
+        }else{
+            if($data[0] != $plugin){
+                $uplerr = __('Inconsistent plugin name (the first column should have identical values).','sitepress');                
+                break;
+            }
+        }                
+    }
+    fclose($fh);            
+    if($file['error']==0 && $file['size'] && !$uplerr){
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_plugins_texts WHERE plugin_name='{$plugin}'");
+        $fh = fopen($file['tmp_name'], 'rb');
+        while($data = fgetcsv($fh)){
+            $wpdb->insert($wpdb->prefix.'icl_plugins_texts', array(   
+                    'plugin_name'=>substr($data[0],0,128),
+                    'attribute_type' => substr($data[1], 0, 64),
+                    'attribute_name' => substr($data[2], 0, 128),
+                    'description'    => $data[3],
+                    'translate'      => $data[4]
+                )
+            );
+        }
+        fclose($fh);
+    }else{      
+        if(!$file['size']){
+            $uplerr = __('Please select a CSV file to upload.', 'sitepress');            
+        }elseif(!$uplerr){
+            $uplerr = $file['error'];
+        }
+    }    
+    return $uplerr;        
+}
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/potx.inc b/wp-content/plugins/sitepress-multilingual-cms/inc/potx.inc
new file mode 100644
index 0000000..b53e00f
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/potx.inc
@@ -0,0 +1,1503 @@
+<?php
+// $Id: potx.inc,v 1.1.2.17.2.7.2.19.4.1 2009/07/19 12:54:42 goba Exp $
+
+/**
+ * @file
+ *   Extraction API used by the web and command line interface.
+ *
+ *   This include file implements the default string and file version
+ *   storage as well as formatting of POT files for web download or
+ *   file system level creation. The strings, versions and file contents
+ *   are handled with global variables to reduce the possible memory overhead
+ *   and API clutter of passing them around. Custom string and version saving
+ *   functions can be implemented to use the functionality provided here as an
+ *   API for Drupal code to translatable string conversion.
+ *
+ *   The potx-cli.php script can be used with this include file as
+ *   a command line interface to string extraction. The potx.module
+ *   can be used as a web interface for manual extraction.
+ *
+ *   For a module using potx as an extraction API, but providing more
+ *   sophisticated functionality on top of it, look into the
+ *   'Localization server' module: http://drupal.org/project/l10n_server
+ */
+
+/**
+ * Silence status reports.
+ */
+define('POTX_STATUS_SILENT', 0);
+
+/**
+ * Drupal message based status reports.
+ */
+define('POTX_STATUS_MESSAGE', 1);
+
+/**
+ * Command line status reporting.
+ * 
+ * Status goes to standard output, errors to standard error.
+ */
+define('POTX_STATUS_CLI', 2);
+
+/**
+ * Structured array status logging.
+ *
+ * Useful for coder review status reporting.
+ */
+define('POTX_STATUS_STRUCTURED', 3);
+
+/**
+ * Core parsing mode:
+ *  - .info files folded into general.pot
+ *  - separate files generated for modules
+ */
+define('POTX_BUILD_CORE', 0);
+
+/**
+ * Multiple files mode:
+ *  - .info files folded into their module pot files
+ *  - separate files generated for modules
+ */
+define('POTX_BUILD_MULTIPLE', 1);
+
+/**
+ * Single file mode:
+ *  - all files folded into one pot file
+ */
+define('POTX_BUILD_SINGLE', 2);
+
+/**
+ * Save string to both installer and runtime collection.
+ */
+define('POTX_STRING_BOTH', 0);
+
+/**
+ * Save string to installer collection only.
+ */
+define('POTX_STRING_INSTALLER', 1);
+
+/**
+ * Save string to runtime collection only.
+ */
+define('POTX_STRING_RUNTIME', 2);
+
+/**
+ * Parse source files in Drupal 5.x format.
+ */
+define('POTX_API_5', 5);
+
+/**
+ * Parse source files in Drupal 6.x format.
+ * 
+ * Changes since 5.x documented at http://drupal.org/node/114774
+ */
+define('POTX_API_6', 6);
+
+/**
+ * Parse source files in Drupal 7.x format.
+ * 
+ * Changes since 6.x documented at http://drupal.org/node/224333
+ */
+define('POTX_API_7', 7);
+
+/**
+ * When no context is used. Makes it easy to look these up.
+ */
+define('POTX_CONTEXT_NONE', NULL);
+
+/**
+ * When there was a context identification error.
+ */
+define('POTX_CONTEXT_ERROR', FALSE);
+
+/**
+ * Process a file and put extracted information to the given parameters.
+ *
+ * @param $file_path
+ *   Comlete path to file to process.
+ * @param $strip_prefix
+ *   An integer denoting the number of chars to strip from filepath for output.
+ * @param $save_callback
+ *   Callback function to use to save the collected strings.
+ * @param $version_callback
+ *   Callback function to use to save collected version numbers.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_process_file($file_path, $strip_prefix = 0, $save_callback = '_potx_save_string', $version_callback = '_potx_save_version', $api_version = POTX_API_6) {
+  global $_potx_tokens, $_potx_lookup;
+
+  // Figure out the basename and extension to select extraction method.
+  $basename = basename($file_path);
+  $name_parts = pathinfo($basename);
+
+  // Always grab the CVS version number from the code
+  $code = file_get_contents($file_path);
+  $file_name = $strip_prefix > 0 ? substr($file_path, $strip_prefix) : $file_path;
+  _potx_find_version_number($code, $file_name, $version_callback);
+
+  // Extract raw PHP language tokens.
+  $raw_tokens = token_get_all($code);
+  unset($code);
+
+  // Remove whitespace and possible HTML (the later in templates for example),
+  // count line numbers so we can include them in the output.
+  $_potx_tokens = array();
+  $_potx_lookup = array();
+  $token_number = 0;
+  $line_number = 1;
+  foreach ($raw_tokens as $token) {    
+    if ((!is_array($token)) || (($token[0] != T_WHITESPACE) && ($token[0] != T_INLINE_HTML))) {
+      if (is_array($token)) {
+        $token[] = $line_number;
+         // Fill array for finding token offsets quickly.         
+         if ($token[0] == T_STRING || ($token[0] == T_VARIABLE && ($token[1] == '_e' || $token[1] == '__'))) {
+           if (!isset($_potx_lookup[$token[1]])) {
+             $_potx_lookup[$token[1]] = array();
+           }
+           $_potx_lookup[$token[1]][] = $token_number;
+         }
+      }
+      $_potx_tokens[] = $token;
+      $token_number++;
+    } 
+    // Collect line numbers.
+    if (is_array($token)) {
+      $line_number += count(explode("\n", $token[1])) - 1;
+    }
+    else {
+      $line_number += count(explode("\n", $token)) - 1;
+    }
+  }
+  unset($raw_tokens);
+                                                                
+  // Drupal 7 onwards supports context on t().
+  _potx_find_t_calls_with_context($file_name, $save_callback, '_e');
+  _potx_find_t_calls_with_context($file_name, $save_callback, '__');
+}
+
+/**
+ * Creates complete file strings with _potx_store()
+ *
+ * @param $string_mode
+ *   Strings to generate files for: POTX_STRING_RUNTIME or POTX_STRING_INSTALLER.
+ * @param $build_mode
+ *   Storage mode used: single, multiple or core
+ * @param $force_name
+ *   Forces a given file name to get used, if single mode is on, without extension
+ * @param $save_callback
+ *   Callback used to save strings previously.
+ * @param $version_callback
+ *   Callback used to save versions previously.
+ * @param $header_callback
+ *   Callback to invoke to get the POT header.
+ * @param $template_export_langcode
+ *   Language code if the template should have language dependent content
+ *   (like plural formulas and language name) included.
+ * @param $translation_export_langcode
+ *   Language code if translations should also be exported.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_build_files($string_mode = POTX_STRING_RUNTIME, $build_mode = POTX_BUILD_SINGLE, $force_name = 'general',  $save_callback = '_potx_save_string', $version_callback = '_potx_save_version', $header_callback = '_potx_get_header', $template_export_langcode = NULL, $translation_export_langcode = NULL, $api_version = POTX_API_6) {
+  global $_potx_store;
+
+  // Get strings and versions by reference.
+  $strings  = $save_callback(NULL, NULL, NULL, 0, $string_mode);
+  $versions = $version_callback();
+
+  // We might not have any string recorded in this string mode.
+  if (!is_array($strings)) {
+    return;
+  }
+
+  foreach ($strings as $string => $string_info) {
+    foreach ($string_info as $context => $file_info) {
+      // Build a compact list of files this string occured in.
+      $occured = $file_list = array();
+      // Look for strings appearing in multiple directories (ie.
+      // different subprojects). So we can include them in general.pot.
+      $last_location = dirname(array_shift(array_keys($file_info)));
+      $multiple_locations = FALSE;
+      foreach ($file_info as $file => $lines) {
+        $occured[] = "$file:". join(';', $lines);
+        if (isset($versions[$file])) {
+          $file_list[] = $versions[$file];
+        }
+        if (dirname($file) != $last_location) {
+          $multiple_locations = TRUE;
+        }
+        $last_location = dirname($file);
+      }
+  
+      // Mark duplicate strings (both translated in the app and in the installer).
+      $comment = join(" ", $occured);
+      if (strpos($comment, '(dup)') !== FALSE) {
+        $comment = '(duplicate) '. str_replace('(dup)', '', $comment);
+      }
+      $output = "#: $comment\n";
+  
+      if ($build_mode == POTX_BUILD_SINGLE) {
+        // File name forcing in single mode.
+        $file_name = $force_name;
+      }
+      elseif (strpos($comment, '.info')) {
+        // Store .info file strings either in general.pot or the module pot file,
+        // depending on the mode used.
+        $file_name = ($build_mode == POTX_BUILD_CORE ? 'general' : str_replace('.info', '.module', $file_name));
+      }
+      elseif ($multiple_locations) {
+        // Else if occured more than once, store in general.pot.
+        $file_name = 'general';
+      }
+      else {
+        // Fold multiple files in the same folder into one.
+        if (empty($last_location) || $last_location == '.') {
+          $file_name = 'root';
+        }
+        else {
+          $file_name = str_replace('/', '-', $last_location);
+        }
+      }
+      
+  
+      if (strpos($string, "\0") !== FALSE) {
+        // Plural strings have a null byte delimited format.
+        list($singular, $plural) = explode("\0", $string);
+        $output .= "msgid \"$singular\"\n";
+        $output .= "msgid_plural \"$plural\"\n";
+        if (!empty($context)) {
+          $output .= "msgctxt \"$context\"\n";
+        }
+        if (isset($translation_export_langcode)) {
+          $output .= _potx_translation_export($translation_export_langcode, $singular, $plural, $api_version);
+        }
+        else {
+          $output .= "msgstr[0] \"\"\n";
+          $output .= "msgstr[1] \"\"\n";
+        }
+      }
+      else {
+        // Simple strings.
+        $output .= "msgid \"$string\"\n";
+        if (!empty($context)) {
+          $output .= "msgctxt \"$context\"\n";
+        }
+        if (isset($translation_export_langcode)) {
+          $output .= _potx_translation_export($translation_export_langcode, $string, NULL, $api_version);
+        }
+        else {
+          $output .= "msgstr \"\"\n";
+        }
+      }
+      $output .= "\n";
+
+      // Store the generated output in the given file storage.
+      if (!isset($_potx_store[$file_name])) {
+        $_potx_store[$file_name] = array(
+          'header'  => $header_callback($file_name, $template_export_langcode, $api_version),
+          'sources' => $file_list,
+          'strings' => $output,
+          'count'   => 1,
+        );
+      }
+      else {
+        // Maintain a list of unique file names.
+        $_potx_store[$file_name]['sources']  = array_unique(array_merge($_potx_store[$file_name]['sources'], $file_list));
+        $_potx_store[$file_name]['strings'] .= $output;
+        $_potx_store[$file_name]['count']   += 1;
+      }
+    }
+  }
+}
+
+/**
+ * Export translations with a specific language.
+ *
+ * @param $translation_export_langcode
+ *   Language code if translations should also be exported.
+ * @param $string
+ *   String or singular version if $plural was provided.
+ * @param $plural
+ *   Plural version of singular string.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_translation_export($translation_export_langcode, $string, $plural = NULL, $api_version = POTX_API_6) {
+  include_once 'includes/locale.inc';
+  
+  // Stip out slash escapes.
+  $string = stripcslashes($string);
+  
+  // Column and table name changed between versions.
+  $language_column = $api_version > POTX_API_5 ? 'language' : 'locale';
+  $language_table  = $api_version > POTX_API_5 ? 'languages' : 'locales_meta';
+  
+  if (!isset($plural)) {
+    // Single string to look translation up for.
+    if ($translation = db_result(db_query("SELECT t.translation FROM {locales_source} s LEFT JOIN {locales_target} t ON t.lid = s.lid WHERE s.source = '%s' AND t.{$language_column} = '%s'", $string, $translation_export_langcode))) {
+      return 'msgstr '. _locale_export_string($translation);
+    }
+    return "msgstr \"\"\n";
+  }
+  
+  else {
+    // String with plural variants. Fill up source string array first.
+    $plural = stripcslashes($plural);
+    $strings = array();
+    $number_of_plurals = db_result(db_query('SELECT plurals FROM {'. $language_table ."} WHERE {$language_column} = '%s'", $translation_export_langcode));
+    $plural_index = 0;
+    while ($plural_index < $number_of_plurals) {
+      if ($plural_index == 0) {
+        // Add the singular version.
+        $strings[] = $string;
+      }
+      elseif ($plural_index == 1) {
+        // Only add plural version if required.
+        $strings[] = $plural;
+      }
+      else {
+        // More plural versions only if required, with the lookup source
+        // string modified as imported into the database.
+        $strings[] = str_replace('@count', '@count['. $plural_index .']', $plural);
+      }
+      $plural_index++;
+    }
+    
+    $output = '';
+    if (count($strings)) {
+      // Source string array was done, so export translations.
+      foreach ($strings as $index => $string) {
+        if ($translation = db_result(db_query("SELECT t.translation FROM {locales_source} s LEFT JOIN {locales_target} t ON t.lid = s.lid WHERE s.source = '%s' AND t.{$language_column} = '%s'", $string, $translation_export_langcode))) {
+          $output .= 'msgstr['. $index .'] '. _locale_export_string(_locale_export_remove_plural($translation));
+        }
+        else {
+          $output .= "msgstr[". $index ."] \"\"\n";
+        }
+      }
+    }
+    else {
+      // No plural information was recorded, so export empty placeholders.
+      $output .= "msgstr[0] \"\"\n";
+      $output .= "msgstr[1] \"\"\n";
+    }
+    return $output;
+  }
+}
+
+/**
+ * Returns a header generated for a given file
+ *
+ * @param $file
+ *   Name of POT file to generate header for
+ * @param $template_export_langcode
+ *   Language code if the template should have language dependent content
+ *   (like plural formulas and language name) included.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_get_header($file, $template_export_langcode = NULL, $api_version = POTX_API_6) {
+  // We only have language to use if we should export with that langcode.
+  $language = NULL;
+  if (isset($template_export_langcode)) {
+    $language = db_fetch_object(db_query($api_version > POTX_API_5 ? "SELECT language, name, plurals, formula FROM {languages} WHERE language = '%s'" : "SELECT locale, name, plurals, formula FROM {locales_meta} WHERE locale = '%s'", $template_export_langcode));
+  }
+
+  $output  = '# $'.'Id'.'$'."\n";
+  $output .= "#\n";
+  $output .= '# '. (isset($language) ? $language->name : 'LANGUAGE') .' translation of Drupal ('. $file .")\n";
+  $output .= "# Copyright YEAR NAME <EMAIL ADDRESS>\n";
+  $output .= "# --VERSIONS--\n";
+  $output .= "#\n";
+  $output .= "#, fuzzy\n";
+  $output .= "msgid \"\"\n";
+  $output .= "msgstr \"\"\n";
+  $output .= "\"Project-Id-Version: PROJECT VERSION\\n\"\n";
+  $output .= '"POT-Creation-Date: '. date("Y-m-d H:iO") ."\\n\"\n";
+  $output .= '"PO-Revision-Date: '. (isset($language) ? date("Y-m-d H:iO") : 'YYYY-mm-DD HH:MM+ZZZZ') ."\\n\"\n";
+  $output .= "\"Last-Translator: NAME <EMAIL ADDRESS>\\n\"\n";
+  $output .= "\"Language-Team: ". (isset($language) ? $language->name : 'LANGUAGE') ." <EMAIL ADDRESS>\\n\"\n";
+  $output .= "\"MIME-Version: 1.0\\n\"\n";
+  $output .= "\"Content-Type: text/plain; charset=utf-8\\n\"\n";
+  $output .= "\"Content-Transfer-Encoding: 8bit\\n\"\n";
+  if (isset($language->formula) && isset($language->plurals)) {
+    $output .= "\"Plural-Forms: nplurals=". $language->plurals ."; plural=". strtr($language->formula, array('$' => '')) .";\\n\"\n\n";
+  }
+  else {
+    $output .= "\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\\n\"\n\n";
+  }
+  return $output;
+}
+
+/**
+ * Write out generated files to the current folder.
+ *
+ * @param $http_filename
+ *   File name for content-disposition header in case of usage
+ *   over HTTP. If not given, files are written to the local filesystem.
+ * @param $content_disposition
+ *   See RFC2183. 'inline' or 'attachment', with a default of
+ *   'inline'. Only used if $http_filename is set.
+ * @todo
+ *   Look into whether multiple files can be output via HTTP.
+ */
+function _potx_write_files($http_filename = NULL, $content_disposition = 'inline') {
+  global $_potx_store;
+
+  // Generate file lists and output files.
+  if (is_array($_potx_store)) {
+    foreach ($_potx_store as $file => $contents) {
+      // Build replacement for file listing.
+      if (count($contents['sources']) > 1) {
+        $filelist = "Generated from files:\n#  " . join("\n#  ", $contents['sources']);
+      }
+      elseif (count($contents['sources']) == 1) {
+        $filelist = "Generated from file: " . join('', $contents['sources']);
+      }
+      else {
+        $filelist = 'No version information was available in the source files.';
+      }
+      $output = str_replace('--VERSIONS--', $filelist, $contents['header'] . $contents['strings']);
+  
+      if ($http_filename) {
+        // HTTP output.
+        header('Content-Type: text/plain; charset=utf-8');
+        header('Content-Transfer-Encoding: 8bit');
+        header("Content-Disposition: $content_disposition; filename=$http_filename");
+        print $output;
+        return;
+      }
+      else {
+        // Local file output, flatten directory structure.
+        $file = str_replace('.', '-', preg_replace('![/]?([a-zA-Z_0-9]*/)*!', '', $file)) .'.pot';
+        $fp = fopen($file, 'w');
+        fwrite($fp, $output);
+        fclose($fp);
+      }
+    }
+  }
+}
+
+/**
+ * Escape quotes in a strings depending on the surrounding
+ * quote type used.
+ *
+ * @param $str
+ *   The strings to escape
+ */
+function _potx_format_quoted_string($str) {
+  $quo = substr($str, 0, 1);
+  $str = substr($str, 1, -1);
+  if ($quo == '"') {
+    $str = stripcslashes($str);
+  }
+  else {
+    $str = strtr($str, array("\\'" => "'", "\\\\" => "\\"));
+  }
+  return addcslashes($str, "\0..\37\\\"");
+}
+
+/**
+ * Output a marker error with an extract of where the error was found.
+ *
+ * @param $file
+ *   Name of file
+ * @param $line
+ *   Line number of error
+ * @param $marker
+ *   Function name with which the error was identified
+ * @param $ti
+ *   Index on the token array
+ * @param $error
+ *   Helpful error message for users.
+ * @param $docs_url
+ *   Documentation reference.
+ */
+function _potx_marker_error($file, $line, $marker, $ti, $error, $docs_url = NULL) {
+  global $_potx_tokens;
+  
+  $tokens = '';
+  $ti += 2;
+  $tc = count($_potx_tokens);
+  $par = 1;
+  while ((($tc - $ti) > 0) && $par) {
+    if (is_array($_potx_tokens[$ti])) {
+      $tokens .= $_potx_tokens[$ti][1];
+    }
+    else {
+      $tokens .= $_potx_tokens[$ti];
+      if ($_potx_tokens[$ti] == "(") {
+        $par++;
+      }
+      else if ($_potx_tokens[$ti] == ")") {
+        $par--;
+      }
+    }
+    $ti++;
+  }
+  potx_status('error', $error, $file, $line, $marker .'('. $tokens, $docs_url);
+}
+
+/**
+ * Status notification function.
+ *
+ * @param $op
+ *   Operation to perform or type of message text.
+ *     - set:    sets the reporting mode to $value
+ *               use one of the POTX_STATUS_* constants as $value
+ *     - get:    returns the list of error messages recorded
+ *               if $value is true, it also clears the internal message cache
+ *     - error:  sends an error message in $value with optional $file and $line
+ *     - status: sends a status message in $value
+ * @param $value
+ *   Value depending on $op.
+ * @param $file
+ *   Name of file the error message is related to.
+ * @param $line
+ *   Number of line the error message is related to.
+ * @param $excerpt
+ *   Excerpt of the code in question, if available.
+ * @param $docs_url
+ *   URL to the guidelines to follow to fix the problem.
+ */
+function potx_status($op, $value = NULL, $file = NULL, $line = NULL, $excerpt = NULL, $docs_url = NULL) {
+  static $mode = POTX_STATUS_CLI;
+  static $messages = array();
+  
+  switch ($op) {
+    case 'set':
+      // Setting the reporting mode.
+      $mode = $value;
+      return;
+
+    case 'get':
+      // Getting the errors. Optionally deleting the messages.
+      $errors = $messages;
+      if (!empty($value)) {
+        $messages = array();
+      }
+      return $errors;
+
+    case 'error':
+    case 'status':
+      
+      // Location information is required in 3 of the four possible reporting
+      // modes as part of the error message. The structured mode needs the
+      // file, line and excerpt info separately, not in the text.
+      $location_info = '';
+      if (($mode != POTX_STATUS_STRUCTURED) && isset($file)) {
+        if (isset($line)) {
+          if (isset($excerpt)) {
+            $location_info = t('At %excerpt in %file on line %line.', array('%excerpt' => $excerpt, '%file' => $file, '%line' => $line));
+          }
+          else {
+            $location_info = t('In %file on line %line.', array('%file' => $file, '%line' => $line));
+          }
+        }
+        else {
+          if (isset($excerpt)) {
+            $location_info = t('At %excerpt in %file.', array('%excerpt' => $excerpt, '%file' => $file));
+          }
+          else {
+            $location_info = t('In %file.', array('%file' => $file));
+          }
+        }
+      }
+      
+      // Documentation helpers are provided as readable text in most modes.
+      $read_more = '';
+      if (($mode != POTX_STATUS_STRUCTURED) && isset($docs_url)) {
+        $read_more = ($mode == POTX_STATUS_CLI) ? t('Read more at @url', array('@url' => $docs_url)) : t('Read more at <a href="@url">@url</a>', array('@url' => $docs_url));
+      }
+      
+      // Error message or progress text to display.
+      switch ($mode) {
+        case POTX_STATUS_MESSAGE:
+          drupal_set_message(join(' ', array($value, $location_info, $read_more)), $op);
+          break;
+        case POTX_STATUS_CLI:
+          fwrite($op == 'error' ? STDERR : STDOUT, join("\n", array($value, $location_info, $read_more)) ."\n\n");
+          break;
+        case POTX_STATUS_SILENT:
+          if ($op == 'error') {
+            $messages[] = join(' ', array($value, $location_info, $read_more));
+          }
+          break;
+        case POTX_STATUS_STRUCTURED:
+          if ($op == 'error') {
+            $messages[] = array($value, $file, $line, $excerpt, $docs_url);
+          }
+          break;
+      }
+      return;
+  }
+}
+
+/**
+ * Detect all occurances of t()-like calls.
+ *
+ * These sequences are searched for:
+ *   T_STRING("$function_name") + "(" + T_CONSTANT_ENCAPSED_STRING + ")"
+ *   T_STRING("$function_name") + "(" + T_CONSTANT_ENCAPSED_STRING + ","
+ *
+ * @param $file
+ *   Name of file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ * @param function_name
+ *   The name of the function to look for (could be 't', '$t', 'st'
+ *   or any other t-like function).
+ * @param $string_mode
+ *   String mode to use: POTX_STRING_INSTALLER, POTX_STRING_RUNTIME or
+ *   POTX_STRING_BOTH.
+ */
+function _potx_find_t_calls($file, $save_callback, $function_name = 't', $string_mode = POTX_STRING_RUNTIME) {
+  global $_potx_tokens, $_potx_lookup;
+  
+  // Lookup tokens by function name.
+  if (isset($_potx_lookup[$function_name])) {
+    foreach ($_potx_lookup[$function_name] as $ti) {
+      list($ctok, $par, $mid, $rig) = array($_potx_tokens[$ti], $_potx_tokens[$ti+1], $_potx_tokens[$ti+2], $_potx_tokens[$ti+3]);
+      list($type, $string, $line) = $ctok;
+      if ($par == "(") {
+        if (in_array($rig, array(")", ","))
+          && (is_array($mid) && ($mid[0] == T_CONSTANT_ENCAPSED_STRING))) {
+            // This function is only used for context-less call types.
+            $save_callback(_potx_format_quoted_string($mid[1]), POTX_CONTEXT_NONE, $file, $line, $string_mode);
+        }
+        else {
+          // $function_name() found, but inside is something which is not a string literal.
+          _potx_marker_error($file, $line, $function_name, $ti, t('The first parameter to @function() should be a literal string. There should be no variables, concatenation, constants or other non-literal strings there.', array('@function' => $function_name)), 'http://drupal.org/node/322732');
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Detect all occurances of t()-like calls from Drupal 7 (with context).
+ *
+ * These sequences are searched for:
+ *   T_STRING("$function_name") + "(" + T_CONSTANT_ENCAPSED_STRING + ")"
+ *   T_STRING("$function_name") + "(" + T_CONSTANT_ENCAPSED_STRING + ","
+ *   and then an optional value for the replacements and an optional array
+ *   for the options with an optional context key.
+ *
+ * @param $file
+ *   Name of file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ * @param function_name
+ *   The name of the function to look for (could be 't', '$t', 'st'
+ *   or any other t-like function). Drupal 7 only supports context on t().
+ * @param $string_mode
+ *   String mode to use: POTX_STRING_INSTALLER, POTX_STRING_RUNTIME or
+ *   POTX_STRING_BOTH.
+ */
+function _potx_find_t_calls_with_context($file, $save_callback, $function_name = '_e', $string_mode = POTX_STRING_RUNTIME) {
+  global $_potx_tokens, $_potx_lookup;
+  
+  // Lookup tokens by function name.
+  if (isset($_potx_lookup[$function_name])) {       
+    foreach ($_potx_lookup[$function_name] as $ti) {
+      list($ctok, $par, $mid, $rig) = array($_potx_tokens[$ti], $_potx_tokens[$ti+1], $_potx_tokens[$ti+2], $_potx_tokens[$ti+3]);
+      list($type, $string, $line) = $ctok;
+      if ($par == "(") {
+        if (in_array($rig, array(")", ","))
+          && (is_array($mid) && ($mid[0] == T_CONSTANT_ENCAPSED_STRING))) {
+          // By default, there is no context.
+          $context = POTX_CONTEXT_NONE;
+          if ($rig == ',') {
+            // If there was a comma after the string, we need to look forward
+            // to try and find the context.
+            /*$context = _potx_find_context($ti, $ti + 4, $file, $function_name);*/
+            $context = trim($_potx_tokens[$ti+4][1],"\"' ");
+            
+          }
+          if ($context !== POTX_CONTEXT_ERROR) {
+            // Only save if there was no error in context parsing.
+            $save_callback(_potx_format_quoted_string($mid[1]), $context, $file, $line, $string_mode);
+          }
+        }
+        else {
+          // $function_name() found, but inside is something which is not a string literal.
+          _potx_marker_error($file, $line, $function_name, $ti, t('The first parameter to @function() should be a literal string. There should be no variables, concatenation, constants or other non-literal strings there.', array('@function' => $function_name)), 'http://drupal.org/node/322732');
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Detect all occurances of watchdog() calls. Only from Drupal 6.
+ *
+ * These sequences are searched for:
+ *   watchdog + "(" + T_CONSTANT_ENCAPSED_STRING + "," +
+ *   T_CONSTANT_ENCAPSED_STRING + something
+ *
+ * @param $file
+ *   Name of file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ */
+function _potx_find_watchdog_calls($file, $save_callback) {
+  global $_potx_tokens, $_potx_lookup;
+  
+  // Lookup tokens by function name.
+  if (isset($_potx_lookup['watchdog'])) {
+    foreach ($_potx_lookup['watchdog'] as $ti) {
+      list($ctok, $par, $mtype, $comma, $message, $rig) = array($_potx_tokens[$ti], $_potx_tokens[$ti+1], $_potx_tokens[$ti+2], $_potx_tokens[$ti+3], $_potx_tokens[$ti+4], $_potx_tokens[$ti+5]);
+      list($type, $string, $line) = $ctok;
+      if ($par == '(') {
+        // Both type and message should be a string literal.
+        if (in_array($rig, array(')', ',')) && $comma == ','
+          && (is_array($mtype) && ($mtype[0] == T_CONSTANT_ENCAPSED_STRING))
+          && (is_array($message) && ($message[0] == T_CONSTANT_ENCAPSED_STRING))) {
+            // Context is not supported on watchdog().
+            $save_callback(_potx_format_quoted_string($mtype[1]), POTX_CONTEXT_NONE, $file, $line);
+            $save_callback(_potx_format_quoted_string($message[1]), POTX_CONTEXT_NONE, $file, $line);
+        }
+        else {
+          // watchdog() found, but inside is something which is not a string literal.
+          _potx_marker_error($file, $line, 'watchdog', $ti, t('The first two watchdog() parameters should be literal strings. There should be no variables, concatenation, constants or even a t() call there.'), 'http://drupal.org/node/323101');
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Detect all occurances of format_plural calls.
+ *
+ * These sequences are searched for:
+ *   T_STRING("format_plural") + "(" + ..anything (might be more tokens).. +
+ *   "," + T_CONSTANT_ENCAPSED_STRING +
+ *   "," + T_CONSTANT_ENCAPSED_STRING + parenthesis (or comma allowed from
+ *   Drupal 6)
+ *
+ * @param $file
+ *   Name of file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_find_format_plural_calls($file, $save_callback, $api_version = POTX_API_6) {
+  global $_potx_tokens, $_potx_lookup;
+
+  if (isset($_potx_lookup['format_plural'])) {
+    foreach ($_potx_lookup['format_plural'] as $ti) {
+      list($ctok, $par1) = array($_potx_tokens[$ti], $_potx_tokens[$ti+1]);
+      list($type, $string, $line) = $ctok;
+      if ($par1 == "(") {
+        // Eat up everything that is used as the first parameter
+        $tn = $ti + 2;
+        $depth = 0;
+        while (!($_potx_tokens[$tn] == "," && $depth == 0)) {
+          if ($_potx_tokens[$tn] == "(") {
+            $depth++;
+          }
+          elseif ($_potx_tokens[$tn] == ")") {
+            $depth--;
+          }
+          $tn++;
+        }
+        // Get further parameters
+        list($comma1, $singular, $comma2, $plural, $par2) = array($_potx_tokens[$tn], $_potx_tokens[$tn+1], $_potx_tokens[$tn+2], $_potx_tokens[$tn+3], $_potx_tokens[$tn+4]);
+        if (($comma2 == ',') && ($par2 == ')' || ($par2 == ',' && $api_version > POTX_API_5)) &&
+          (is_array($singular) && ($singular[0] == T_CONSTANT_ENCAPSED_STRING)) &&
+          (is_array($plural) && ($plural[0] == T_CONSTANT_ENCAPSED_STRING))) {
+          // By default, there is no context.
+          $context = POTX_CONTEXT_NONE;
+          if ($par2 == ',' && $api_version > POTX_API_6) {
+            // If there was a comma after the plural, we need to look forward
+            // to try and find the context.
+            $context = _potx_find_context($ti, $tn + 5, $file, 'format_plural');
+          }
+          if ($context !== POTX_CONTEXT_ERROR) {
+            // Only save if there was no error in context parsing.
+            $save_callback(
+              _potx_format_quoted_string($singular[1]) ."\0". _potx_format_quoted_string($plural[1]),
+              $context,
+              $file,
+              $line
+            );
+          }
+        }
+        else {
+          // format_plural() found, but the parameters are not correct.
+          _potx_marker_error($file, $line, "format_plural", $ti, t('In format_plural(), the singular and plural strings should be literal strings. There should be no variables, concatenation, constants or even a t() call there.'), 'http://drupal.org/node/323072');
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Detect permission names from the hook_perm() implementations.
+ * Note that this will get confused with a similar pattern in a comment,
+ * and with dynamic permissions, which need to be accounted for.
+ *
+ * @param $file
+ *   Full path name of file parsed.
+ * @param $filebase
+ *   Filenaname of file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ */
+function _potx_find_perm_hook($file, $filebase, $save_callback) {
+  global $_potx_tokens, $_potx_lookup;
+
+  if (isset($_potx_lookup[$filebase .'_perm'])) {
+    // Special case for node module, because it uses dynamic permissions.
+    // Include the static permissions by hand. That's about all we can do here.
+    if ($filebase == 'node') {
+      $line = $_potx_tokens[$_potx_lookup['node_perm'][0]][2];
+      // List from node.module 1.763 (checked in on 2006/12/29 at 21:25:36 by drumm)
+      $nodeperms = array('administer content types', 'administer nodes', 'access content', 'view revisions', 'revert revisions');
+      foreach ($nodeperms as $item) {
+        // hook_perm() is only ever found on a Drupal system which does not
+        // support context.
+        $save_callback($item, POTX_CONTEXT_NONE, $file, $line);
+      }
+    }
+    else {
+      $count = 0;
+      foreach ($_potx_lookup[$filebase .'_perm'] as $ti) {
+        $tn = $ti;
+        while (is_array($_potx_tokens[$tn]) || $_potx_tokens[$tn] != '}') {
+          if (is_array($_potx_tokens[$tn]) && $_potx_tokens[$tn][0] == T_CONSTANT_ENCAPSED_STRING) {
+            // hook_perm() is only ever found on a Drupal system which does not
+            // support context.
+            $save_callback(_potx_format_quoted_string($_potx_tokens[$tn][1]), POTX_CONTEXT_NONE, $file, $_potx_tokens[$tn][2]);
+            $count++;
+          }
+          $tn++;
+        }
+      }
+      if (!$count) {
+        potx_status('error', t('%hook should have an array of literal string permission names.', array('%hook' => $filebase .'_perm()')), $file, NULL, NULL, 'http://drupal.org/node/323101');
+      }
+    }
+  }
+}
+
+/**
+ * Helper function to look up the token closing the current function.
+ *
+ * @param $here
+ *   The token at the function name
+ */
+function _potx_find_end_of_function($here) {
+  global $_potx_tokens;
+
+  // Seek to open brace.
+  while (is_array($_potx_tokens[$here]) || $_potx_tokens[$here] != '{') {
+    $here++;
+  }
+  $nesting = 1;
+  while ($nesting > 0) {
+    $here++;
+    if (!is_array($_potx_tokens[$here])) {
+      if ($_potx_tokens[$here] == '}') {
+        $nesting--;
+      }
+      if ($_potx_tokens[$here] == '{') {
+        $nesting++;
+      }
+    }
+  }
+  return $here;
+}
+
+/**
+ * Helper to move past t() and format_plural() arguments in search of context.
+ *
+ * @param $here
+ *   The token before the start of the arguments
+ */
+function _potx_skip_args($here) {
+  global $_potx_tokens;
+
+  $nesting = 0;
+  // Go through to either the end of the function call or to a comma
+  // after the current position on the same nesting level.
+  while (!(($_potx_tokens[$here] == ',' && $nesting == 0) || 
+           ($_potx_tokens[$here] == ')' && $nesting == -1))) {
+    $here++;
+    if (!is_array($_potx_tokens[$here])) {
+      if ($_potx_tokens[$here] == ')') {
+        $nesting--;
+      }
+      if ($_potx_tokens[$here] == '(') {
+        $nesting++;
+      }
+    }
+  }
+  // If we run out of nesting, it means we reached the end of the function call,
+  // so we skipped the arguments but did not find meat for looking at the 
+  // specified context.
+  return ($nesting == 0 ? $here : FALSE);
+}
+
+/**
+ * Helper to find the value for 'context' on t() and format_plural().
+ *
+ * @param $tf
+ *   Start position of the original function.
+ * @param $ti
+ *   Start position where we should search from.
+ * @param $file
+ *   Full path name of file parsed.
+ * @param function_name
+ *   The name of the function to look for. Either 'format_plural' or 't'
+ *   given that Drupal 7 only supports context on these.
+ */
+function _potx_find_context($tf, $ti, $file, $function_name) {
+  global $_potx_tokens;
+
+  // Start from after the comma and skip the possible arguments for the function
+  // so we can look for the context.
+  if (($ti = _potx_skip_args($ti)) && ($_potx_tokens[$ti] == ',')) {
+    // Now we actually might have some definition for a context. The $options 
+    // argument is coming up, which might have a key for context.
+    echo "TI:" . $ti."\n";
+    list($com, $arr, $par) = array($_potx_tokens[$ti], $_potx_tokens[$ti+1], $_potx_tokens[$ti+2]);
+    if ($com == ',' && $arr[1] == 'array' && $par == '(') {
+      $nesting = 0;
+      $ti += 3;
+      // Go through to either the end of the array or to the key definition of
+      // context on the same nesting level.
+      while (!((is_array($_potx_tokens[$ti]) && (in_array($_potx_tokens[$ti][1], array('"context"', "'context'"))) && ($_potx_tokens[$ti][0] == T_CONSTANT_ENCAPSED_STRING) && ($nesting == 0)) || 
+               ($_potx_tokens[$ti] == ')' && $nesting == -1))) {
+        $ti++;
+        if (!is_array($_potx_tokens[$ti])) {
+          if ($_potx_tokens[$ti] == ')') {
+            $nesting--;
+          }
+          if ($_potx_tokens[$ti] == '(') {
+            $nesting++;
+          }
+        }
+      }
+      if ($nesting == 0) {
+        // Found the 'context' key on the top level of the $options array.
+        list($arw, $str) = array($_potx_tokens[$ti+1], $_potx_tokens[$ti+2]);
+        if (is_array($arw) && $arw[1] == '=>' && is_array($str) && $str[0] == T_CONSTANT_ENCAPSED_STRING) {
+          return _potx_format_quoted_string($str[1]);
+        }
+        else {
+          list($type, $string, $line) = $_potx_tokens[$ti];
+          // @todo: fix error reference.
+          _potx_marker_error($file, $line, $function_name, $tf, t('The context element in the options array argument to @function() should be a literal string. There should be no variables, concatenation, constants or other non-literal strings there.', array('@function' => $function_name)), 'http://drupal.org/node/322732');
+          // Return with error.
+          return POTX_CONTEXT_ERROR;
+        }
+      }
+      else {
+        // Did not found 'context' key in $options array.
+        return POTX_CONTEXT_NONE;
+      }
+    }
+  }
+  
+  // After skipping args, we did not find a comma to look for $options.
+  return POTX_CONTEXT_NONE;
+}
+
+/**
+ * List of menu item titles. Only from Drupal 6.
+ *
+ * @param $file
+ *   Full path name of file parsed.
+ * @param $filebase
+ *   Filenaname of file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ */
+function _potx_find_menu_hook($file, $filebase, $save_callback) {
+  global $_potx_tokens, $_potx_lookup;
+  
+  if (isset($_potx_lookup[$filebase .'_menu']) && is_array($_potx_lookup[$filebase .'_menu'])) {
+    // We have a menu hook in this file.
+    foreach ($_potx_lookup[$filebase .'_menu'] as $ti) {
+      $end = _potx_find_end_of_function($ti);
+      $tn = $ti;
+      while ($tn < $end) {
+        // Look through the code until the end of the function.
+        if ($_potx_tokens[$tn][0] == T_CONSTANT_ENCAPSED_STRING && in_array($_potx_tokens[$tn][1], array("'title'", '"title"', "'description'", '"description"')) && $_potx_tokens[$tn+1][0] == T_DOUBLE_ARROW) {
+          if ($_potx_tokens[$tn+2][0] == T_CONSTANT_ENCAPSED_STRING) {
+            // Menu items support no context.
+            $save_callback(
+              _potx_format_quoted_string($_potx_tokens[$tn+2][1]),
+              POTX_CONTEXT_NONE,
+              $file,
+              $_potx_tokens[$tn+2][2]
+            );
+            $tn+=2; // Jump forward by 2.
+          }
+          else {
+            potx_status('error', t('Invalid menu %element definition found in %hook. Title and description keys of the menu array should be literal strings.', array('%element' => $_potx_tokens[$tn][1], '%hook' => $filebase .'_menu()')), $file, $_potx_tokens[$tn][2], NULL, 'http://drupal.org/node/323101');
+          }
+        }
+        $tn++;
+      }
+    }
+  }
+}
+
+/**
+ * Get languages names from Drupal's locale.inc.
+ *
+ * @param $file
+ *   Full path name of file parsed
+ * @param $save_callback
+ *   Callback function used to save strings.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_find_language_names($file, $save_callback, $api_version = POTX_API_6) {
+  global $_potx_tokens, $_potx_lookup;
+
+  foreach ($_potx_lookup[$api_version > POTX_API_5 ? '_locale_get_predefined_list' : '_locale_get_iso639_list'] as $ti) {
+    // Search for the definition of _locale_get_predefined_list(), not where it is called.
+    if ($_potx_tokens[$ti-1][0] == T_FUNCTION) {
+      break;
+    }
+  }
+    
+  $end = _potx_find_end_of_function($ti);
+  $ti += 7; // function name, (, ), {, return, array, (
+  while ($ti < $end) {
+    while ($_potx_tokens[$ti][0] != T_ARRAY) {
+      if (!is_array($_potx_tokens[$ti]) && $_potx_tokens[$ti] == ';') {
+        // We passed the end of the list, break out to function level
+        // to prevent an infinite loop.
+        break 2;
+      }
+      $ti++;
+    }
+    $ti += 2; // array, (
+    // Language names are context-less.
+    $save_callback(_potx_format_quoted_string($_potx_tokens[$ti][1]), POTX_CONTEXT_NONE, $file, $_potx_tokens[$ti][2]);
+  }
+}
+
+/**
+ * Get the exact CVS version number from the file, so we can
+ * push that into the generated output.
+ *
+ * @param $code
+ *   Complete source code of the file parsed.
+ * @param $file
+ *   Name of the file parsed.
+ * @param $version_callback
+ *   Callback used to save the version information.
+ */
+function _potx_find_version_number($code, $file, $version_callback) {
+  // Prevent CVS from replacing this pattern with actual info.
+  if (preg_match('!\\$I'.'d: ([^\\$]+) Exp \\$!', $code, $version_info)) {
+    $version_callback($version_info[1], $file);
+  }
+  else {
+    // Unknown version information.
+    $version_callback($file .': n/a', $file);
+  }
+}
+
+/**
+ * Add date strings, which cannot be extracted otherwise.
+ * This is called for locale.module.
+ *
+ * @param $file
+ *   Name of the file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_add_date_strings($file, $save_callback, $api_version = POTX_API_6) {
+  for ($i = 1; $i <= 12; $i++) {
+    $stamp = mktime(0, 0, 0, $i, 1, 1971);
+    if ($api_version > POTX_API_6) {
+      // From Drupal 7, long month names are saved with this context.
+      $save_callback(date("F", $stamp), 'Long month name', $file);
+    }
+    elseif ($api_version > POTX_API_5) {
+      // Drupal 6 uses a little hack. No context.
+      $save_callback('!long-month-name '. date("F", $stamp), POTX_CONTEXT_NONE, $file);
+    }
+    else {
+      // Older versions just accept the confusion, no context.
+      $save_callback(date("F", $stamp), POTX_CONTEXT_NONE, $file);
+    }
+    // Short month names lack a context anyway.
+    $save_callback(date("M", $stamp), POTX_CONTEXT_NONE, $file);
+  }
+  for ($i = 0; $i <= 7; $i++) {
+    $stamp = $i * 86400;
+    $save_callback(date("D", $stamp), POTX_CONTEXT_NONE, $file);
+    $save_callback(date("l", $stamp), POTX_CONTEXT_NONE, $file);
+  }
+  $save_callback('am', POTX_CONTEXT_NONE, $file);
+  $save_callback('pm', POTX_CONTEXT_NONE, $file);
+  $save_callback('AM', POTX_CONTEXT_NONE, $file);
+  $save_callback('PM', POTX_CONTEXT_NONE, $file);
+}
+
+/**
+ * Add format_interval special strings, which cannot be
+ * extracted otherwise. This is called for common.inc
+ *
+ * @param $file
+ *   Name of the file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_add_format_interval_strings($file, $save_callback, $api_version = POTX_API_6) {
+  $components = array(
+    '1 year' => '@count years',
+    '1 week' => '@count weeks',
+    '1 day'  => '@count days',
+    '1 hour' => '@count hours',
+    '1 min'  => '@count min',
+    '1 sec'  => '@count sec'
+  );
+  if ($api_version > POTX_API_6) {
+    // Month support added in Drupal 7.
+    $components['1 month'] = '@count months';
+  }
+
+  foreach ($components as $singular => $plural) {
+    // Intervals support no context.
+    $save_callback($singular ."\0". $plural, POTX_CONTEXT_NONE, $file);
+  }
+}
+
+/**
+ * Add default theme region names, which cannot be extracted otherwise.
+ * These default names are defined in system.module
+ *
+ * @param $file
+ *   Name of the file parsed.
+ * @param $save_callback
+ *   Callback function used to save strings.
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_add_default_region_names($file, $save_callback, $api_version = POTX_API_6) {
+  $regions = array(
+    'left' => 'Left sidebar',
+    'right' => 'Right sidebar',
+    'content' => 'Content',
+    'header' => 'Header',
+    'footer' => 'Footer',
+  );
+  if ($api_version > POTX_API_6) {
+    // @todo: Update with final region list when D7 stabilizes.
+    $regions['highlight'] = 'Highlighted content';
+    $regions['help'] = 'Help';
+    $regions['page_top'] = 'Page top';
+  }
+  foreach ($regions as $region) {
+    // Regions come with the default context.
+    $save_callback($region, POTX_CONTEXT_NONE, $file);
+  }
+}
+
+/**
+ * Parse an .info file and add relevant strings to the list.
+ *
+ * @param $file_path
+ *   Complete file path to load contents with.
+ * @param $file_name
+ *   Stripped file name to use in outpout.
+ * @param $strings
+ *   Current strings array
+ * @param $api_version
+ *   Drupal API version to work with.
+ */
+function _potx_find_info_file_strings($file_path, $file_name, $save_callback, $api_version = POTX_API_6) {
+  $info = array();
+
+  if (file_exists($file_path)) {
+    $info = $api_version > POTX_API_5 ? drupal_parse_info_file($file_path) : parse_ini_file($file_path);
+  }
+
+  // We need the name, description and package values. Others,
+  // like core and PHP compatibility, timestamps or versions
+  // are not to be translated.
+  foreach (array('name', 'description', 'package') as $key) {
+    if (isset($info[$key])) {
+      // No context support for .info file strings.
+      $save_callback($info[$key], POTX_CONTEXT_NONE, $file_name);
+    }
+  }
+  
+  // Add regions names from themes.
+  if (isset($info['regions']) && is_array($info['regions'])) {
+    foreach ($info['regions'] as $region => $region_name) {
+      // No context support for .info file strings.
+      $save_callback($region_name, POTX_CONTEXT_NONE, $file_name);
+    }
+  }
+}
+
+/**
+ * Parse a JavaScript file for translatables. Only from Drupal 6.
+ *
+ * Extracts strings wrapped in Drupal.t() and Drupal.formatPlural()
+ * calls and inserts them into potx storage.
+ *
+ * Regex code lifted from _locale_parse_js_file().
+ */
+function _potx_parse_js_file($code, $file, $save_callback) {
+  $js_string_regex = '(?:(?:\'(?:\\\\\'|[^\'])*\'|"(?:\\\\"|[^"])*")(?:\s*\+\s*)?)+';
+  
+  // Match all calls to Drupal.t() in an array.
+  // Note: \s also matches newlines with the 's' modifier.
+  preg_match_all('~[^\w]Drupal\s*\.\s*t\s*\(\s*('. $js_string_regex .')\s*[,\)]~s', $code, $t_matches, PREG_SET_ORDER);
+  if (isset($t_matches) && count($t_matches)) {
+    foreach ($t_matches as $match) {
+      // Remove match from code to help us identify faulty Drupal.t() calls.
+      $code = str_replace($match[0], '', $code);
+      // @todo: figure out how to parse out context, once Drupal supports it.
+      $save_callback(_potx_parse_js_string($match[1]), POTX_CONTEXT_NONE, $file, 0);
+    }
+  }
+
+  // Match all Drupal.formatPlural() calls in another array.
+  preg_match_all('~[^\w]Drupal\s*\.\s*formatPlural\s*\(\s*.+?\s*,\s*('. $js_string_regex .')\s*,\s*((?:(?:\'(?:\\\\\'|[^\'])* count(?:\\\\\'|[^\'])*\'|"(?:\\\\"|[^"])* count(?:\\\\"|[^"])*")(?:\s*\+\s*)?)+)\s*[,\)]~s', $code, $plural_matches, PREG_SET_ORDER);
+  if (isset($plural_matches) && count($plural_matches)) {
+    foreach ($plural_matches as $index => $match) {
+      // Remove match from code to help us identify faulty
+      // Drupal.formatPlural() calls later.
+      $code = str_replace($match[0], '', $code);
+      // @todo: figure out how to parse out context, once Drupal supports it.
+      $save_callback(
+        _potx_parse_js_string($match[1]) ."\0". _potx_parse_js_string($match[2]),
+        POTX_CONTEXT_NONE,
+        $file,
+        0
+      );
+    }
+  }
+  
+  // Any remaining Drupal.t() or Drupal.formatPlural() calls are evil. This
+  // regex is not terribly accurate (ie. code wrapped inside will confuse
+  // the match), but we only need some unique part to identify the faulty calls.
+  preg_match_all('~[^\w]Drupal\s*\.\s*(t|formatPlural)\s*\([^)]+\)~s', $code, $faulty_matches, PREG_SET_ORDER);
+  if (isset($faulty_matches) && count($faulty_matches)) {
+    foreach ($faulty_matches as $index => $match) {
+      $message = ($match[1] == 't') ? t('Drupal.t() calls should have a single literal string as their first parameter.') : t('The singular and plural string parameters on Drupal.formatPlural() calls should be literal strings, plural containing a @count placeholder.');
+      potx_status('error', $message, $file, NULL, $match[0], 'http://drupal.org/node/323109');
+    }
+  }
+}
+
+/**
+ * Clean up string found in JavaScript source code. Only from Drupal 6.
+ */
+function _potx_parse_js_string($string) {
+  return _potx_format_quoted_string(implode('', preg_split('~(?<!\\\\)[\'"]\s*\+\s*[\'"]~s', $string)));
+}
+
+/**
+ * Collect a list of file names relevant for extraction,
+ * starting from the given path.
+ *
+ * @param $path
+ *   Where to start searching for files recursively.
+ *   Provide non-empty path values with a trailing slash.
+ * @param $basename
+ *   Allows the restriction of search to a specific basename
+ *   (ie. to collect files for a specific module).
+ * @param $api_version
+ *   Drupal API version to work with.
+ * @todo
+ *   Add folder exceptions for other version control systems.
+ */
+function _potx_explore_dir($path = '', $basename = '*', $api_version = POTX_API_6) {
+  // It would be so nice to just use GLOB_BRACE, but it is not available on all
+  // operarting systems, so we are working around the missing functionality.
+  $extensions = array('php', 'inc', 'module', 'engine', 'theme', 'install', 'info', 'profile');
+  if ($api_version > POTX_API_5) {
+    $extensions[] = 'js';
+  }
+  $files = array();
+  foreach ($extensions as $extension) {
+    $files_here = glob($path . $basename .'.'. $extension);
+    if (is_array($files_here)) {
+      $files = array_merge($files, $files_here);
+    }
+    if ($basename != '*') {
+      // Basename was specific, so look for things like basename.admin.inc as well.
+      // If the basnename was *, the above glob() already covered this case.
+      $files_here = glob($path . $basename .'.*.'. $extension);
+      if (is_array($files_here)) {
+        $files = array_merge($files, $files_here);
+      }
+    }
+  }
+  
+  // Grab subdirectories.
+  $dirs = glob($path .'*', GLOB_ONLYDIR);
+  if (is_array($dirs)) {
+    foreach ($dirs as $dir) {
+      if (!preg_match("!(^|.+/)(CVS|.svn|.git)$!", $dir)) {
+        $files = array_merge($files, _potx_explore_dir("$dir/", $basename));
+      }
+    }
+  }
+  // Skip our own files, because we don't want to get strings from them 
+  // to appear in the output, especially with the command line interface.
+  // TODO: fix this to be able to autogenerate templates for potx itself.
+  foreach ($files as $id => $file_name) {
+    if (preg_match('!(potx-cli.php|potx.inc)$!', $file_name)) {
+      unset($files[$id]);
+    }
+  }
+  return $files;
+}
+
+/**
+ * Default $version_callback used by the potx system. Saves values
+ * to a global array to reduce memory consumption problems when
+ * passing around big chunks of values.
+ *
+ * @param $value
+ *   The ersion number value of $file. If NULL, the collected
+ *   values are returned.
+ * @param $file
+ *   Name of file where the version information was found.
+ */
+function _potx_save_version($value = NULL, $file = NULL) {
+  global $_potx_versions;
+  
+  if (isset($value)) {
+    $_potx_versions[$file] = $value;
+  }
+  else {
+    return $_potx_versions;
+  }
+}
+
+/**
+ * Default $save_callback used by the potx system. Saves values
+ * to global arrays to reduce memory consumption problems when
+ * passing around big chunks of values.
+ *
+ * @param $value
+ *   The string value. If NULL, the array of collected values
+ *   are returned for the given $string_mode.
+ * @param $context
+ *   From Drupal 7, separate contexts are supported. POTX_CONTEXT_NONE is 
+ *   the default, if the code does not specify a context otherwise.
+ * @param $file
+ *   Name of file where the string was found.
+ * @param $line
+ *   Line number where the string was found.
+ * @param $string_mode
+ *   String mode: POTX_STRING_INSTALLER, POTX_STRING_RUNTIME
+ *   or POTX_STRING_BOTH.
+ */
+function _potx_save_string($value = NULL, $context = NULL, $file = NULL, $line = 0, $string_mode = POTX_STRING_RUNTIME) {
+  global $_potx_strings, $_potx_install;
+  
+  if (isset($value)) {
+    switch ($string_mode) {
+      case POTX_STRING_BOTH:
+        // Mark installer strings as duplicates of runtime strings if
+        // the string was both recorded in the runtime and in the installer.
+        $_potx_install[$value][$context][$file][] = $line .' (dup)';
+        // Break intentionally missing.
+      case POTX_STRING_RUNTIME:
+        // Mark runtime strings as duplicates of installer strings if
+        // the string was both recorded in the runtime and in the installer.
+        $_potx_strings[$value][$context][$file][] = $line . ($string_mode == POTX_STRING_BOTH ? ' (dup)' : '');
+        break;
+      case POTX_STRING_INSTALLER:
+        $_potx_install[$value][$context][$file][] = $line;
+        break;
+    }
+  }
+  else {
+    return ($string_mode == POTX_STRING_RUNTIME ? $_potx_strings : $_potx_install);
+  }
+}
+
+if (!function_exists('t')) {
+  // If invoked outside of Drupal, t() will not exist, but
+  // used to format the error message, so we provide a replacement.
+  function t($string, $args = array()) {
+    return strtr($string, $args);
+  }
+}
+
+if (!function_exists('drupal_parse_info_file')) {
+  // If invoked outside of Drupal, drupal_parse_info_file() will not be available,
+  // but we need this function to properly parse Drupal 6/7 .info files.
+  // Directly copied from common.inc,v 1.704 2007/10/19 10:30:54 goba Exp.
+  function drupal_parse_info_file($filename) {
+    $info = array();
+  
+    if (!file_exists($filename)) {
+      return $info;
+    }
+  
+    $data = file_get_contents($filename);
+    if (preg_match_all('
+      @^\s*                           # Start at the beginning of a line, ignoring leading whitespace
+      ((?:
+        [^=;\[\]]|                    # Key names cannot contain equal signs, semi-colons or square brackets,
+        \[[^\[\]]*\]                  # unless they are balanced and not nested
+      )+?)
+      \s*=\s*                         # Key/value pairs are separated by equal signs (ignoring white-space)
+      (?:
+        ("(?:[^"]|(?<=\\\\)")*")|     # Double-quoted string, which may contain slash-escaped quotes/slashes
+        (\'(?:[^\']|(?<=\\\\)\')*\')| # Single-quoted string, which may contain slash-escaped quotes/slashes
+        ([^\r\n]*?)                   # Non-quoted string
+      )\s*$                           # Stop at the next end of a line, ignoring trailing whitespace
+      @msx', $data, $matches, PREG_SET_ORDER)) {
+      foreach ($matches as $match) {
+        // Fetch the key and value string
+        $i = 0;
+        foreach (array('key', 'value1', 'value2', 'value3') as $var) {
+          $$var = isset($match[++$i]) ? $match[$i] : '';
+        }
+        $value = stripslashes(substr($value1, 1, -1)) . stripslashes(substr($value2, 1, -1)) . $value3;
+  
+        // Parse array syntax
+        $keys = preg_split('/\]?\[/', rtrim($key, ']'));
+        $last = array_pop($keys);
+        $parent = &$info;
+  
+        // Create nested arrays
+        foreach ($keys as $key) {
+          if ($key == '') {
+            $key = count($parent);
+          }
+          if (!isset($parent[$key]) || !is_array($parent[$key])) {
+            $parent[$key] = array();
+          }
+          $parent = &$parent[$key];
+        }
+  
+        // Handle PHP constants
+        if (defined($value)) {
+          $value = constant($value);
+        }
+  
+        // Insert actual value
+        if ($last == '') {
+          $last = count($parent);
+        }
+        $parent[$last] = $value;
+      }
+    }
+  
+    return $info;
+  }
+}
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/pre-wp3-compatibility.php b/wp-content/plugins/sitepress-multilingual-cms/inc/pre-wp3-compatibility.php
new file mode 100644
index 0000000..457d878
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/pre-wp3-compatibility.php
@@ -0,0 +1,40 @@
+<?php 
+if(version_compare(preg_replace('#-(.+)#','',$wp_version), '3.0', '<')){
+    define('ICL_PRE_WP3', true);
+
+    // redirect post-new.php?post_type='page' to page-new.php
+    if(is_admin() && $pagenow=='post-new.php' && isset($_GET['post_type']) && $_GET['post_type']=='page'){
+        header("HTTP/1.1 301 Moved Permanently");
+        header("Location: page-new.php?".$_SERVER['QUERY_STRING']);
+        exit;
+    }
+    
+    if(is_admin() && $pagenow=='edit-tags.php' && isset($_GET['taxonomy']) && $_GET['taxonomy']=='category'){
+        header("HTTP/1.1 301 Moved Permanently");
+        header("Location: categories.php?".$_SERVER['QUERY_STRING']);
+        exit;
+    }
+    
+    
+}else{
+    define('ICL_PRE_WP3', false);
+}
+
+if(!isset($wp_post_types)){
+    $__pw3_post = new stdClass();
+    $__pw3_post->labels = new stdClass();
+    $__pw3_post->labels->name = 'Posts';
+    $__pw3_post->labels->singular_name = 'Post';
+
+    $__pw3_page = new stdClass();
+    $__pw3_page->labels = new stdClass();
+    $__pw3_page->labels->name = 'Pages';
+    $__pw3_page->labels->singular_name = 'Page';
+    
+    $wp_post_types = array(
+        'post' => $__pw3_post,
+        'page' => $__pw3_page,
+    );
+    unset($__pw3_post, $__pw3_page);
+}
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/sitepress-schema.php b/wp-content/plugins/sitepress-multilingual-cms/inc/sitepress-schema.php
new file mode 100644
index 0000000..0b332d7
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/sitepress-schema.php
@@ -0,0 +1,389 @@
+<?php
+function icl_sitepress_activate(){
+    if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'error_scrape'){
+        return;
+    }
+    global $wpdb;
+    global $EZSQL_ERROR;
+    require_once(ICL_PLUGIN_PATH . '/inc/lang-data.inc');
+    //defines $langs_names
+
+    if ( method_exists($wpdb, 'has_cap') && $wpdb->has_cap( 'collation' ) ) {
+            if ( ! empty($wpdb->charset) )
+                    $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
+            if ( ! empty($wpdb->collate) )
+                    $charset_collate .= " COLLATE $wpdb->collate";
+    }else{
+        $charset_collate = '';
+    }    
+    
+    // languages table
+    $table_name = $wpdb->prefix.'icl_languages';            
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = " 
+        CREATE TABLE `{$table_name}` (
+            `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+            `code` VARCHAR( 7 ) NOT NULL ,
+            `english_name` VARCHAR( 128 ) NOT NULL ,            
+            `major` TINYINT NOT NULL DEFAULT '0', 
+            `active` TINYINT NOT NULL ,
+            `default_locale` VARCHAR( 8 ),
+            UNIQUE KEY `code` (`code`),
+            UNIQUE KEY `english_name` (`english_name`)
+        ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+        
+        //$langs_names is defined in ICL_PLUGIN_PATH . '/inc/lang-data.inc'
+        foreach($langs_names as $key=>$val){
+            if(strpos($key,'Norwegian Bokm')===0){ $key = 'Norwegian Bokmål'; $lang_codes[$key] = 'nb';} // exception for norwegian
+            $default_locale = isset($lang_locales[$lang_codes[$key]]) ? $lang_locales[$lang_codes[$key]] : '';
+            @$wpdb->insert($wpdb->prefix . 'icl_languages', array('english_name'=>$key, 'code'=>$lang_codes[$key], 'major'=>$val['major'], 'active'=>0, 'default_locale'=>$default_locale));
+        }        
+    }
+
+    // languages translations table
+    $add_languages_translations = false;
+    $table_name = $wpdb->prefix.'icl_languages_translations';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+        CREATE TABLE `{$table_name}` (
+            `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+            `language_code`  VARCHAR( 7 ) NOT NULL ,
+            `display_language_code` VARCHAR( 7 ) NOT NULL ,            
+            `name` VARCHAR( 255 ) CHARACTER SET utf8 NOT NULL,
+            UNIQUE(`language_code`, `display_language_code`)            
+        ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+        $add_languages_translations = true;
+    }
+    //else{
+        // this table will not be trucated on upgrade starting with WPML 1.7.3
+        // $add_languages_translations sticks to false;
+        //if(!defined('ICL_PRESERVE_LANGUAGES_TRANSLATIONS') || !ICL_PRESERVE_LANGUAGES_TRANSLATIONS){
+        //    mysql_query("TRUNCATE TABLE `{$table_name}`");
+        //    $add_languages_translations = true;
+        //}        
+    //}
+    
+    if($add_languages_translations){
+        foreach($langs_names as $lang=>$val){        
+            if(strpos($lang,'Norwegian Bokm')===0){ $lang = 'Norwegian Bokmål'; $lang_codes[$lang] = 'nb';}
+            foreach($val['tr'] as $k=>$display){        
+                if(strpos($k,'Norwegian Bokm')===0){ $k = 'Norwegian Bokmål';}
+                if(!trim($display)){
+                    $display = $lang;
+                }
+                if(!($wpdb->get_var("SELECT id FROM {$table_name} WHERE language_code='{$lang_codes[$lang]}' AND display_language_code='{$lang_codes[$k]}'"))){
+                    $wpdb->insert($wpdb->prefix . 'icl_languages_translations', array('language_code'=>$lang_codes[$lang], 'display_language_code'=>$lang_codes[$k], 'name'=>$display));
+                }
+            }    
+        }        
+    }
+    
+
+    // translations
+    $table_name = $wpdb->prefix.'icl_translations';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+        CREATE TABLE `{$table_name}` (
+            `translation_id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+            `element_type` VARCHAR( 32 ) NOT NULL DEFAULT 'post',
+            `element_id` BIGINT NOT NULL ,
+            `trid` BIGINT NOT NULL ,
+            `language_code` VARCHAR( 7 ) NOT NULL,
+            `source_language_code` VARCHAR( 7 ),
+            UNIQUE KEY `el_type_id` (`element_type`,`element_id`),
+            UNIQUE KEY `trid_lang` (`trid`,`language_code`)
+        ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+    } 
+
+    // languages locale file names
+    $table_name = $wpdb->prefix.'icl_locale_map';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+            CREATE TABLE `{$table_name}` (
+                `code` VARCHAR( 8 ) NOT NULL ,
+                `locale` VARCHAR( 8 ) NOT NULL ,
+                UNIQUE (`code` ,`locale`)
+            ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+    } 
+    
+    // flags table    
+   $table_name = $wpdb->prefix.'icl_flags';
+   if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+            CREATE TABLE `{$table_name}` (
+            `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+            `lang_code` VARCHAR( 10 ) NOT NULL ,
+            `flag` VARCHAR( 32 ) NOT NULL ,
+            `from_template` TINYINT NOT NULL DEFAULT '0',
+            UNIQUE (`lang_code`)
+            ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+        $codes = $wpdb->get_col("SELECT code FROM {$wpdb->prefix}icl_languages");
+        foreach($codes as $code){
+            if(!$code || $wpdb->get_var("SELECT lang_code FROM {$wpdb->prefix}icl_flags WHERE lang_code='{$code}'")) continue;
+            if(!file_exists(ICL_PLUGIN_PATH.'/res/flags/'.$code.'.png')){
+                $file = 'nil.png';
+            }else{
+                $file = $code.'.png';
+            }    
+            $wpdb->insert($wpdb->prefix.'icl_flags', array('lang_code'=>$code, 'flag'=>$file, 'from_template'=>0));
+        }
+    } 
+    
+    // plugins texts table
+    $table_name = $wpdb->prefix.'icl_plugins_texts';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+            CREATE TABLE `{$table_name}` (
+            `id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+            `plugin_name` VARCHAR( 128 ) NOT NULL ,
+            `attribute_type` VARCHAR( 64 ) NOT NULL ,
+            `attribute_name` VARCHAR( 128 ) NOT NULL ,
+            `description` TEXT NOT NULL ,
+            `translate` TINYINT NOT NULL DEFAULT 0,
+            UNIQUE KEY `plugin_name` (`plugin_name`,`attribute_type`,`attribute_name`)            
+            ) ENGINE=MyISAM {$charset_collate}"; 
+       mysql_query($sql);
+       $prepop  = array(
+            0 => array(
+                'plugin_name' => 'sitepress-multilingual-cms/sitepress.php',
+                'attribute_type' => 'custom_field',
+                'attribute_name' => '_top_nav_excluded',
+                'description' => 'Exclude page from top navigation',
+                'translate' => 0
+                ),
+            1 => array(
+                'plugin_name' => 'sitepress-multilingual-cms/sitepress.php',
+                'attribute_type' => 'custom_field',
+                'attribute_name' => '_cms_nav_minihome',
+                'description' => 'Sets page as a mini home in CMS Navigation',
+                'translate' => 0
+                ),
+            2 => array(
+                'plugin_name' => 'sitepress-multilingual-cms/sitepress.php',
+                'attribute_type' => 'custom_field',
+                'attribute_name' => '_cms_nav_section',
+                'description' => 'Defines the section the page belong to',
+                'translate' => 1
+                ),
+            3 => array(
+                'plugin_name' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
+                'attribute_type' => 'custom_field',
+                'attribute_name' => 'title',
+                'description' => 'Custom title for post/page',
+                'translate' => 1
+                ),
+            4 => array(
+                'plugin_name' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
+                'attribute_type' => 'custom_field',
+                'attribute_name' => 'description',
+                'description' => 'Custom description for post/page',
+                'translate' => 1
+                ),
+            5 => array(
+                'plugin_name' => 'all-in-one-seo-pack/all_in_one_seo_pack.php',
+                'attribute_type' => 'custom_field',
+                'attribute_name' => 'keywords',
+                'description' => 'Custom keywords for post/page',
+                'translate' => 1
+                )
+       );   
+       
+       foreach($prepop as $pre){
+           $wpdb->insert($table_name, $pre);
+       }         
+   }   
+   
+   /* general string translation */
+    $table_name = $wpdb->prefix.'icl_strings';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+            CREATE TABLE `{$table_name}` (
+              `id` bigint(20) unsigned NOT NULL auto_increment,
+              `language` varchar(10) NOT NULL,
+              `context` varchar(160) NOT NULL,
+              `name` varchar(160) NOT NULL,
+              `value` text NOT NULL,
+              `status` TINYINT NOT NULL,
+              PRIMARY KEY  (`id`),
+              UNIQUE KEY `context_name` (`context`,`name`)
+            ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+    }
+    
+    $table_name = $wpdb->prefix.'icl_string_translations';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+            CREATE TABLE `{$table_name}` (
+              `id` bigint(20) unsigned NOT NULL auto_increment,
+              `string_id` bigint(20) unsigned NOT NULL,
+              `language` varchar(10) NOT NULL,
+              `status` tinyint(4) NOT NULL,
+              `value` text NOT NULL,              
+              PRIMARY KEY  (`id`),
+              UNIQUE KEY `string_language` (`string_id`,`language`)
+            ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+    }
+    
+    $table_name = $wpdb->prefix.'icl_string_status';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+             CREATE TABLE `{$table_name}` (
+            `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+            `rid` BIGINT NOT NULL ,
+            `string_translation_id` BIGINT NOT NULL ,
+            `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
+            `md5` VARCHAR( 32 ) NOT NULL,
+            INDEX ( `string_translation_id` )
+            ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+    }
+
+    $table_name = $wpdb->prefix.'icl_string_positions';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+             CREATE TABLE `{$table_name}` (
+            `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+            `string_id` BIGINT NOT NULL ,
+            `kind` TINYINT,
+            `position_in_page` VARCHAR( 255 ) NOT NULL,
+            INDEX ( `string_id` )
+            ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+    }    
+       
+    // message status table
+    $table_name = $wpdb->prefix.'icl_message_status';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+             CREATE TABLE `{$table_name}` (
+                  `id` bigint(20) unsigned NOT NULL auto_increment,
+                  `rid` bigint(20) unsigned NOT NULL,
+                  `object_id` bigint(20) unsigned NOT NULL,
+                  `from_language` varchar(10) NOT NULL,
+                  `to_language` varchar(10) NOT NULL,
+                  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
+                  `md5` varchar(32) NOT NULL,
+                  `object_type` varchar(64) NOT NULL,
+                  `status` smallint(6) NOT NULL,
+                  PRIMARY KEY  (`id`),
+                  UNIQUE KEY `rid` (`rid`),
+                  KEY `object_id` (`object_id`)
+            ) ENGINE=MyISAM {$charset_collate}"; 
+        mysql_query($sql);
+    }
+
+    // cms navigation caching
+    $table_name = $wpdb->prefix.'icl_cms_nav_cache';
+    if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+        $sql = "
+            CREATE TABLE `{$table_name}` (
+            `id` BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+            `cache_key` VARCHAR( 128 ) NOT NULL ,
+            `type` VARCHAR( 128 ) NOT NULL ,
+            `data` TEXT NOT NULL ,
+            `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+            ) ENGINE=MyISAM {$charset_collate}"; 
+       mysql_query($sql);
+    }    
+                  
+   if(get_option('icl_sitepress_version')){
+       icl_plugin_upgrade();               
+   }
+                  
+   delete_option('icl_sitepress_version');   
+   add_option('icl_sitepress_version', ICL_SITEPRESS_VERSION, '', true);
+
+    
+    $iclsettings = get_option('icl_sitepress_settings');
+    if($iclsettings === false ){
+        $short_v = implode('.', array_slice(explode('.', ICL_SITEPRESS_VERSION), 0, 3));
+        $settings = array(
+            'hide_upgrade_notice' => $short_v,
+            'basic_menu'          => 1  
+        );
+        add_option('icl_sitepress_settings', $settings, '', true);        
+    }else{
+        // reset ajx_health_flag
+        $iclsettings['ajx_health_checked'] = 0;
+        update_option('icl_sitepress_settings',$iclsettings);
+    }  
+       
+    // clean the icl_translations table 
+    $orphans = $wpdb->get_col("SELECT t.translation_id FROM {$wpdb->prefix}icl_translations t 
+        LEFT JOIN {$wpdb->posts} p ON t.element_id = p.ID WHERE t.element_type='post' AND p.ID IS NULL");   
+    if(!empty($orphans)){
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id IN (".join(',',$orphans).")");
+    }
+    $orphans = $wpdb->get_col("SELECT t.translation_id FROM {$wpdb->prefix}icl_translations t 
+        LEFT JOIN {$wpdb->term_taxonomy} p ON t.element_id = p.term_taxonomy_id WHERE t.element_type LIKE  'tax\\_%' AND p.term_taxonomy_id IS NULL");   
+    if(!empty($orphans)){
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id IN (".join(',',$orphans).")");
+    }
+    
+	global $wp_taxonomies;
+	if (is_array($wp_taxonomies)) {
+		foreach ($wp_taxonomies as $t => $v) {
+			$orphans = $wpdb->get_col("
+		SELECT t.translation_id 
+		FROM {$wpdb->prefix}icl_translations t 
+        LEFT JOIN {$wpdb->term_taxonomy} p 
+		ON t.element_id = p.term_taxonomy_id 
+		WHERE t.element_type = 'tax_{$t}' 
+		AND p.taxonomy <> '{$t}'
+			");
+    		if (!empty($orphans)) {
+        		$wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id IN (".join(',',$orphans).")");
+    		}
+		}
+	}
+	
+    if(defined('ICL_DEBUG_MODE') && ICL_DEBUG_MODE && false === strpos($_SERVER['REQUEST_URI'], '/wpmu-edit.php')){
+        require_once ICL_PLUGIN_PATH . '/inc/functions.php';
+        icl_display_errors_stack(true);
+    } 
+}
+
+function icl_sitepress_deactivate(){
+    /*
+    if(isset($_GET['no-survey'])) return;
+    $s = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on' ? 's' : ''; 
+    $src_url = 'http' . $s . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+    header("Location:/survey.php?src=" . base64_encode($src_url));
+    exit;
+    */
+} 
+
+// Changed to use lowercased wpdb prefix. Some users have table name in uppercase.
+// http://bugs.mysql.com/bug.php?id=39894
+if(isset($_GET['activate'])){
+    if(!isset($wpdb)) global $wpdb;
+    $table_name = $wpdb->prefix.'icl_languages';
+    if(strtolower($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'")) != strtolower($table_name)){
+        add_action('admin_notices', 'icl_cant_create_table');
+        function icl_cant_create_table(){
+            echo '<div class="error"><ul><li><strong>';
+            echo __('WPML cannot create the database tables! Make sure that your mysql user has the CREATE privilege', 'sitepress');
+            echo '</strong></li></ul></div>';        
+            $active_plugins = get_option('active_plugins');
+            $icl_sitepress_idx = array_search(ICL_PLUGIN_FOLDER . '/sitepress.php', $active_plugins);
+            if(false !== $icl_sitepress_idx){
+                unset($active_plugins[$icl_sitepress_idx]);
+                update_option('active_plugins', $active_plugins);
+                unset($_GET['activate']);
+                $recently_activated = get_option('recently_activated');
+                if(!isset($recently_activated[ICL_PLUGIN_FOLDER.'/sitepress.php'])){
+                    $recently_activated[ICL_PLUGIN_FOLDER.'/sitepress.php'] = time();
+                    update_option('recently_activated', $recently_activated);
+                }
+            }                
+        }
+    }
+}
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/support.php b/wp-content/plugins/sitepress-multilingual-cms/inc/support.php
new file mode 100644
index 0000000..8c75a6c
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/support.php
@@ -0,0 +1,424 @@
+<?php
+
+if (!class_exists('WP_Http')) {
+	include_once(ABSPATH . WPINC. '/class-http.php');
+}
+require_once ICL_PLUGIN_PATH . '/lib/xml2array.php';
+
+class SitePress_Support {
+
+	var $data;
+	var $site_id = 0;
+	var $access_key = 0;
+	var $tickets = array();
+	var $fetched_tickets = array();
+	var $request;
+	var $initial;
+
+	function __construct() {
+		global $sitepress, $sitepress_settings;
+		$sp_settings = get_option('icl_sitepress_settings');
+		$this->data = $sp_settings['icl_support'];
+		$this->request = new WP_Http;
+		
+		if ($sitepress->icl_support_configured()) {
+			
+			if (isset($sp_settings['site_id'])) {
+				$this->site_id = $sp_settings['site_id'];
+			} else {
+				$this->site_id = $sp_settings['support_site_id'];
+			}
+			
+			if (isset($sp_settings['access_key'])) {
+				$this->access_key = $sp_settings['access_key'];
+			} else {
+				$this->access_key = $sp_settings['support_access_key'];
+			}
+		}
+		
+		if (isset($_GET['page']) && $_GET['page'] == ICL_PLUGIN_FOLDER . '/menu/support.php'){            
+		    wp_enqueue_script('sitepress-icl_reminders', ICL_PLUGIN_URL . '/res/js/icl_reminders.js', array('jquery'), ICL_SITEPRESS_VERSION);            
+			add_action('icl_support_admin_page', array(&$this, 'admin_page'));
+		}
+	}
+
+	function admin_page() {
+		global $sitepress;
+		if (isset($_POST['icl_support_account']) && $sitepress->icl_support_configured()) {
+			$sitepress->save_settings(array('support_icl_account_created' => 1));
+			if ($_POST['icl_support_account'] == 'create') {
+				if (!isset($_POST['icl_support_subscription_type'])) {
+					$_POST['icl_support_subscription_type'] = 1;
+				}
+				$this->data['subscription_type'] = $_POST['icl_support_subscription_type'];
+				$sitepress->save_settings(array('icl_support' => $this->data));
+			}
+			echo '<script type="text/javascript">location.href = "admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/support.php";</script>';
+			return;
+		} else if ((isset($_POST['icl_support_account']) && $_POST['icl_support_account'] == 'create') || isset($_GET['subscription'])) {
+			$this->create_account_form();
+			return;
+		}
+		
+		if (isset($_GET['reset'])) {
+			$this->data['subscription_type'] = 0;
+			$sitepress->save_settings(array('icl_support' => $this->data));
+			echo '<script type="text/javascript">location.href = "admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/support.php";</script>';
+		}
+		
+		if (!$this->check_subscription()) {
+			if ($this->site_id && $this->data['subscription_type']) {
+				_e('Your password is sent to your e-mail.', 'sitepress');
+				echo '<br /><br />';
+				switch ($this->data['subscription_type']) {
+					case 2:
+						echo '<a href="#" onclick="javascript:location.href=\'admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/support.php&amp;reset=1\'" class="button">'. __('Cancel', 'sitepress') . '</a>&nbsp;&nbsp;&nbsp;&nbsp;' . $this->thickbox('subscriptions/new?wid=' . $this->site_id . '&amp;code=2', ' icl_support_buy_link'); printf(__('Buy \'developer\' subscription %s / year', 'sitepress'), '$200'); echo '</a>';
+						break;
+					default:
+						echo '<a href="#" onclick="javascript:location.href=\'admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/support.php&amp;reset=1\'" class="button">'. __('Cancel', 'sitepress') . '</a>&nbsp;&nbsp;&nbsp;&nbsp;' . $this->thickbox('subscriptions/new?wid=' . $this->site_id . '&amp;code=1', ' icl_support_buy_link'); printf(__('Buy \'single site\' subscription %s / year', 'sitepress'), '$50'); echo '</a>';
+				}
+				return;
+			}
+			$this->offer_subscription();
+			if (!$this->site_id) {
+				$this->login_to_account_form();
+			}
+		} else {
+			if (isset($this->data['tickets'])) {
+				$this->tickets = $this->data['tickets'];
+			}
+			$url = 'websites/' . $this->site_id . '/new_ticket';
+			echo '<p>' . $this->thickbox($url, ' icl_support_create_ticket_link') . __('Create new ticket', 'sitepress') . '</a></p>';
+			$this->get_tickets();
+			if (!empty($this->tickets)) {
+				$this->render_tickets();
+			}
+		}
+	}
+
+	function request($url) {
+		$result = $this->request->request($url);
+		if (!is_object($result)) {
+			return xml2array($result['body'], 1);
+		} else {
+			return array();
+		}
+	}
+
+	function thickbox($url, $class = null, $id = null) {
+		if (!$this->site_id) {
+			parse_str(htmlspecialchars_decode($url), $var);
+			if (!isset($var['code'])) {
+				$var['code'] = 1;
+			}
+			return '<a href="admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/support.php&amp;subscription=' . $var['code'] . '&amp;support=1">';
+		}
+		global $sitepress;
+		return $sitepress->create_icl_popup_link(ICL_API_ENDPOINT . '/' . $url . '&amp;support=1', array('title'=>'ICanLocalize', 'class'=>$class, 'id'=>$id));
+	}
+
+	function thickbox2($url, $class = null, $id = null) {
+		if (strpos($url, '?') !== false) {
+			$add = '&amp;';
+		} else {
+			$add = '?';
+		}
+		$id = ($id) ? ' id="'. $id . '"' : '';
+		return '<a href="' . $url . $add . 'TB_iframe=true" class="thickbox icl_regular_thickbox' . $class . '" title="' . $url . '"' . $id . '>';
+	}
+
+	function process_tickets($tickets) {
+		if (isset($tickets['support_ticket'][0])) {
+			$tickets = $tickets['support_ticket'];
+		}
+		foreach ($tickets as $k => $v) {
+			$temp[$v['attr']['id']] = $v['attr'];
+		}
+		return $temp;
+	}
+
+	function get_subscriptions() {
+        $subscriptions = array();
+        if($this->site_id && $this->access_key){
+		    $url = ICL_API_ENDPOINT . '/subscriptions.xml?wid=' . $this->site_id . '&accesskey=' . $this->access_key;
+		    $result = $this->request($url);
+		    $subscriptions = $result['info']['subscriptions'];
+        }
+        return $subscriptions;
+	}
+
+	function get_subscription() {
+		$subscriptions = $this->get_subscriptions();
+		if (empty($subscriptions)) {
+			return false;
+		} else {
+			if (isset($subscriptions['subscription'][0])) {
+				$subscriptions = $subscriptions['subscription'];
+			}
+			foreach($subscriptions as $k => $v) {
+				if ($v['attr']['owner_id'] == $this->site_id) {
+					$valid = ($v['attr']['valid'] == 'true') ? true : false;
+					return array(
+						'valid' => $valid,
+						'expires' => $v['attr']['expires_date'],
+						'amount' => $v['attr']['amount']
+					);
+				}
+			}
+			return false;
+		}
+	}
+
+	function check_subscription() {
+		$subscriptions = $this->get_subscriptions();
+		if (empty($subscriptions)) {
+			return false;
+		} else {
+			if (isset($subscriptions['subscription'][0])) {
+				$subscriptions = $subscriptions['subscription'];
+			}
+			foreach($subscriptions as $k => $v) {
+				if (($v['attr']['owner_id'] === '' || $v['attr']['owner_id'] == $this->site_id) && $v['attr']['valid'] == 'true') {
+					printf(__('Your subscription is valid until %s', 'sitepress'), date(get_option('date_format'), $v['attr']['expires_date']));
+					return true;
+				}
+				if (($v['attr']['owner_id'] === '' || $v['attr']['owner_id'] == $this->site_id) && $v['attr']['valid'] == 'false') {
+					// TODO
+					$this->offer_renewal();
+					return false;
+				}
+			}
+			return false;
+		}
+	}
+
+	function offer_subscription() {
+		$subscription_rows = array(
+			array(__('24h support', 'sitepress'), 'http://wpml.org/?page_id=3933'),
+			array(__('Support tickets to WPML developers', 'sitepress'), 'http://wpml.org/?page_id=4799'),
+			array(__('Consultation and planning', 'sitepress'), 'http://wpml.org/?page_id=4802'),
+			array(__('Help troubleshooting', 'sitepress'), 'http://wpml.org/?page_id=4806')
+		);
+?>
+
+<p style="line-height:1.5"><?php _e('In order to get premium support, you need to create a support subscription.','sitepress'); ?>
+<br /><?php _e('A support subscription gives you 24h response directly from WPML\'s developers.', 'sitepress'); ?></p>
+<br /><br />
+<table id="icl_support_subscriptions" cellspacing="0" cellpadding="0" border="0">
+<tr class="title">
+    <td class="first">&nbsp;</td>
+	<td class="smaller-heading"><h2><?php _e('Community Support', 'sitepress'); ?></h2></td>
+    <td><h2><?php _e('Single Site Support', 'sitepress'); ?></h2></td>
+    <td class="last"><h2><?php _e('Developer Support', 'sitepress'); ?></h2></td>
+</tr>
+<tr class="info">
+    <td class="first"><?php printf(__('Community support via %s WPML\'s technical forum %s', 'sitepress'), $this->thickbox2('http://forum.wpml.org/'), '</a>'); ?></td>
+	<td><?php _e('Free', 'sitepress'); ?></td>
+    <td><?php _e('Free', 'sitepress'); ?></td>
+    <td class="last"><?php _e('Free', 'sitepress'); ?></td>
+</tr>
+<?php foreach ($subscription_rows as $row) { ?>
+<tr class="info">
+    <td class="first"><?php 
+	if (isset($row[1])) {
+		echo $this->thickbox2($row[1]);
+	}
+	echo $row[0];
+	if (isset($row[1])) {
+		echo '</a>';
+	}
+	?></td>
+	<td><?php _e('Not included', 'sitepress'); ?></td>
+    <td><?php _e('Included', 'sitepress'); ?></td>
+    <td class="last"><?php _e('Included', 'sitepress'); ?></td>
+</tr>
+<?php } ?>
+<tr class="info">
+    <td class="first"><?php _e('Number of sites', 'sitepress'); ?></td>
+	<td>&nbsp;</td>
+    <td><?php _e('One site', 'sitepress'); ?></td>
+    <td class="last"><?php _e('Unlimited sites', 'sitepress'); ?></td>
+</tr>
+<tr class="buy-link">
+    <td class="first">&nbsp;</td>
+	<td>&nbsp;</td>
+    <td><?php echo $this->thickbox('subscriptions/new?wid=' . $this->site_id . '&amp;code=1'); printf(__('Buy %s / year', 'sitepress'), '$50'); ?></a></td>
+    <td class="last"><?php echo $this->thickbox('subscriptions/new?wid=' . $this->site_id . '&amp;code=2'); printf(__('Buy %s / year', 'sitepress'), '$200'); ?></a></td>
+</tr>
+</table>
+
+<?php
+	}
+
+	function offer_renewal() {
+		echo '<p>';
+		_e('Renew your subscription', 'sitepress');
+		echo '</p>';
+	}
+
+	function get_tickets() {
+		global $sitepress;
+		$url = ICL_API_ENDPOINT . '/support.xml?wid=' . $this->site_id . '&accesskey=' . $this->access_key;
+		$result = $this->request($url);
+		if (isset($result['info']['support_tickets']['support_ticket'])) {
+			$this->fetched_tickets = $this->process_tickets($result['info']['support_tickets']);
+		} else {
+			return array();
+		}
+		if (empty($this->tickets)) {
+			$this->data['tickets'] = $this->tickets = $this->fetched_tickets;
+			$sitepress->save_settings(array('icl_support' => $this->data));
+			$this->initial = true;
+		}
+		foreach ($this->fetched_tickets as $id => $v) {
+			if (!isset($this->tickets[$id]) && $v['status'] !== 0) {
+				$this->data['tickets'][$id] = $this->tickets[$id] = $this->fetched_tickets[$id];
+				$sitepress->save_settings(array('icl_support' => $this->data));
+			}
+		}
+	}
+
+	function render_tickets() {
+		//[messages] [status] [subject] [create_time] [id]
+?>
+		<table id="icl_support_table" class="widefat" cellspacing="0">
+            <thead>
+                <tr>
+                    <th><?php _e('Subject', 'sitepress'); ?></th>
+					<th><?php _e('Created', 'sitepress'); ?></th>
+					<th><?php _e('Messages', 'sitepress'); ?></th>
+                </tr>
+            </thead>
+            <tfoot>
+                <tr>
+                    <th><?php _e('Subject', 'sitepress'); ?></th>
+					<th><?php _e('Created', 'sitepress'); ?></th>
+					<th><?php _e('Messages', 'sitepress'); ?></th>
+                </tr>
+            </tfoot>        
+            <tbody>
+<?php
+		$url = 'support/show/';
+		$updated_tickets = '';
+		$tickets = '';
+		
+		foreach ($this->tickets as $id => $v) {
+			if (!isset($this->fetched_tickets[$id]) || $this->fetched_tickets[$id]['status'] === 0) {
+				unset($this->data['tickets'][$id]);
+				$update = true;
+				continue;
+			}
+			if (!$this->initial && $v['messages'] != $this->fetched_tickets[$id]['messages']) {
+				$check_user_message = $this->request(ICL_API_ENDPOINT . '/' . $url . $v['id'] . '.xml?wid=' . $this->site_id . '&accesskey=' . $this->access_key);
+				if ($check_user_message['info']['support_ticket']['attr']['last_message_by_user'] == 'true') {
+					$tickets .= '<tr><td>' . $this->thickbox($url . $v['id']) . $v['subject'] . '</a></td><td>' . date(get_option('date_format'), $v['create_time']) . '</td><td>' . $this->fetched_tickets[$id]['messages'] . '</td></tr>';
+					$this->data['tickets'][$id]['messages'] = $this->fetched_tickets[$id]['messages'];
+					$update = true;
+					continue;
+				}
+				$add = ' style="background-color: Yellow;"';
+				$add3 = ' icl_support_viewed';
+				$add2 = '<strong><span style="color: Red;">' . __('New message', 'sitepress') . '</span></strong>';
+				$add4 = 'icl_support_ticket_' . $v['id'] . '_' . $this->fetched_tickets[$id]['messages'];
+				$updated_tickets .= '<tr'.$add.'><td>' . $this->thickbox($url . $v['id'], $add3, $add4) . $v['subject'] . '</a></td><td>' . date(get_option('date_format'), $v['create_time']) . '</td><td>' . $this->fetched_tickets[$id]['messages'] . '&nbsp;' . $add2 . '</td></tr>';
+			} else {
+				$tickets .= '<tr><td>' . $this->thickbox($url . $v['id']) . $v['subject'] . '</a></td><td>' . date(get_option('date_format'), $v['create_time']) . '</td><td>' . $v['messages'] . '</td></tr>';
+			}
+		}
+		
+		echo $updated_tickets . $tickets;
+		if ($update) {
+			global $sitepress;
+			$sitepress->save_settings(array('icl_support' => $this->data));
+		}
+?>
+			</tbody>
+	</table>
+<?php
+	}
+
+	function form_errors() {
+		if (isset($_POST['icl_form_errors'])) { ?>
+			<div class="icl_form_errors">
+			<?php echo $_POST['icl_form_errors'] ?>
+			</div>
+		<?php }
+	}
+
+	function create_account_form() {
+		global $current_user;
+		$this->form_errors();
+?>
+			<form id="icl_create_account" method="post" action="">
+				<?php wp_nonce_field('icl_create_support_account', 'icl_create_support_account_nonce'); ?>    
+				<input type="hidden" name="icl_support_account" value="create" />
+<?php
+				if (!isset($_REQUEST['subscription'])) {
+					$_REQUEST['subscription'] = 1;
+				}
+?>
+				<input type="hidden" name="icl_support_subscription_type" value="<?php echo $_REQUEST['subscription']; ?>" />
+				<p style="line-height:1.5"><?php _e('Premium support is provided by ICanLocalize. You will need to create an account to get started.', 'sitepress'); ?><br />
+				<?php _e('WPML will use this account to create support tickets and connect you with the development team.', 'sitepress'); ?></p>
+                                
+                                <table class="form-table icl-account-setup">
+                                    <tbody>
+                                    <tr class="form-field">
+                                        <th scope="row"><?php _e('First name', 'sitepress'); ?></th>
+                                        <td><input name="user[fname]" type="text" value="<?php echo $_POST['user']['fname']?$_POST['user']['fname']:$current_user->first_name; ?>" /></td>
+                                    </tr>
+                                    <tr class="form-field">
+                                        <th scope="row"><?php _e('Last name', 'sitepress'); ?></th>
+                                        <td><input name="user[lname]" type="text" value="<?php echo  $_POST['user']['lname']?$_POST['user']['lname']:$current_user->last_name; ?>" /></td>
+                                    </tr>        
+                                    <tr class="form-field">
+                                        <th scope="row"><?php _e('Email', 'sitepress'); ?></th>
+                                        <td><input name="user[email]" type="text" value="<?php echo  $_POST['user']['email']?$_POST['user']['email']:$current_user->data->user_email; ?>" /></td>
+                                    </tr>
+                                    </tbody>
+                                </table>
+                                    <p class="submit">
+                                        <input type="hidden" name="create_account" value="1" />
+										 <a href="#" onclick="javascript:location.href='<?php echo 'admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/support.php'; ?>'" class="button"><?php _e('Cancel', 'sitepress'); ?></a>
+                                        <input class="button" name="create account" value="<?php _e('Create account', 'sitepress'); ?>" type="submit" />
+									</p>
+                                    <div class="icl_progress"><?php _e('Saving. Please wait...', 'sitepress'); ?></div>
+                                </form>
+
+								
+<?php
+	}
+	
+	function login_to_account_form() {
+		$this->form_errors();
+		global $current_user;
+?>
+		<br /><br />
+		<a href="javascript:;" onclick="jQuery('#icl_support_form_show').slideToggle();" class="button"><?php _e('I already have an ICanLocalize account', 'sitepress'); ?></a>
+		<div id="icl_support_form_show" style="display:none;">
+			<form id="icl_configure_account" action="" method="post">
+				<?php wp_nonce_field('icl_configure_support_account','icl_configure_support_account_nonce'); ?>
+				<input type="hidden" name="icl_support_account" value="configure" />    
+                                <table class="form-table icl-account-setup">
+                                    <tbody>
+                                    <tr class="form-field">
+                                        <th scope="row"><?php _e('Email', 'sitepress'); ?></th>
+                                        <td><input name="user[email]" type="text" value="<?php echo  $_POST['user']['email']?$_POST['user']['email']:$current_user->data->user_email; ?>" /></td>
+                                    </tr>
+                                    <tr class="form-field">
+                                        <th scope="row"><?php _e('Password', 'sitepress'); ?></th>
+                                        <td><input name="user[password]" type="password" /></td>
+                                    </tr>        
+                                    </tbody>
+                                </table>
+								<p class="submit">                                        
+                                        <input type="hidden" name="create_account" value="0" />
+										<a href="#" onclick="javascript:location.href='<?php echo 'admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/support.php'; ?>'" class="button"><?php _e('Cancel', 'sitepress'); ?></a>
+										<input class="button" name="configure account" value="<?php _e('Log in to my account', 'sitepress'); ?>" type="submit" />
+                                    </p>                                    
+                                    <div class="icl_progress"><?php _e('Saving. Please wait...', 'sitepress'); ?></div>
+                                </form>
+		</div>
+<?php
+	}
+}
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/template-constants.php b/wp-content/plugins/sitepress-multilingual-cms/inc/template-constants.php
new file mode 100644
index 0000000..ea0945c
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/template-constants.php
@@ -0,0 +1,14 @@
+<?php
+// part of SitePress class definition
+if(!defined('ICL_LANGUAGE_CODE')){
+    define('ICL_LANGUAGE_CODE', $this->this_lang);
+}  
+$language_details = $this->get_language_details(ICL_LANGUAGE_CODE);
+if(!defined('ICL_LANGUAGE_NAME')){
+    define('ICL_LANGUAGE_NAME', $language_details['display_name']);
+}  
+if(!defined('ICL_LANGUAGE_NAME_EN')){
+    define('ICL_LANGUAGE_NAME_EN', $language_details['english_name']);
+}
+
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php b/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php
new file mode 100644
index 0000000..9159d23
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php
@@ -0,0 +1,224 @@
+<?php
+function icl_get_home_url(){
+    global $sitepress;
+    return $sitepress->language_url($sitepress->get_current_language());
+} 
+
+
+// args:
+// skip_missing (0|1|true|false)
+// orderby (id|code|name)
+// order (asc|desc)
+function icl_get_languages($a=''){
+    if($a){
+        parse_str($a, $args);        
+    }else{
+        $args = '';
+    }
+    global $sitepress;
+    $langs = $sitepress->get_ls_languages($args);
+    return $langs;
+} 
+
+function icl_disp_language($native_name, $translated_name, $lang_native_hidden = false, $lang_translated_hidden = false){
+    if(!$native_name && !$translated_name){
+        $ret = '';
+    }elseif($native_name && $translated_name){
+        $hidden1 = $hidden2 = $hidden3 = ''; 
+        if($lang_native_hidden){$hidden1 = 'style="display:none;"';}
+        if($lang_translated_hidden){$hidden2 = 'style="display:none;"';}        
+        if($lang_native_hidden && $lang_translated_hidden){ $hidden3 = 'style="display:none;"';}
+        if($native_name != $translated_name){            
+            $ret = '<span '.$hidden1.' class="icl_lang_sel_native">'.$native_name . '</span> <span '.$hidden2.' class="icl_lang_sel_translated"><span '.$hidden1.' class="icl_lang_sel_native">(</span>' . $translated_name . '<span '.$hidden1.' class="icl_lang_sel_native">)</span></span>';
+        }else{
+            $ret = '<span '.$hidden3.' class="icl_lang_sel_current">' . $native_name . '</span>';
+        }
+    }elseif($native_name){
+        $ret = $native_name;
+    }elseif($translated_name){
+        $ret = $translated_name;
+    }
+    
+    return $ret;    
+    
+}
+
+function icl_link_to_element($element_id, $element_type='post', $link_text='', 
+            $optional_parameters=array(), $anchor='', $echoit = true, $return_original_if_missing = true){
+    global $sitepress, $wpdb, $wp_post_types, $wp_taxonomies;
+    
+    if($element_type == 'tag') $element_type = 'post_tag';
+    if($element_type == 'page') $element_type = 'post';
+    
+    $post_types = array_keys((array)$wp_post_types);
+    $taxonomies = array_keys((array)$wp_taxonomies);
+    
+    /* preWP3 compatibility  - start */
+    if(ICL_PRE_WP3){
+        if($element_type == 'post_tag'){
+            $element_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id= %d AND taxonomy='post_tag'",$element_id));
+        }elseif($element_type == 'category'){
+            $element_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id= %d AND taxonomy='category'",$element_id));        
+        }   
+    }else{
+    /* preWP3 compatibility  - end */
+        if(in_array($element_type, $taxonomies)){
+            $element_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id= %d AND taxonomy='{$element_type}'",$element_id));
+        }elseif(in_array($element_type, $post_types)){
+            $element_type = 'post';    
+        }
+    /* preWP3 compatibility  - start */
+    }
+    /* preWP3 compatibility  - end */
+    
+    if(!$element_id) return '';
+    
+    if(in_array($element_type, $taxonomies)){
+        $icl_element_type = 'tax_' . $element_type;
+    }elseif(in_array($element_type, $post_types)){
+        $icl_element_type = 'post_' . $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$element_id}'");
+    }
+    
+    
+    $trid = $sitepress->get_element_trid($element_id, $icl_element_type);
+    $translations = $sitepress->get_element_translations($trid, $icl_element_type);
+    
+        
+    // current language is ICL_LANGUAGE_CODE    
+    if(isset($translations[ICL_LANGUAGE_CODE])){
+        if($element_type=='post'){
+            $url = get_permalink($translations[ICL_LANGUAGE_CODE]->element_id);                    
+            $title = $translations[ICL_LANGUAGE_CODE]->post_title;
+        }elseif($element_type=='post_tag'){
+            list($term_id, $title) = $wpdb->get_row($wpdb->prepare("SELECT t.term_id, t.name FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy='post_tag'",$translations[ICL_LANGUAGE_CODE]->element_id), ARRAY_N);                        
+            $url = get_tag_link($term_id);        
+        }elseif($element_type=='category'){
+            list($term_id, $title) = $wpdb->get_row($wpdb->prepare("SELECT t.term_id, t.name FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy='category'",$translations[ICL_LANGUAGE_CODE]->element_id), ARRAY_N);            
+            $url = get_category_link($term_id);        
+        }else{
+            list($term_id, $title) = $wpdb->get_row($wpdb->prepare("SELECT t.term_id, t.name FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy='{$element_type}'",$translations[ICL_LANGUAGE_CODE]->element_id), ARRAY_N);            
+            $url = get_term_link($term_id, $element_type);                    
+        }        
+    }else{
+        if(!$return_original_if_missing){
+            if($echoit){
+                echo '';            
+            }
+            return '';    
+        }
+        
+        if($element_type == 'post'){
+            $url = get_permalink($element_id);
+            $title = get_the_title($element_id);
+        }elseif($element_type == 'post_tag'){
+            $url = get_tag_link($element_id);     
+            $my_tag = &get_term($element_id, 'post_tag', OBJECT, 'display');
+            $title = apply_filters('single_tag_title', $my_tag->name);               
+        }elseif($element_type == 'category'){
+            $url = get_category_link($element_id);        
+            $my_cat = &get_term($element_id, 'category', OBJECT, 'display');
+            $title = apply_filters('single_cat_title', $my_cat->name);                           
+        }else{
+            $url = get_term_link((int)$element_id, $element_type);               
+            $my_cat = &get_term($element_id, $element_type, OBJECT, 'display');     
+            $title = apply_filters('single_cat_title',$my_cat->name);                           
+        }
+    }
+        
+    if(!$url || is_wp_error($url)) return '';
+    
+    if(!empty($optional_parameters)){
+        $url_glue = false===strpos($url,'?') ? '?' : '&';
+        $url .= $url_glue . http_build_query($optional_parameters);        
+    }
+    
+    if(isset($anchor) && $anchor){
+        $url .= '#' . $anchor;
+    }
+    
+    $link = '<a href="'.$url.'">';    
+    if(isset($link_text) && $link_text){
+        $link .= $link_text;   
+    }else{
+        $link .= $title;
+    }
+    $link .= '</a>';
+    
+    if($echoit){
+        echo $link;            
+    }else{
+        return $link;
+    }    
+}
+
+function icl_object_id($element_id, $element_type='post', $return_original_if_missing=false, $ulanguage_code=null){
+    global $sitepress, $wpdb, $wp_post_types, $wp_taxonomies;
+    
+    static $fcache = array();    
+    $fcache_key = $element_id . '#' . $element_type . '#' . intval($return_original_if_missing) . '#' .  intval($ulanguage_code);
+    if(isset($fcache[$fcache_key])){                
+        return $fcache[$fcache_key];
+    }
+    
+    if($element_id <= 0){
+        return $element_id;
+    } 
+    
+    /* preWP3 compatibility  - start */
+    if(ICL_PRE_WP3){
+        $element_types = array('post', 'post_tag', 'category', 'page');
+        $taxonomies = array('post_tag', 'category');
+        $post_types = array('post', 'page');
+    }else{        
+    /* preWP3 compatibility  - end */
+        $post_types = array_keys((array)$wp_post_types);
+        $taxonomies = array_keys((array)$wp_taxonomies);
+        $element_types = array_merge($post_types, $taxonomies);
+    /* preWP3 compatibility  - start */
+    }
+    /* preWP3 compatibility  - start */
+    
+    
+    if(!in_array($element_type, $element_types)){
+        trigger_error(__('Invalid object kind','sitepress'), E_USER_NOTICE);
+        return null;
+    }elseif(!$element_id){
+        trigger_error(__('Invalid object id','sitepress'), E_USER_NOTICE);
+        return null;
+    }
+    
+    if(in_array($element_type, $taxonomies)){
+        $icl_element_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id= %d AND taxonomy='{$element_type}'",$element_id));
+    }else{
+        $icl_element_id = $element_id;
+    }
+    
+    if(in_array($element_type, $taxonomies)){
+        $icl_element_type = 'tax_' . $element_type;
+    }elseif(in_array($element_type, $post_types)){
+        $icl_element_type = 'post_'.$element_type;
+    }else{
+        $icl_element_type = $element_type;
+    }
+    
+    $trid = $sitepress->get_element_trid($icl_element_id, $icl_element_type);
+    $translations = $sitepress->get_element_translations($trid, $icl_element_type);
+    if(is_null($ulanguage_code)){
+        $ulanguage_code = $sitepress->get_current_language();
+    }    
+    if(isset($translations[$ulanguage_code]->element_id)){
+        $ret_element_id = $translations[$ulanguage_code]->element_id;
+        if(in_array($element_type, $taxonomies)){
+            $ret_element_id = $wpdb->get_var($wpdb->prepare("SELECT t.term_id FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy='{$element_type}'", $ret_element_id));            
+        }
+    }else{
+        $ret_element_id = $return_original_if_missing ? $element_id : null;
+    }
+    
+    $fcache[$fcache_key] = $ret_element_id;
+    
+    return $ret_element_id;
+    
+}
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/tools/gen-languages.php b/wp-content/plugins/sitepress-multilingual-cms/inc/tools/gen-languages.php
new file mode 100644
index 0000000..75702de
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/tools/gen-languages.php
@@ -0,0 +1,31 @@
+<?php
+// creates a serialized array from the languages.csv file and stores it into the 'res' folder
+// disabled
+
+return;
+ 
+//
+$fh = fopen(ICL_PLUGIN_PATH . '/res/languages.csv', 'r');
+$idx = 0;
+while($data = fgetcsv($fh)){
+    if($idx == 0){
+        foreach($data as $k=>$v){
+            if($k < 3) continue;
+            $lang_idxs[] = $v; 
+        }
+    }else{
+        foreach($data as $k=>$v){
+            if($k < 2) continue;                    
+            if($k == 2){
+                $langs_names[$lang_idxs[$idx-1]]['major'] = intval($v);
+                continue;
+            }
+            $langs_names[$lang_idxs[$idx-1]]['tr'][$lang_idxs[$k-3]] = $v; 
+        }
+    }
+    $idx++;
+}
+
+$fh = fopen(ICL_PLUGIN_PATH . '/res/languages.csv.php','w') or die('Can\'t open file');
+fwrite($fh,'<?php $__icl_lang_names = \''.serialize($langs_names).'\'; ?>');  
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/upgrade.php b/wp-content/plugins/sitepress-multilingual-cms/inc/upgrade.php
new file mode 100644
index 0000000..61c1971
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/upgrade.php
@@ -0,0 +1,504 @@
+<?php
+
+if(version_compare(get_option('icl_sitepress_version'), ICL_SITEPRESS_VERSION, '=') 
+    || (isset($_REQUEST['action']) && $_REQUEST['action'] == 'error_scrape') || !isset($wpdb) ) return;
+
+add_action('plugins_loaded', 'icl_plugin_upgrade' , 1);
+
+function icl_plugin_upgrade(){
+    global $wpdb, $sitepress_settings, $sitepress;
+
+    if(defined('ICL_DEBUG_MODE') && ICL_DEBUG_MODE && (is_writable(ICL_PLUGIN_PATH) || is_writable(ICL_PLUGIN_PATH . '/upgrade.log'))){
+        $mig_debug = @fopen(ICL_PLUGIN_PATH . '/upgrade.log' , 'w');
+    }else{
+        $mig_debug = false;
+    }
+    
+    $iclsettings = get_option('icl_sitepress_settings');    
+    
+    // upgrade actions 
+    // 1. reset ajx_health_flag
+    $iclsettings['ajx_health_checked'] = 0;
+    update_option('icl_sitepress_settings',$iclsettings);
+    
+    // clear any caches
+    if($mig_debug) fwrite($mig_debug, "Clearing cache \n");
+    require_once ICL_PLUGIN_PATH . '/inc/cache.php';
+    icl_cache_clear('locale_cache_class');
+    icl_cache_clear('flags_cache_class');
+    icl_cache_clear('language_name_cache_class');
+    icl_cache_clear('cms_nav_offsite_url_cache_class');
+    if($mig_debug) fwrite($mig_debug, "Cleared cache \n");
+    
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '0.9.3', '<')){        
+        require_once(ICL_PLUGIN_PATH . '/inc/lang-data.inc');      
+        $wpdb->query("UPDATE {$wpdb->prefix}icl_languages SET english_name='Norwegian BokmÃ?Â¥l', code='nb' WHERE english_name='Norwegian'");      
+        foreach($langs_names['Norwegian Bokm?l']['tr'] as $k=>$display){        
+            if(!trim($display)){
+                $display = 'Norwegian Bokm?l';
+            }
+            $wpdb->insert($wpdb->prefix . 'icl_languages_translations', array('language_code'=>'nb', 'display_language_code'=>$lang_codes[$k], 'name'=>$display));          
+        }   
+        
+        $wpdb->insert($wpdb->prefix . 'icl_languages', array('code'=>'pa', 'english_name'=>'Punjabi'));       
+        foreach($langs_names['Punjabi']['tr'] as $k=>$display){        
+            if(!trim($display)){
+                $display = 'Punjabi';
+            }
+            $wpdb->insert($wpdb->prefix . 'icl_languages_translations', array('language_code'=>'pa', 'display_language_code'=>$lang_codes[$k], 'name'=>$display));          
+        }   
+
+        $wpdb->insert($wpdb->prefix . 'icl_languages', array('code'=>'pt-br', 'english_name'=>'Portuguese, Brazil'));       
+        foreach($langs_names['Portuguese, Brazil']['tr'] as $k=>$display){        
+            if(!trim($display)){
+                $display = 'Portuguese, Brazil';
+            }
+            $wpdb->insert($wpdb->prefix . 'icl_languages_translations', array('language_code'=>'pt-br', 'display_language_code'=>$lang_codes[$k], 'name'=>$display));          
+        }   
+        
+        $wpdb->insert($wpdb->prefix . 'icl_languages', array('code'=>'pt-pt', 'english_name'=>'Portuguese, Portugal'));       
+        foreach($langs_names['Portuguese, Portugal']['tr'] as $k=>$display){        
+            if(!trim($display)){
+                $display = 'Portuguese, Portugal';
+            }
+            $wpdb->insert($wpdb->prefix . 'icl_languages_translations', array('language_code'=>'pt-pt', 'display_language_code'=>$lang_codes[$k], 'name'=>$display));          
+        }   
+        
+        
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '0.9.9', '<')){
+        $iclsettings['icl_lso_flags'] = 0;
+        $iclsettings['icl_lso_native_lang'] = 1;
+        $iclsettings['icl_lso_display_lang'] = 1;    
+        update_option('icl_sitepress_settings',$iclsettings);
+        
+        // flags table
+       $table_name = $wpdb->prefix.'icl_flags';
+        if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){
+            $sql = "
+                CREATE TABLE `{$table_name}` (
+                `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+                `lang_code` VARCHAR( 10 ) NOT NULL ,
+                `flag` VARCHAR( 32 ) NOT NULL ,
+                `from_template` TINYINT NOT NULL DEFAULT '0',
+                UNIQUE (`lang_code`)
+                )      
+            ";
+            mysql_query($sql);
+        } 
+        
+        $codes = $wpdb->get_col("SELECT code FROM {$wpdb->prefix}icl_languages");
+        foreach($codes as $code){
+            if(!$code) continue;
+            if(!file_exists(ICL_PLUGIN_PATH.'/res/flags/'.$code.'.png')){
+                $file = 'nil.png';
+            }else{
+                $file = $code.'.png';
+            }
+            $wpdb->insert($wpdb->prefix.'icl_flags', array(
+                'lang_code'=>$code,
+                'flag'=> $file
+                ));
+        }
+        
+        //fix norwegian records
+        mysql_query("UPDATE {$wpdb->prefix}icl_languages SET code='nb', english_name='Norwegian BokmÃ?Â¥l' WHERE english_name LIKE 'Norwegian Bokm%'");
+        mysql_query("UPDATE {$wpdb->prefix}icl_languages_translations SET language_code='nb' WHERE language_code=''");
+
+        
+    }
+
+    // version 1.0.1
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.0.1', '<')){
+        $sitepress_settings = get_option('icl_sitepress_settings');
+        if($sitepress_settings['existing_content_language_verified']){
+            include ICL_PLUGIN_PATH . '/modules/icl-translation/db-scheme.php';
+        }
+        
+    }
+
+    // version 1.0.2
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.0.2', '<')){
+        //fix norwegian records    
+        $wpdb->query("UPDATE {$wpdb->prefix}icl_languages SET code='nb', english_name='Norwegian BokmÃ?Â¥l' WHERE english_name LIKE 'Norwegian Bokm%'");    
+        $wpdb->query("UPDATE {$wpdb->prefix}icl_languages_translations SET language_code='nb' WHERE language_code=''");        
+        $wpdb->query("UPDATE {$wpdb->prefix}icl_languages_translations SET display_language_code='nb' WHERE display_language_code=''");        
+        
+        $wpdb->query("ALTER TABLE {$wpdb->prefix}icl_translations DROP KEY translation");
+        
+        // get elements with duplicates
+        $res = $wpdb->get_results("SELECT element_id, element_type, COUNT(translation_id) AS c FROM {$wpdb->prefix}icl_translations GROUP BY element_id, element_type HAVING c > 1");
+        foreach($res as $r){
+            $row_count = $r->c - 1;
+            $wpdb->query("
+                DELETE FROM {$wpdb->prefix}icl_translations 
+                WHERE 
+                    element_id={$r->element_id} AND 
+                    element_type='{$r->element_type}'
+                ORDER BY translation_id DESC
+                LIMIT {$row_count}
+            ");
+        }           
+        $wpdb->query("ALTER TABLE {$wpdb->prefix}icl_translations ADD UNIQUE KEY `el_type_id` (`element_type`, `element_id`)");
+       
+        // fix multiple languages per trid 
+        $res = $wpdb->get_results("SELECT trid, language_code, COUNT(translation_id) AS c FROM {$wpdb->prefix}icl_translations GROUP BY trid, language_code HAVING c > 1");
+        foreach($res as $r){
+            $row_count = $r->c - 1;
+            $wpdb->query("
+                DELETE FROM {$wpdb->prefix}icl_translations 
+                WHERE 
+                    trid={$r->trid} AND 
+                    language_code='{$r->language_code}'
+                ORDER BY translation_id DESC
+                LIMIT {$row_count}
+            ");
+        }           
+        $wpdb->query("ALTER TABLE {$wpdb->prefix}icl_translations ADD UNIQUE KEY `trid_lang` (`trid`, `language_code`)");
+        
+        $res = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}icl_translations WHERE language_code='' OR language_code IS NULL");
+        $sp_default_lcode = $sitepress_settings['default_language'];
+        foreach($res as $r){        
+            if(!$sp_default_lcode || $wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE trid={$r->trid} AND language_code='{$sp_default_lcode}'")){
+                $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id={$r->translation_id}");
+            }else{
+                $wpdb->update($wpdb->prefix . 'icl_translations', array('language_code'=>$sp_default_lcode), array('translation_id'=>$r->translation_id));
+            }
+        }
+        
+        $wpdb->query("ALTER TABLE {$wpdb->prefix}icl_translations  CHANGE `language_code` `language_code` VARCHAR( 7 ) NOT NULL");
+        
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.2.0', '<')){
+        if($iclsettings['icl_interview_translators'] == 0){
+            $iclsettings['icl_interview_translators'] = 1;    
+            update_option('icl_sitepress_settings',$iclsettings);
+        }    
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.3.0.1', '<')){
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.3.0.1 \n");
+        $iclsettings['modules']['cms-navigation']['enabled'] = 1;
+        $iclsettings['dont_show_help_admin_notice'] = 1;        
+        $iclsettings['setup_complete'] = 1;        
+        $iclsettings['setup_wizard_step'] = 0;        
+        mysql_query("ALTER TABLE `{$wpdb->prefix}icl_translations` CHANGE `element_type` `element_type` VARCHAR( 32 ) NOT NULL DEFAULT 'post'");
+        if(!$iclsettings['admin_default_language']){
+            $iclsettings['admin_default_language'] = $iclsettings['default_language'];            
+        }
+        update_option('icl_sitepress_settings',$iclsettings);
+        
+                
+        $maxtrid = 1 + $wpdb->get_var("SELECT MAX(trid) FROM {$wpdb->prefix}icl_translations");
+        mysql_query("
+            INSERT INTO {$wpdb->prefix}icl_translations(element_type, element_id, trid, language_code, source_language_code)
+            SELECT 'comment', comment_ID, {$maxtrid}+comment_ID, t.language_code, NULL 
+                FROM {$wpdb->comments} c JOIN {$wpdb->prefix}icl_translations t ON c.comment_post_id = t.element_id AND t.element_type='post'
+            ");            
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.3.0.1 \n");
+    }
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.3.0.2', '<')){
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.3.0.2 \n");
+        $wpdb->update($wpdb->prefix.'icl_translations', array('language_code'=>$iclsettings['admin_default_language']), array('language_code'=>'', 'element_type'=>'comment', 'source_language_code'=>''));
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.3.0.2 \n");
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.3.1', '<')){
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.3.1 \n");
+        $iclsettings = get_option('icl_sitepress_settings');
+        if ($iclsettings['site_id'] && $iclsettings['access_key']) {            
+            $iclsettings['content_translation_setup_complete'] = 1;
+            update_option('icl_sitepress_settings',$iclsettings);
+        }
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.3.1 \n");
+    }
+
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.3.2', '<')){
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.3.2 \n");
+        $comment_translations = array();
+        $res = mysql_query("
+            SELECT element_id, language_code, trid
+                FROM {$wpdb->prefix}icl_translations WHERE element_type='comment'
+            ");
+        while($row = mysql_fetch_assoc($res)){
+            $comment_translations[$row['element_id']] = $row;
+        }
+        
+        $res = mysql_query("
+            SELECT c.comment_ID, t.language_code AS post_language
+                FROM {$wpdb->comments} c 
+                    JOIN {$wpdb->prefix}icl_translations t ON  c.comment_post_ID = t.element_id AND t.element_type='post'                    
+            ");
+        while($row = mysql_fetch_object($res)){
+            if($row->post_language != $comment_translations[$row->comment_ID]['language_code']){
+                //check whether we have a comment in this comment's trid that's in the post language
+                if(!$wpdb->get_var("
+                    SELECT translation_id 
+                    FROM {$wpdb->prefix}icl_translations 
+                    WHERE trid={$comment_translations[$row->comment_ID]['trid']} AND element_id<>{$row->comment_ID}
+                    ")){
+                    $wpdb->update($wpdb->prefix.'icl_translations', array('language_code'=>$row->post_language), array('element_id'=>$row->comment_ID, 'element_type'=>'comment'));
+                }
+            }
+        }
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.3.2 \n");
+    }
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.3.3', '<')){
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.3.3 \n");
+        $iclsettings['modules']['cms-navigation']['cache'] = 1;
+        update_option('icl_sitepress_settings',$iclsettings);
+        $wpdb->update($wpdb->prefix . 'icl_languages_translations', array('name'=>'Ä?eÅ¡tina'), array('language_code'=>'cs', 'display_language_code'=>'cs'));
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.3.3 \n");
+    }
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.3.4', '<')){
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.3.4 \n");
+        $iclsettings = get_option('icl_sitepress_settings');
+        $iclsettings['modules']['cms-navigation']['cat_menu_contents'] = 'categories';
+        update_option('icl_sitepress_settings',$iclsettings);
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.3.4 \n");
+    }
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.3.5', '<')){
+        if($iclsettings['existing_content_language_verified']){
+            include ICL_PLUGIN_PATH . '/modules/icl-translation/db-scheme.php';
+        }
+        if(!$iclsettings['setup_complete'] && 1 < $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}icl_languages WHERE active=1")){
+            $iclsettings['setup_complete'] = 1;        
+            $iclsettings['setup_wizard_step'] = 0;                    
+            update_option('icl_sitepress_settings',$iclsettings);
+        }
+    }
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.4.0.1', '<')){
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.4.0.1 \n");
+        include(ICL_PLUGIN_PATH . '/inc/lang-data.inc');
+        $cols = $wpdb->get_col("SHOW COLUMNS FROM {$wpdb->prefix}icl_languages");
+        if(!in_array('default_locate', $cols)){
+            mysql_query("ALTER TABLE {$wpdb->prefix}icl_languages ADD COLUMN default_locale VARCHAR(8)");
+        } 
+        foreach($lang_locales as $code=>$default_locale){
+            $wpdb->update($wpdb->prefix.'icl_languages', array('default_locale'=>$default_locale), array('code'=>$code));
+        }
+        $res = $wpdb->get_results("SHOW INDEX FROM {$wpdb->prefix}icl_translations");
+        foreach($res as $row){
+            if($row->Column_name=='element_type' && $row->Sub_part==1){
+                mysql_query("ALTER TABLE {$wpdb->prefix}icl_translations DROP KEY `el_type_id`");
+                mysql_query("ALTER TABLE {$wpdb->prefix}icl_translations ADD UNIQUE KEY `el_type_id` (`element_type`, `element_id`)");
+                
+                $comment_translations = array();
+                $res = mysql_query("
+                    SELECT element_id, language_code, trid
+                        FROM {$wpdb->prefix}icl_translations WHERE element_type='comment'
+                    ");
+                while($row = mysql_fetch_assoc($res)){
+                    $comment_translations[$row['element_id']] = $row;
+                }
+                
+                $res = mysql_query("
+                    SELECT c.comment_ID, t.language_code AS post_language
+                        FROM {$wpdb->comments} c 
+                            JOIN {$wpdb->prefix}icl_translations t ON  c.comment_post_ID = t.element_id AND t.element_type='post'                    
+                    ");
+                while($row = mysql_fetch_object($res)){
+                    if($row->post_language != $comment_translations[$row->comment_ID]['language_code']){
+                        //check whether we have a comment in this comment's trid that's in the post language
+                        if(!$wpdb->get_var("
+                            SELECT translation_id 
+                            FROM {$wpdb->prefix}icl_translations 
+                            WHERE trid={$comment_translations[$row->comment_ID]['trid']} AND element_id<>{$row->comment_ID}
+                            ")){
+                            $wpdb->update($wpdb->prefix.'icl_translations', array('language_code'=>$row->post_language), array('element_id'=>$row->comment_ID, 'element_type'=>'comment'));
+                        }
+                    }
+                    
+                    if(!isset($comment_translations[$row->comment_ID]['language_code'])){
+                        $nexttrid = 1+$wpdb->get_var("SELECT MAX(trid) FROM {$wpdb->prefix}icl_translations");
+                        $wpdb->insert($wpdb->prefix.'icl_translations', array(
+                            'element_type'  => 'comment',
+                            'element_id'    => $row->comment_ID,
+                            'trid'          => $nexttrid,
+                            'language_code' => $iclsettings['default_language']   
+                        ));
+                    }
+                    
+                }
+                
+                break;    
+            }
+        }
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.4.0.1 \n");
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.5.0', '<')){
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.5.0 \n");
+        if(!isset($iclsettings['icl_lang_sel_config'])){
+            $iclsettings['icl_lang_sel_config'] = array(
+                    'font-current-normal' => ICL_LANG_SEL_BLUE_FONT_CURRENT_NORMAL,
+                    'font-current-hover' => ICL_LANG_SEL_BLUE_FONT_CURRENT_HOVER,
+                    'background-current-normal' => ICL_LANG_SEL_BLUE_BACKGROUND_CURRENT_NORMAL,
+                    'background-current-hover' => ICL_LANG_SEL_BLUE_BACKGROUND_CURRENT_HOVER,
+                    'font-other-normal' => ICL_LANG_SEL_BLUE_FONT_OTHER_NORMAL,
+                    'font-other-hover' => ICL_LANG_SEL_BLUE_FONT_OTHER_HOVER,
+                    'background-other-normal' => ICL_LANG_SEL_BLUE_BACKGROUND_OTHER_NORMAL,
+                    'background-other-hover' => ICL_LANG_SEL_BLUE_BACKGROUND_OTHER_HOVER,
+                    'border' => ICL_LANG_SEL_BLUE_BORDER            
+            );
+        }
+        
+        $iclsettings['upgrade_flags']['1.5'] = true;
+        update_option('icl_sitepress_settings',$iclsettings);            
+        
+        mysql_query("DELETE FROM {$wpdb->prefix}icl_translations WHERE element_type='comment' AND element_id = 0");
+        
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.5.0 \n");
+    }
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.6.0', '<')){
+        
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.6.0 \n");
+        
+        // force icl_string_positions table creation
+        $table_name = $wpdb->prefix.'icl_string_positions';
+        if($wpdb->get_var("SHOW TABLES LIKE '{$table_name}'") != $table_name){        
+            icl_sitepress_activate();
+        }
+        
+        $iclsettings['st']['track_strings'] = 1;
+        $iclsettings['st']['hl_color'] = '#FFFF00';
+        
+        update_option('icl_sitepress_settings',$iclsettings);
+        
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.6.0 \n");
+        
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.7.0', '<')){
+        
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.7.0 \n");
+        
+        $iclsettings['sync_ping_status'] = 1;
+        $iclsettings['sync_comment_status'] = 1;
+        $iclsettings['sync_sticky_flag'] = 1;
+        $iclsettings['sync_page_template'] = 1;
+        
+        $iclsettings['auto_adjust_ids'] = 0;
+        
+        update_option('icl_sitepress_settings',$iclsettings);
+        
+        // get tags with missing language_code value in icl_translations
+        $tags = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE language_code=''");
+        if(!empty($tags)){
+            $res = $wpdb->get_results("
+                SELECT r.object_id, r.term_taxonomy_id, t.language_code 
+                FROM {$wpdb->term_relationships} r 
+                    JOIN {$wpdb->posts} p ON r.object_id = p.ID
+                    JOIN {$wpdb->prefix}icl_translations t ON p.ID = t.element_id AND t.element_type='post'
+                WHERE term_taxonomy_id IN (".join(",",$tags).")");                
+            foreach($res as $row){
+                $wpdb->update($wpdb->prefix.'icl_translations', 
+                    array('language_code'=>$row->language_code), 
+                    array('element_id'=>$row->term_taxonomy_id, 'element_type'=>'tag')
+                );
+            }
+        }
+        // set the rest to default language        
+        $wpdb->update($wpdb->prefix.'icl_translations',
+            array('language_code'=>$sitepress_settings['default_language']),
+            array('element_type'=>'tag', 'language_code'=>'')
+        );
+        
+        
+        
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.7.0 \n");
+        
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.7.2', '<')){    
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.7.2 \n");
+        $wpdb->update($wpdb->prefix.'icl_flags', array('flag'=>'ku.png'), array('lang_code'=>'ku'));                            
+        $wpdb->update($wpdb->prefix.'icl_languages_translations', array('name'=>'Magyar'), array('language_code'=>'hu', 'display_language_code'=>'hu'));
+        $wpdb->update($wpdb->prefix.'icl_languages_translations', array('name'=>'Hrvatski'), array('language_code'=>'hr', 'display_language_code'=>'hr'));
+        $wpdb->update($wpdb->prefix.'icl_languages_translations', array('name'=>'Ù?ارسÛ?'), array('language_code'=>'fa', 'display_language_code'=>'fa'));
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.7.2 \n");
+    }
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.7.3', '<')){    
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.7.3 \n");
+        $wpdb->update($wpdb->prefix.'icl_languages_translations', array('name'=>'پارسÛ?'), array('language_code'=>'fa', 'display_language_code'=>'fa'));
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.7.3 \n");
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.7.7', '<')){    
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.7.7 \n");
+        if(!isset($iclsettings['promote_wpml'])){
+            $iclsettings['promote_wpml'] = 0;
+            update_option('icl_sitepress_settings',$iclsettings);
+        }
+        if(!isset($iclsettings['auto_adjust_ids'])){
+            $iclsettings['auto_adjust_ids'] = 0;
+            update_option('icl_sitepress_settings',$iclsettings);
+        }
+        
+        mysql_query("UPDATE {$wpdb->prefix}icl_translations SET element_type='tax_post_tag' WHERE element_type='tag'");
+        mysql_query("UPDATE {$wpdb->prefix}icl_translations SET element_type='tax_category' WHERE element_type='category'");
+        
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.7.7 \n");
+    }
+
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.7.8', '<')){    
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.7.8 \n");
+        
+        $res = $wpdb->get_results("SELECT ID, post_type FROM {$wpdb->posts}");
+        foreach($res as $row){
+            $post_types[$row->post_type][] = $row->ID;
+        }
+        foreach($post_types as $type=>$ids){
+            if(!empty($ids)){
+                mysql_query("UPDATE {$wpdb->prefix}icl_translations SET element_type='post_{$type}' WHERE element_type='post' AND element_id IN(".join(',',$ids).")");    
+            }
+        }
+        
+        // fix categories & tags in icl_translations
+        $res = mysql_query("SELECT term_taxonomy_id, taxonomy FROM {$wpdb->term_taxonomy}");
+        while($row = mysql_fetch_object($res)) {
+            $icltr = $wpdb->get_row("SELECT translation_id, element_type FROM {$wpdb->prefix}icl_translations WHERE element_id='{$row->term_taxonomy_id}' AND element_type LIKE 'tax\\_%'");
+            if('tax_' . $row->taxonomy != $icltr->element_type){
+                $wpdb->update($wpdb->prefix . 'icl_translations', array('element_type'=>'tax_'.$row->taxonomy), array('translation_id'=>$icltr->translation_id));
+            }
+        }
+        
+        
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.7.8 \n");
+    }
+    
+    if(get_option('icl_sitepress_version') && version_compare(get_option('icl_sitepress_version'), '1.8.1', '<')){    
+        if($mig_debug) fwrite($mig_debug, "Upgrading to 1.8.1 \n");        
+        $sitepress->get_icl_translator_status($iclsettings);
+        $sitepress->save_settings($iclsettings);
+        if($mig_debug) fwrite($mig_debug, "Upgraded to 1.8.1 \n");
+    }
+    
+    
+    if(version_compare(get_option('icl_sitepress_version'), ICL_SITEPRESS_VERSION, '<')){
+        if($mig_debug) fwrite($mig_debug, "Update plugin version in the database \n");
+        update_option('icl_sitepress_version', ICL_SITEPRESS_VERSION);
+        if($mig_debug) fwrite($mig_debug, "Updated plugin version in the database \n");
+    }
+
+    
+    if(defined('ICL_DEBUG_MODE') && ICL_DEBUG_MODE && $mig_debug){
+        @fclose($mig_debug);
+    }    
+    
+}
+
+
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/iclNavMenu.class.php b/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/iclNavMenu.class.php
new file mode 100644
index 0000000..5d0520a
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/iclNavMenu.class.php
@@ -0,0 +1,600 @@
+<?php
+class iclNavMenu{
+    private $current_menu;
+    private $current_lang;
+    
+    function __construct(){
+        global $pagenow;
+        
+        add_action('init', array($this, 'init'));
+                
+        if(is_admin()){
+            // hooks for saving menus    
+            add_action('wp_create_nav_menu', array($this, 'wp_update_nav_menu'), 10, 2);
+            add_action('wp_update_nav_menu', array($this, 'wp_update_nav_menu'), 10, 2);
+        
+            // hook for saving menu items
+            add_action('wp_update_nav_menu_item', array($this, 'wp_update_nav_menu_item'), 10, 3);
+            
+            // filter for nav_menu_options
+            add_filter('option_nav_menu_options', array($this, 'option_nav_menu_options'));
+            
+            add_action('wp_delete_nav_menu', array($this, 'wp_delete_nav_menu'));
+            add_action('delete_post', array($this, 'wp_delete_nav_menu_item'));
+                                    
+        }
+        
+        // add language controls for menus no option but javascript
+        if($pagenow == 'nav-menus.php'){
+            add_action('admin_footer', array($this, 'nav_menu_language_controls'), 10);
+            
+            wp_enqueue_script('wp_nav_menus', ICL_PLUGIN_URL . '/res/js/wp-nav-menus.js', ICL_SITEPRESS_VERSION, true);    
+            wp_enqueue_style('wp_nav_menus_css', ICL_PLUGIN_URL . '/res/css/wp-nav-menus.css', array(), ICL_SITEPRESS_VERSION,'all');    
+            
+            // filter posts by language
+            add_action('parse_query', array($this, 'parse_query'));
+            
+            // filter taxonomies by language
+            //add_action('get_terms', array($this, 'get_terms'));
+            
+            // filter menus by language
+            add_filter('get_terms', array($this, 'get_terms_filter'), 1, 3);        
+        }
+        
+        
+        add_filter('theme_mod_nav_menu_locations', array($this, 'theme_mod_nav_menu_locations'));
+        $theme = get_current_theme();
+        add_filter('pre_update_option_mods_' . $theme, array($this, 'pre_update_theme_mods_theme'));
+        
+        add_filter('wp_nav_menu_args', array($this, 'wp_nav_menu_args_filter'));
+        add_filter('wp_nav_menu_items', array($this, 'wp_nav_menu_items_filter'));
+        
+    }
+    
+    function init(){
+        global $sitepress;
+        
+        if(is_admin()){
+            $this->_set_menus_language();
+        }
+        
+        $this->get_current_menu();
+        
+        if($this->current_menu['language']){
+            $this->current_lang = $this->current_menu['language'];   
+            //if($this->current_lang != $sitepress->get_default_language() && !isset($_GET['lang'])){
+            //    wp_redirect(admin_url('nav-menus.php').'?lang='.$this->current_lang);
+            //} 
+        }elseif(isset($_REQUEST['lang'])){
+            $this->current_lang = $_REQUEST['lang'];    
+        }else{
+            $this->current_lang = $sitepress->get_default_language();
+        }
+
+        if(isset($_POST['icl_wp_nav_menu_ajax'])){
+            $this->ajax($_POST);
+        }
+        
+        // for theme locations that are not translated into the curent language
+        // reflect status in the theme location navigation switcher
+        add_action('admin_footer', array($this, '_set_custom_status_in_theme_location_switcher'));
+    }
+    /**
+    * associates menus without language information with default language
+    * 
+    */
+    function _set_menus_language(){
+        global $wpdb, $sitepress;
+        $translated_menus = $wpdb->get_col("
+            SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='tax_nav_menu'
+        ");
+        $translated_menus[] = 0; //dummy
+        $untranslated_menus = $wpdb->get_col("
+            SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE taxonomy='nav_menu' AND term_taxonomy_id NOT IN(".join(",",$translated_menus).")
+        ");
+        if(!empty($untranslated_menus)){
+            foreach($untranslated_menus as $item){
+                $sitepress->set_element_language_details($item, 'tax_nav_menu', null, $sitepress->get_default_language());
+            }
+        }
+        
+        $translated_menu_items = $wpdb->get_col("
+            SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='post_nav_menu_item'
+        ");
+        $translated_menu_items[] = 0; //dummy
+        $untranslated_menu_items = $wpdb->get_col("
+            SELECT ID FROM {$wpdb->posts} WHERE post_type='nav_menu_item' AND ID NOT IN(".join(",", $translated_menu_items).")
+        ");
+        if(!empty($untranslated_menu_items)){
+            foreach($untranslated_menu_items as $item){
+                $sitepress->set_element_language_details($item, 'post_nav_menu_item', null, $sitepress->get_default_language());
+            }
+        }
+    }
+    
+    function ajax($data){
+        if($data['icl_wp_nav_menu_ajax'] == 'translation_of'){
+            $this->_render_translation_of($data['lang'], $data['trid']);
+        }
+        exit;
+    }
+    
+    function _get_menu_language($menu_id){
+        global $sitepress, $wpdb;
+        $menu_tt_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id=%d AND taxonomy='nav_menu'",$menu_id));
+        $lang = $sitepress->get_element_language_details($menu_tt_id, 'tax_nav_menu');
+        return $lang;
+    }
+    
+    /**
+    * gets first menu in a specific language
+    * used to override nav_menu_recently_edited when a different language is selected
+    * @param $lang
+    * @return int
+    */
+    function _get_first_menu($lang){
+        global $wpdb;
+        $menu_tt_id = $wpdb->get_var("SELECT MIN(element_id) FROM {$wpdb->prefix}icl_translations WHERE element_type='tax_nav_menu' AND language_code='".$wpdb->escape($lang)."'");    
+        $menu_id = $wpdb->get_var($wpdb->prepare("SELECT term_id FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id=%d",$menu_tt_id));
+        return (int) $menu_id;
+    }
+    
+    function get_current_menu(){
+        global $sitepress;
+        $nav_menu_recently_edited = get_user_option( 'nav_menu_recently_edited' );        
+        $nav_menu_recently_edited_lang = $this->_get_menu_language($nav_menu_recently_edited);                
+        if( !isset( $_REQUEST['menu'] ) && isset($_GET['lang']) && $nav_menu_recently_edited_lang->language_code != $_GET['lang']){            
+            // if no menu is specified and the language is set override nav_menu_recently_edited
+            $nav_menu_selected_id = $this->_get_first_menu($_GET['lang']);                            
+            if($nav_menu_selected_id){
+                update_user_option(get_current_user_id(), 'nav_menu_recently_edited', $nav_menu_selected_id);    
+            }else{
+                $_REQUEST['menu'] = 0;
+            }
+            
+        }elseif( !isset( $_REQUEST['menu'] ) && !isset($_GET['lang']) && $nav_menu_recently_edited_lang->language_code != $sitepress->get_default_language() && $_POST['action']!='update'){
+            // if no menu is specified, no language is set, override nav_menu_recently_edited if its language is different than default           
+            $nav_menu_selected_id = $this->_get_first_menu($sitepress->get_default_language());    
+            update_user_option(get_current_user_id(), 'nav_menu_recently_edited', $nav_menu_selected_id);
+        }elseif(isset( $_REQUEST['menu'] )){
+            $nav_menu_selected_id = $_REQUEST['menu'];
+        }else{
+            $nav_menu_selected_id = $nav_menu_recently_edited;
+        }
+        
+        $this->current_menu['id'] = $nav_menu_selected_id;        
+        if($this->current_menu['id']){
+            $this->_load_menu($this->current_menu['id']);
+        }else{
+            $this->current_menu['trid'] = isset($_GET['trid']) ? intval($_GET['trid']) : null;
+            if(isset($_POST['icl_nav_menu_language'])){
+                $this->current_menu['language'] = $_POST['icl_nav_menu_language'];    
+            }elseif(isset($_GET['lang'])){
+                $this->current_menu['language'] = $_GET['lang'];    
+            }else{
+                $this->current_menu['language'] = $sitepress->get_default_language();   
+            }            
+            $this->current_menu['translations'] = array();
+        }
+    }
+    
+    function _load_menu($menu_id){
+        global $sitepress, $wpdb;
+        
+        $menu_tt_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id=%d AND taxonomy='nav_menu'",$this->current_menu['id']));        
+        $this->current_menu['trid'] = $sitepress->get_element_trid($menu_tt_id, 'tax_nav_menu');        
+        
+        if($this->current_menu['trid']){
+            $this->current_menu['translations'] = $sitepress->get_element_translations($this->current_menu['trid'], 'tax_nav_menu');    
+        }else{
+            $this->current_menu['translations'] = array();
+        }
+        
+        foreach($this->current_menu['translations'] as $tr){
+            if($menu_tt_id == $tr->element_id){
+                $this->current_menu['language'] = $tr->language_code;                    
+            }
+        }
+    }
+    
+    function wp_update_nav_menu($menu_id, $menu_data = null){
+        global $sitepress, $wpdb;
+        if($menu_data){
+            if($_POST['icl_translation_of']){
+                $trid = $sitepress->get_element_trid($_POST['icl_translation_of'], 'tax_nav_menu');
+            }else{
+                $trid = isset($_POST['icl_nav_menu_trid']) ? intval($_POST['icl_nav_menu_trid']) : null;                 
+            }        
+            $language_code = isset($_POST['icl_nav_menu_language']) ? $_POST['icl_nav_menu_language'] : $sitepress->get_default_language(); 
+            $menu_id_tt = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id=%d AND taxonomy='nav_menu'",$menu_id));
+            $sitepress->set_element_language_details($menu_id_tt, 'tax_nav_menu', $trid, $language_code);
+        }
+        $this->current_menu['id'] = $menu_id;
+        $this->_load_menu($this->current_menu['id']);
+    }
+    
+    function wp_delete_nav_menu($id){
+        global $wpdb;
+        $menu_id_tt = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id=%d AND taxonomy='nav_menu'",$id));
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE element_id='{$menu_id_tt}' AND element_type='tax_nav_menu' LIMIT 1");
+    }
+    
+    function wp_update_nav_menu_item($menu_id, $menu_item_db_id, $args){
+        // TBD
+        // TBD
+        global $sitepress;
+        
+        // deal with the case of auto-added pages
+        /*
+        if(isset($_POST['icl_post_language'])){
+            $menu_language = $this->_get_menu_language($menu_id);
+            if($menu_language != $_POST['icl_post_language']){
+                _wp_delete_post_menu_item($menu_id);
+                return;
+            }
+        }
+        */        
+        $trid = null;
+        $language_code = $this->current_lang;
+        $sitepress->set_element_language_details($menu_item_db_id, 'post_nav_menu_item', $trid, $language_code);
+    }
+    
+    function wp_delete_nav_menu_item($menu_item_id){
+        global $wpdb;
+        $post = get_post($menu_item_id);
+        if($post->post_type == 'nav_menu_item'){
+            $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE element_id='{$menu_item_id}' AND element_type='post_nav_menu_item' LIMIT 1");
+        }        
+    }
+    
+    function nav_menu_language_controls(){
+        global $sitepress, $wpdb;
+        if($this->current_menu['language'] != $sitepress->get_default_language()){
+            $menus_wout_translation = $this->get_menus_without_translation($this->current_menu['language']);    
+        }
+        if(isset($this->current_menu['translations'][$sitepress->get_default_language()])){
+            $menus_wout_translation['0'] = (object)array(
+                'element_id'=>$this->current_menu['translations'][$sitepress->get_default_language()]->element_id,
+                'trid'      =>'0',
+                'name'      =>$this->current_menu['translations'][$sitepress->get_default_language()]->name
+                );
+        }
+        
+        $langsel = '<br class="clear" />';    
+        
+        // show translations links if this is not a new element              
+        if($this->current_menu['id']){
+            $langsel .= '<div class="howto icl_nav_menu_text" style="float:right;">';    
+            $langsel .= __('Translations:', 'sitepress');    
+            foreach($sitepress->get_active_languages() as $lang){            
+                if($lang['code'] == $this->current_menu['language']) continue;
+                if(isset($this->current_menu['translations'][$lang['code']])){
+                    $lang_suff = $lang['code'] != $sitepress->get_default_language() ? '&lang=' . $lang['code'] :  '';
+                    $menu_id = $wpdb->get_var($wpdb->prepare("SELECT term_id FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id=%d",$this->current_menu['translations'][$lang['code']]->element_id));
+                    $tr_link = '<a style="text-decoration:none" title="'. esc_attr(__('edit translation', 'sitepress')).'" href="'.admin_url('nav-menus.php').
+                        '?menu='.$menu_id. $lang_suff .'">'.
+                        $lang['display_name'] . '&nbsp;<img src="'.ICL_PLUGIN_URL.'/res/img/edit_translation.png" alt="'. esc_attr(__('edit', 'sitepress')).
+                        '" width="12" height="12" /></a>';
+                }else{
+                    $tr_link = '<a style="text-decoration:none" title="'. esc_attr(__('add translation', 'sitepress')).'" href="'.admin_url('nav-menus.php').
+                        '?action=edit&menu=0&trid='.$this->current_menu['trid'].'&lang='.$lang['code'].'">'. 
+                        $lang['display_name'] . '&nbsp;<img src="'.ICL_PLUGIN_URL.'/res/img/add_translation.png" alt="'. esc_attr(__('add', 'sitepress')).
+                        '" width="12" height="12" /></a>';
+                }
+                $trs[] = $tr_link ;
+            }
+            $langsel .= '&nbsp;' . join (', ', $trs);
+            $langsel .= '</div>';    
+        }
+        
+        // show languages dropdown                
+        $langsel .= '<label class="menu-name-label howto"><span>' . __('Language', 'sitepress') . '</span>';
+        $langsel .= '&nbsp;&nbsp;';    
+        $langsel .= '<select name="icl_nav_menu_language" id="icl_menu_language">';    
+        foreach($sitepress->get_active_languages() as $lang){
+            if(isset($this->current_menu['translations'][$lang['code']]) && $this->current_menu['language'] != $lang['code']) continue;            
+            $selected = $lang['code'] == $this->current_menu['language'] ? ' selected="selected"' : '';
+            $langsel .= '<option value="' . $lang['code'] . '"' . $selected . '>' . $lang['display_name'] . '</option>';    
+        }
+        $langsel .= '</select>';
+        $langsel .= '</label>';  
+        
+        // show 'translation of' if this element is not in the default language and there are untranslated elements
+        $langsel .= '<span id="icl_translation_of_wrap">';
+        if($this->current_menu['language'] != $sitepress->get_default_language() && !empty($menus_wout_translation)){
+            $langsel .= '<label class="menu-name-label howto"><span>' . __('Translation of:', 'sitepress') . '</span>';                
+            if(!$this->current_menu['id'] && isset($_GET['trid'])){
+                $disabled = ' disabled="disabled"';
+            }else{
+                $disabled = '';
+            }
+            $langsel .= '<select name="icl_translation_of" id="icl_menu_translation_of"'.$disabled.'>';    
+            $langsel .= '<option value="">--' . __('none', 'sitepress') . '--</option>';                
+            foreach($menus_wout_translation as $mtrid=>$m){
+                if($this->current_menu['trid'] === $mtrid || $this->current_menu['translations'][$sitepress->get_default_language()]->element_id){
+                    $selected = ' selected="selected"';
+                }else{
+                    $selected = '';
+                }
+                $langsel .= '<option value="' . $m->element_id . '"' . $selected . '>' . $m->name . '</option>';    
+            }
+            $langsel .= '</select>';
+            $langsel .= '</label>';
+        }
+        $langsel .= '</span>';
+        
+        // add trid to form
+        if($this->current_menu['trid']){
+            $langsel .= '<input type="hidden" id="icl_nav_menu_trid" name="icl_nav_menu_trid" value="' . $this->current_menu['trid'] . '" />';
+        }
+        
+        $langsel .= '';
+        ?>
+        <script type="text/javascript">
+        addLoadEvent(function(){
+            jQuery('#update-nav-menu .publishing-action').before('<?php echo addslashes($langsel); ?>');
+            jQuery('#side-sortables').before('<?php $this->languages_menu() ?>');
+            <?php if($this->current_lang != $sitepress->get_default_language()): echo "\n"; ?>
+            jQuery('.nav-tabs .nav-tab').each(function(){
+                jQuery(this).attr('href', jQuery(this).attr('href')+'&lang=<?php echo $this->current_lang ?>');
+            });        
+            jQuery('#update-nav-menu').attr('ACTION', jQuery('#update-nav-menu').attr('ACTION')+'?lang=<?php echo $this->current_lang ?>');            
+            <?php endif; ?>            
+        });
+        </script>
+        <?php            
+    }
+    
+    function get_menus_without_translation($lang){
+        global $sitepress, $wpdb;
+        $res = $wpdb->get_results("
+            SELECT ts.element_id, ts.trid, t.name 
+            FROM {$wpdb->prefix}icl_translations ts
+            JOIN {$wpdb->term_taxonomy} tx ON ts.element_id = tx.term_taxonomy_id
+            JOIN {$wpdb->terms} t ON tx.term_id = t.term_id
+            WHERE ts.element_type='tax_nav_menu' 
+                AND ts.language_code='{$sitepress->get_default_language()}'
+                AND tx.taxonomy = 'nav_menu'
+        ");
+        $menus = array();
+        foreach($res as $row){            
+            if(!$wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$row->trid}' AND language_code='{$lang}'")){
+                $menus[$row->trid] = $row;
+            }
+        }       
+        return $menus;
+    }
+    
+    function _render_translation_of($lang, $trid = false){
+        global $sitepress;
+        $out = '';
+        
+        if($sitepress->get_default_language() != $lang){
+            $menus = $this->get_menus_without_translation($lang);        
+            $out .= '<label class="menu-name-label howto"><span>' . __('Translation of:', 'sitepress') . '</span>';                
+            $out .= '<select name="icl_translation_of" id="icl_menu_translation_of">';    
+            $out .= '<option value="">--' . __('none', 'sitepress') . '--</option>';                
+            foreach($menus as $mtrid=>$m){
+                if(intval($trid) === $mtrid){
+                    $selected = ' selected="selected"';
+                }else{
+                    $selected = '';
+                }
+                $out .= '<option value="' . $m->element_id . '"' . $selected . '>' . $m->name . '</option>';    
+            }
+            $out .= '</select>';
+            $out .= '</label>';
+        }
+                
+        echo $out;
+    }
+    
+    function get_menus_by_language(){
+        global $wpdb, $sitepress;
+        $res = $wpdb->get_results("
+            SELECT lt.name AS language_name, l.code AS lang, COUNT(ts.translation_id) AS c
+            FROM {$wpdb->prefix}icl_languages l
+                JOIN {$wpdb->prefix}icl_languages_translations lt ON lt.language_code = l.code
+                JOIN {$wpdb->prefix}icl_translations ts ON l.code = ts.language_code            
+            WHERE lt.display_language_code='".$sitepress->get_admin_language()."'
+                AND l.active = 1
+                AND ts.element_type = 'tax_nav_menu'
+            GROUP BY ts.language_code
+        ");
+        foreach($res as $row){
+            $langs[$row->lang] = $row;
+        }        
+        return $langs;
+    }
+    
+    function languages_menu($echo = true){
+        global $sitepress;
+        $langs = $this->get_menus_by_language();
+        // include empty languages
+        foreach($sitepress->get_active_languages() as $lang){
+            if(!isset($langs[$lang['code']])){
+                $langs[$lang['code']] = new stdClass();
+                $langs[$lang['code']]->language_name = $lang['display_name'];
+                $langs[$lang['code']]->lang = $lang['code'];
+                $langs[$lang['code']]->c = 0;
+            }            
+        }
+        $url = admin_url('nav-menus.php');
+        foreach($langs as $l){
+            $class = $l->lang == $this->current_lang ? ' class="current"' : '';
+            $urlsuff = $l->lang != $sitepress->get_default_language() ? '?lang=' . $l->lang : '';
+            $ls[] = '<a href="'.$url.$urlsuff.'"'.$class.'>'.esc_html($l->language_name).' ('.$l->c.')</a>';
+        }
+        $ls_string = '<div class="icl_lang_menu icl_nav_menu_text">';
+        $ls_string .= join('&nbsp;|&nbsp;', $ls);
+        $ls_string .= '</div>';
+        if($echo){
+            echo $ls_string;
+        }else{
+            return $ls_string;
+        }
+    }
+    
+    function get_terms_filter($terms, $taxonomies, $args){
+        global $wpdb, $sitepress, $pagenow;        
+        // deal with the case of not translated taxonomies
+        // we'll assume that it's called as just a single item
+        if(!$sitepress->is_translated_taxonomy($taxonomies[0]) && 'nav_menu' != $taxonomies[0]){
+            return $terms;
+        }      
+        
+        // special case for determining list of menus for updating auto-add option
+        if($taxonomies[0] == 'nav_menu' && $args['fields'] == 'ids' && $_POST['action'] == 'update' && $pagenow=='nav-menus.php'){
+            return $terms;
+        }
+          
+        if(!empty($terms)){
+           
+            foreach($taxonomies as $t){
+                $txs[] = 'tax_' . $t;
+            }
+            $el_types = "'".join(',',$txs)."'";
+            
+            // get all term_taxonomy_id's
+            $tt = array();
+            foreach($terms as $t){
+                if(is_object($t)){
+                    $tt[] = $t->term_taxonomy_id;    
+                }else{
+                    $tt[] = $t;
+                }
+            }
+            // filter the ones in the current language
+            if(!empty($tt)){
+                $ftt = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations 
+                    WHERE element_type IN ({$el_types}) AND element_id IN (".join(',',$tt).") AND language_code='{$this->current_lang}'");
+            }
+            foreach($terms as $k=>$v){
+                if(!in_array($v->term_taxonomy_id, $ftt)){
+                    unset($terms[$k]);
+                }
+            }
+        }                
+        return $terms;        
+    }
+    
+    // filter posts by language    
+    function parse_query($q){
+        global $sitepress;
+        // not filtering nav_menu_item
+        if($q->query_vars['post_type'] == 'nav_menu_item'){
+            return $q;
+        } 
+        
+        // also - not filtering custom posts that are not translated
+        if($sitepress->is_translated_post_type($q->query_vars['post_type'])){
+            $q->query_vars['suppress_filters'] = 0;
+        }
+        
+        return $q;
+    }
+        
+    function theme_mod_nav_menu_locations($val){        
+        global $sitepress;
+        if($sitepress->get_default_language() != $this->current_lang){
+            if(!empty($val)){
+                foreach($val as $k=>$v){
+                    $val[$k] = icl_object_id($val[$k], 'nav_menu', true, $this->current_lang);       
+                }
+            }
+        }
+        return $val;
+    }
+    
+    function pre_update_theme_mods_theme($val){
+        global $sitepress;
+        if(!empty($val['nav_menu_locations'])){
+            foreach($val['nav_menu_locations'] as $k=>$v){
+                if(!$v && $this->current_lang != $sitepress->get_default_language()){
+                    $tl = get_theme_mod('nav_menu_locations');
+                    $val['nav_menu_locations'][$k] = $tl[$k]; 
+                }else{
+                    $val['nav_menu_locations'][$k] = icl_object_id($val['nav_menu_locations'][$k], 'nav_menu',true, $sitepress->get_default_language());           
+                }            
+            }        
+        }
+        return $val;
+    }
+    
+    function option_nav_menu_options($val){
+        global $wpdb;
+        // special case of getting menus with auto-add only in a specific language
+        $db = debug_backtrace();
+        if($db[4]['function'] == '_wp_auto_add_pages_to_menu' && !empty($val['auto_add'])){
+            $post_lang = $_POST['icl_post_language'];
+            $val['auto_add'] = $wpdb->get_col("
+                SELECT element_id 
+                FROM {$wpdb->prefix}icl_translations 
+                WHERE element_type='tax_nav_menu' 
+                    AND element_id IN (".join(',',$val['auto_add']).")
+                    AND language_code = '{$post_lang}'");    
+        }
+        
+        return $val;
+    }
+    
+    function wp_nav_menu_args_filter($args){
+        global $sitepress;
+        
+        if ( ! $args['menu'] ){            
+            $locations = get_nav_menu_locations();
+            if(isset( $args['theme_location'] )){
+                $args['menu'] = $locations[$args['theme_location']];    
+            }
+        }; 
+        
+        if ( ! $args['menu'] ){            
+            remove_filter('theme_mod_nav_menu_locations', array($this, 'theme_mod_nav_menu_locations'));
+            $locations = get_nav_menu_locations();
+            if(isset( $args['theme_location'] )){
+                $args['menu'] = $locations[$args['theme_location']];    
+            }            
+            add_filter('theme_mod_nav_menu_locations', array($this, 'theme_mod_nav_menu_locations'));    
+        }
+        return $args;
+    }
+    
+    function wp_nav_menu_items_filter($items){
+        $items = preg_replace(
+            '|<li id="([^"]+)" class="menu-item menu-item-type-taxonomy"><a href="([^"]+)">([^ ]+) @([^<]+)</a>|', 
+            '<li id="$1" class="menu-item menu-item-type-taxonomy"><a href="$2">$3</a>', $items);
+        return $items;
+    }
+    
+    function _set_custom_status_in_theme_location_switcher(){
+        global $sitepress, $wpdb;
+        $tl = (array)get_theme_mod('nav_menu_locations');
+        $menus_not_translated = array();
+        foreach($tl as $k=>$menu){
+            $menu_tt_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id=%d AND taxonomy='nav_menu'",$menu));
+            $menu_trid = $sitepress->get_element_trid($menu_tt_id, 'tax_nav_menu');
+            $menu_translations = $sitepress->get_element_translations($menu_trid, 'tax_nav_menu');
+            if(!$menu_translations[$this->current_lang]){
+                $menus_not_translated[] = $k;                
+            }
+        }
+        if(!empty($menus_not_translated)){
+            ?>
+            <script type="text/javascript">
+            addLoadEvent(function(){
+                <?php foreach($menus_not_translated as $menu_id): ?>
+                jQuery('#locations-<?php echo $menu_id?> option').first().html('<?php esc_js(_e('not translated in current language','sitepress')) ?>');
+                jQuery('#locations-<?php echo $menu_id?>').css('font-style','italic');
+                jQuery('#locations-<?php echo $menu_id?>').change(function(){if(jQuery(this).val()!=0) jQuery(this).css('font-style','normal');else jQuery(this).css('font-style','italic')});
+                <?php endforeach; ?>
+            });            
+            </script>
+            <?php             
+        }
+    }
+    
+    
+    
+} 
+
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-api.php b/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-api.php
new file mode 100644
index 0000000..dced801
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/inc/wpml-api.php
@@ -0,0 +1,519 @@
+<?php
+/* This file includes a set of funcitons that can be used by WP plugins developers to make their plugins interract with WPML */  
+
+/* constants */
+define('WPML_API_SUCCESS' , 0);
+define('WPML_API_ERROR' , 99);
+define('WPML_API_INVALID_LANGUAGE_CODE' , 1);
+define('WPML_API_INVALID_TRID' , 2);
+define('WPML_API_LANGUAGE_CODE_EXISTS' , 3);
+define('WPML_API_CONTENT_NOT_FOUND' , 4);
+define('WPML_API_TRANSLATION_NOT_FOUND' , 5);
+define('WPML_API_INVALID_CONTENT_TYPE' , 6);
+define('WPML_API_CONTENT_EXISTS' , 7);
+define('WPML_API_FUNCTION_ALREADY_DECLARED', 8);
+define('WPML_API_CONTENT_TRANSLATION_DISABLED', 9);
+
+define('WPML_API_GET_CONTENT_ERROR' , 0);
+
+define('WPML_API_MAGIC_NUMBER', 6);
+define('WPML_API_ASIAN_LANGUAGES', 'zh-hans|zh-hant|ja|ko');
+define('WPML_API_COST_PER_WORD', 0.07);
+
+
+function _wpml_api_allowed_content_type($content_type){
+    $reserved_types = array(
+        'post'      => 1, 
+        'page'      => 1, 
+        'tax_post_tag'       => 1, 
+        'tax_category'  => 1,
+        'comment'   => 1
+    );
+    return !isset($reserved_types[$content_type]) && preg_match('#([a-z0-9_\-])#i', $content_type);
+}
+
+/**
+ * Add translatable content to the WPML translations table
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type Content type.
+ * @param int $content_id Content ID.
+ * @param string $language_code Content language code. (defaults to current language)
+ * @param int $trid Content trid - if a translation in a different language already exists.
+ * 
+ * @return int error code
+ *  */
+function wpml_add_translatable_content($content_type, $content_id, $language_code = false, $trid = false){
+    global $sitepress, $wpdb;
+    
+    if(!_wpml_api_allowed_content_type($content_type)){
+        return WPML_API_INVALID_CONTENT_TYPE;
+    }
+
+    if($language_code && !$sitepress->get_language_details($language_code)){
+        return WPML_API_INVALID_LANGUAGE_CODE; 
+    }
+    
+    if($trid){
+        $trid_type   = $wpdb->get_var("SELECT element_type FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}'");
+        if(!$trid_type || $trid_type != $content_type){
+            return WPML_API_INVALID_TRID;
+        }
+    }
+    
+    if($wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE element_type='".$wpdb->escape($content_type)."' AND element_id='{$content_id}'")){
+        return WPML_API_CONTENT_EXISTS;
+    }
+    
+    $t = $sitepress->set_element_language_details($content_id, $content_type, $trid, $language_code);        
+    
+    if(!$t){
+        return WPML_API_ERROR;
+    }else{
+        return WPML_API_SUCCESS;
+    }
+    
+}
+
+
+
+/**
+ * Update translatable content in the WPML translations table
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type Content type.
+ * @param int $content_id Content ID.
+ * @param string $language_code Content language code.
+ *  
+ * @return int error code
+ *  */
+function wpml_update_translatable_content($content_type, $content_id, $language_code){
+    global $sitepress, $wpdb;
+    
+    if(!_wpml_api_allowed_content_type($content_type)){
+        return WPML_API_INVALID_CONTENT_TYPE;
+    }
+
+    if(!$sitepress->get_language_details($language_code)){
+        return WPML_API_INVALID_LANGUAGE_CODE; 
+    }
+    
+    $trid = $sitepress->get_element_trid($content_id, $content_type);
+    if(!$trid){
+        return WPML_API_CONTENT_NOT_FOUND;
+    }
+    
+    $translations = $sitepress->get_element_translations($trid);
+    if(isset($translations[$language_code]) && !$translations[$language_code]->element_id != $content_id){
+        return WPML_API_LANGUAGE_CODE_EXISTS;
+    }
+            
+    $t = $sitepress->set_element_language_details($content_id, $content_type, $trid, $language_code);        
+    
+    if(!$t){
+        return WPML_API_ERROR;
+    }else{
+        return WPML_API_SUCCESS;
+    }
+    
+}
+
+/**
+ * Update translatable content in the WPML translations table
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type Content type.
+ * @param int $content_id Content ID.
+ * @param string $language_code Content language code. (when ommitted - delete all translations associated with the respective content)
+ *  
+ * @return int error code
+ *  */
+function wpml_delete_translatable_content($content_type, $content_id, $language_code = false){
+    global $sitepress, $wpdb;
+    
+    if(!_wpml_api_allowed_content_type($content_type)){
+        return WPML_API_INVALID_CONTENT_TYPE;
+    }
+
+    if($language_code && !$sitepress->get_language_details($language_code)){
+        return WPML_API_INVALID_LANGUAGE_CODE; 
+    }
+    
+    $trid = $sitepress->get_element_trid($content_id, $content_type);
+    if(!$trid){
+        return WPML_API_CONTENT_NOT_FOUND;
+    }
+    
+    if($language_code){
+        $translations = $sitepress->get_element_translations($trid);
+        if(!isset($translations[$language_code])){
+            return WPML_API_TRANSLATION_NOT_FOUND;
+        }
+        
+    }
+    
+    $sitepress->delete_element_translation($trid, $content_type, $language_code);
+            
+    return WPML_API_SUCCESS;
+}
+
+/**
+ * Get trid value for a specific piece of content
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type Content type.
+ * @param int $content_id Content ID.
+ *    
+ * @return int trid or 0 for error
+ *  */
+function wpml_get_content_trid($content_type, $content_id){
+    global $sitepress;
+    
+    if(!_wpml_api_allowed_content_type($content_type)){
+        return WPML_API_GET_CONTENT_ERROR; //WPML_API_INVALID_CONTENT_TYPE;
+    }
+    
+    $trid = $sitepress->get_element_trid($content_id, $content_type);
+    
+    if(!$trid){
+        return WPML_API_GET_CONTENT_ERROR;
+    }else{
+        return $trid;
+    } 
+} 
+
+/**
+ * Detects the current language and returns the language relevant content id. optionally it can return the original id if a translation is not found 
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type Content type.
+ * @param int $content_id Content ID.
+ * @param bool $return_original return the original id when translation not found.
+ *    
+ * @return int trid or 0 for error
+ *  */
+
+function wpml_get_content($content_type, $content_id, $return_original = true){
+    global $sitepress, $wpdb;
+    
+    $trid = $sitepress->get_element_trid($content_id, $content_type);
+    
+    if(!$trid){
+        return WPML_API_GET_CONTENT_ERROR;
+    }else{
+        if($content_id <= 0){
+            return $content_id;
+        } 
+        if($content_type=='category' || $content_type=='post_tag' || $content_type=='tag'){
+            $content_id = $wpdb->get_var($wpdb->prepare("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id= %d AND taxonomy='{$content_type}'",$content_id));
+        }
+        if($content_type=='post_tag'){
+            $icl_element_type = 'tax_post_tag';
+        }elseif($content_type=='category'){
+            $icl_element_type = 'tax_category';
+        }elseif($content_type=='page'){
+            $icl_element_type = 'post';
+        }else{
+            $icl_element_type = $content_type;
+        }
+        
+        $trid = $sitepress->get_element_trid($content_id, $icl_element_type);
+        $translations = $sitepress->get_element_translations($trid, $icl_element_type);
+        
+        if(isset($translations[ICL_LANGUAGE_CODE]->element_id)){
+            $ret_element_id = $translations[ICL_LANGUAGE_CODE]->element_id;
+            if($element_type=='category' || $element_type=='post_tag'){
+                $ret_element_id = $wpdb->get_var($wpdb->prepare("SELECT t.term_id FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->terms} t ON t.term_id = tx.term_id WHERE tx.term_taxonomy_id = %d AND tx.taxonomy='{$content_type}'", $ret_element_id));            
+            }
+        }else{
+            $ret_element_id = $return_original ? $content_id : null;
+        }
+        
+        return $ret_element_id;
+    } 
+}
+
+/**
+ * Get translations for a certain piece of content 
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type Content type.
+ * @param int $content_id Content ID.
+ * @param bool $return_original return the original id when translation not found.
+ *    
+ * @return int trid or error code
+ *  */
+function wpml_get_content_translations($content_type, $content_id, $skip_missing = true){
+    global $sitepress;
+        
+    $trid = $sitepress->get_element_trid($content_id, $content_type);
+    if(!$trid){
+        return WPML_API_TRANSLATION_NOT_FOUND;
+    }
+    
+    $translations = $sitepress->get_element_translations($trid, $content_type, $skip_missing);
+    
+    $tr = array();
+    foreach($translations as $k=>$v){
+        $tr[$k] = $v->element_id;
+    }
+    
+    return $tr;
+}
+
+/**
+ *  Returns a certain translation for a piece of content 
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type Content type.
+ * @param int $content_id Content ID.
+ * @param bool $language_code 
+ *    
+ * @return error code or array('lang'=>element_id)
+ *  */
+function wpml_get_content_translation($content_type, $content_id, $language_code){
+    global $sitepress;
+        
+    $trid = $sitepress->get_element_trid($content_id, $content_type);
+    if(!$trid){
+        return WPML_API_CONTENT_NOT_FOUND;
+    }
+        
+    $translations = $sitepress->get_element_translations($trid, $content_type, true);
+    
+    if(!isset($translations[$language_code])){
+        return WPML_API_TRANSLATION_NOT_FOUND;
+    }else{
+        return array($language_code => $translations[$language_code]->element_id);
+    }
+    
+}
+
+/**
+ *  Returns the list of active languages
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ *    
+ * @return array
+ *  */
+function wpml_get_active_languages(){
+    global $sitepress;
+    $langs = $sitepress->get_active_languages();        
+    return $langs;
+}
+
+/**
+ *  Returns the default language
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ *    
+ * @return string
+ *  */
+function wpml_get_default_language(){
+    global $sitepress;
+    return $sitepress->get_default_language();
+}
+
+
+/**
+ *  Get current language
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ * 
+ * @return string
+ *  */
+function wpml_get_current_language(){
+    global $sitepress;
+    return $sitepress->get_current_language();
+}
+
+/**
+ *  Get contents of a specific type
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type Content type.
+ *    
+ * @return int or array
+ *  */
+
+function wpml_get_contents($content_type, $language_code = false){
+    global $sitepress, $wpdb;
+    
+    if($language_code && !$sitepress->get_language_details($language_code)){
+        return WPML_API_INVALID_LANGUAGE_CODE; 
+    }
+    
+    if(!$language_code){
+        $language_code = $sitepress->get_current_language();
+    }
+    
+    $contents = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='".$wpdb->escape($content_type)."' AND language_code='{$language_code}'");
+    return $contents;
+    
+}
+
+/**
+ *  Returns google translation for given string
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $string String
+ * @param string $from_language Language to translate from
+ * @param string $to_language Language to translate into
+ *    
+ * @return int (error code) or string
+ *  */
+function wpml_machine_translation($string, $from_language, $to_language){
+    global $sitepress;
+    
+    if(!$sitepress->get_language_details($from_language) || !$sitepress->get_language_details($to_language)){
+        return WPML_API_INVALID_LANGUAGE_CODE; 
+    }
+    
+    return IclCommentsTranslation::machine_translate($from_language, $to_language, $string);    
+}
+
+/**
+ *  Sends piece of content (string) to professional translation @ ICanLocalize
+ *  
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $string String
+ * @param string $from_language Language to translate from
+ * @param int $content_id Content ID
+ * @param string $content_type Content Type
+ * @param string $to_language Language to translate into
+ *    
+ * @return int request id
+ *  */
+function wpml_send_content_to_translation($string, $content_id, $content_type, $from_language, $to_language){
+    global $sitepress, $sitepress_settings, $wpdb;
+    
+    if(!$sitepress->get_icl_translation_enabled()){
+        return 0; //WPML_API_CONTENT_TRANSLATION_DISABLED
+    }
+    
+    if(!_wpml_api_allowed_content_type($content_type)){
+        return 0; //WPML_API_INVALID_CONTENT_TYPE
+    }
+    
+    if(!$sitepress->get_language_details($from_language) || !$sitepress->get_language_details($to_language)){
+        return 0; // WPML_API_INVALID_LANGUAGE_CODE
+    }
+    
+    $from_lang = $sitepress->get_language_details($from_language);
+    $to_lang   = $sitepress->get_language_details($to_language);    
+    $from_lang_server = apply_filters('icl_server_languages_map', $from_lang['english_name']);
+    $to_lang_server = apply_filters('icl_server_languages_map', $to_lang['english_name']);
+    
+    $iclq = new ICanLocalizeQuery($sitepress_settings['site_id'], $sitepress_settings['access_key']);    
+    
+    $rid = $iclq->cms_create_message($string, $from_lang_server, $to_lang_server);
+    
+    if($rid > 0){
+        // does this comment already exist in the messages status queue?
+        $msid = $wpdb->get_var("SELECT id FROM {$wpdb->prefix}icl_message_status WHERE object_type='{$content_type}' AND object_id={$content_id}");
+        if($msid){
+            $wpdb->update($wpdb->prefix.'icl_message_status', 
+                array('rid'=>$rid, 'md5' => md5($string), 'status' => MESSAGE_TRANSLATION_IN_PROGRESS),
+                array('id' => $msid)
+                );
+        }else{
+            $wpdb->insert($wpdb->prefix.'icl_message_status', array(
+                'rid'           => $rid,
+                'object_id'     => $content_id,
+                'from_language' => $from_language,
+                'to_language'   => $to_language,
+                'md5'           => md5($string),
+                'object_type'   => $content_type,
+                'status'        => MESSAGE_TRANSLATION_IN_PROGRESS
+            ));
+        }
+    }  
+    
+    return $rid;  
+}
+
+/**
+ * Registers a callback for when a translation is received from the server.
+ * The callback parameters are int $request_id, string $content, string $language
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $content_type
+ * @param string $callback
+ *    
+ * @return error code (0 on success)
+ *  */
+function wpml_add_callback_for_received_translation($content_type, $callback){
+    global $wpml_add_message_translation_callbacks;
+    $wpml_add_message_translation_callbacks[$content_type][] = $callback;
+    return 0;    
+}
+
+/**
+ * Returns the number of the words that will be sent to translation and a cost estimate
+ * @since 1.3
+ * @package WPML
+ * @subpackage WPML API
+ *
+ * @param string $string
+ * @param string $language - should be specified when the language is one of zh-hans|zh-hant|ja|ko
+ *    
+ * @return array (count, cost)
+ *  */
+function wpml_get_word_count($string, $language = false){
+    
+    $asian_languages = explode('|', WPML_API_ASIAN_LANGUAGES);
+    
+    if($language && in_array($language, $asian_languages)){
+        $count = ceil(mb_strlen($string)/WPML_API_MAGIC_NUMBER);
+    }else{
+        $count = count(explode(' ', $string));
+    }
+    
+    $cost  = $count * WPML_API_COST_PER_WORD;
+    
+    $ret = array('count'=>$count, 'cost'=>$cost);
+        
+    return $ret;
+    
+}
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/lib/JSON.php b/wp-content/plugins/sitepress-multilingual-cms/lib/JSON.php
new file mode 100644
index 0000000..0cddbdd
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/lib/JSON.php
@@ -0,0 +1,806 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
+
+/**
+ * Converts to and from JSON format.
+ *
+ * JSON (JavaScript Object Notation) is a lightweight data-interchange
+ * format. It is easy for humans to read and write. It is easy for machines
+ * to parse and generate. It is based on a subset of the JavaScript
+ * Programming Language, Standard ECMA-262 3rd Edition - December 1999.
+ * This feature can also be found in  Python. JSON is a text format that is
+ * completely language independent but uses conventions that are familiar
+ * to programmers of the C-family of languages, including C, C++, C#, Java,
+ * JavaScript, Perl, TCL, and many others. These properties make JSON an
+ * ideal data-interchange language.
+ *
+ * This package provides a simple encoder and decoder for JSON notation. It
+ * is intended for use with client-side Javascript applications that make
+ * use of HTTPRequest to perform server communication functions - data can
+ * be encoded into JSON notation for use in a client-side javascript, or
+ * decoded from incoming Javascript requests. JSON format is native to
+ * Javascript, and can be directly eval()'ed with no further parsing
+ * overhead
+ *
+ * All strings should be in ASCII or UTF-8 format!
+ *
+ * LICENSE: Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met: Redistributions of source code must retain the
+ * above copyright notice, this list of conditions and the following
+ * disclaimer. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * @category
+ * @package     Services_JSON
+ * @author      Michal Migurski <mike-json teczno com>
+ * @author      Matt Knapp <mdknapp[at]gmail[dot]com>
+ * @author      Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
+ * @copyright   2005 Michal Migurski
+ * @version     CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
+ * @license     http://www.opensource.org/licenses/bsd-license.php
+ * @link        http://pear.php.net/pepr/pepr-proposal-show.php?id=198
+ */
+
+/**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+define('SERVICES_JSON_SLICE',   1);
+
+/**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+define('SERVICES_JSON_IN_STR',  2);
+
+/**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+define('SERVICES_JSON_IN_ARR',  3);
+
+/**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+define('SERVICES_JSON_IN_OBJ',  4);
+
+/**
+ * Marker constant for Services_JSON::decode(), used to flag stack state
+ */
+define('SERVICES_JSON_IN_CMT', 5);
+
+/**
+ * Behavior switch for Services_JSON::decode()
+ */
+define('SERVICES_JSON_LOOSE_TYPE', 16);
+
+/**
+ * Behavior switch for Services_JSON::decode()
+ */
+define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
+
+/**
+ * Converts to and from JSON format.
+ *
+ * Brief example of use:
+ *
+ * <code>
+ * // create a new instance of Services_JSON
+ * $json = new Services_JSON();
+ *
+ * // convert a complexe value to JSON notation, and send it to the browser
+ * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
+ * $output = $json->encode($value);
+ *
+ * print($output);
+ * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
+ *
+ * // accept incoming POST data, assumed to be in JSON notation
+ * $input = file_get_contents('php://input', 1000000);
+ * $value = $json->decode($input);
+ * </code>
+ */
+class Services_JSON
+{
+   /**
+    * constructs a new JSON instance
+    *
+    * @param    int     $use    object behavior flags; combine with boolean-OR
+    *
+    *                           possible values:
+    *                           - SERVICES_JSON_LOOSE_TYPE:  loose typing.
+    *                                   "{...}" syntax creates associative arrays
+    *                                   instead of objects in decode().
+    *                           - SERVICES_JSON_SUPPRESS_ERRORS:  error suppression.
+    *                                   Values which can't be encoded (e.g. resources)
+    *                                   appear as NULL instead of throwing errors.
+    *                                   By default, a deeply-nested resource will
+    *                                   bubble up with an error, so all return values
+    *                                   from encode() should be checked with isError()
+    */
+    function Services_JSON($use = 0)
+    {
+        $this->use = $use;
+    }
+
+   /**
+    * convert a string from one UTF-16 char to one UTF-8 char
+    *
+    * Normally should be handled by mb_convert_encoding, but
+    * provides a slower PHP-only method for installations
+    * that lack the multibye string extension.
+    *
+    * @param    string  $utf16  UTF-16 character
+    * @return   string  UTF-8 character
+    * @access   private
+    */
+    function utf162utf8($utf16)
+    {
+        // oh please oh please oh please oh please oh please
+        if(function_exists('mb_convert_encoding')) {
+            return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
+        }
+
+        $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
+
+        switch(true) {
+            case ((0x7F & $bytes) == $bytes):
+                // this case should never be reached, because we are in ASCII range
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr(0x7F & $bytes);
+
+            case (0x07FF & $bytes) == $bytes:
+                // return a 2-byte UTF-8 character
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr(0xC0 | (($bytes >> 6) & 0x1F))
+                     . chr(0x80 | ($bytes & 0x3F));
+
+            case (0xFFFF & $bytes) == $bytes:
+                // return a 3-byte UTF-8 character
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr(0xE0 | (($bytes >> 12) & 0x0F))
+                     . chr(0x80 | (($bytes >> 6) & 0x3F))
+                     . chr(0x80 | ($bytes & 0x3F));
+        }
+
+        // ignoring UTF-32 for now, sorry
+        return '';
+    }
+
+   /**
+    * convert a string from one UTF-8 char to one UTF-16 char
+    *
+    * Normally should be handled by mb_convert_encoding, but
+    * provides a slower PHP-only method for installations
+    * that lack the multibye string extension.
+    *
+    * @param    string  $utf8   UTF-8 character
+    * @return   string  UTF-16 character
+    * @access   private
+    */
+    function utf82utf16($utf8)
+    {
+        // oh please oh please oh please oh please oh please
+        if(function_exists('mb_convert_encoding')) {
+            return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
+        }
+
+        switch(strlen($utf8)) {
+            case 1:
+                // this case should never be reached, because we are in ASCII range
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return $utf8;
+
+            case 2:
+                // return a UTF-16 character from a 2-byte UTF-8 char
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr(0x07 & (ord($utf8{0}) >> 2))
+                     . chr((0xC0 & (ord($utf8{0}) << 6))
+                         | (0x3F & ord($utf8{1})));
+
+            case 3:
+                // return a UTF-16 character from a 3-byte UTF-8 char
+                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                return chr((0xF0 & (ord($utf8{0}) << 4))
+                         | (0x0F & (ord($utf8{1}) >> 2)))
+                     . chr((0xC0 & (ord($utf8{1}) << 6))
+                         | (0x7F & ord($utf8{2})));
+        }
+
+        // ignoring UTF-32 for now, sorry
+        return '';
+    }
+
+   /**
+    * encodes an arbitrary variable into JSON format
+    *
+    * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.
+    *                           see argument 1 to Services_JSON() above for array-parsing behavior.
+    *                           if var is a strng, note that encode() always expects it
+    *                           to be in ASCII or UTF-8 format!
+    *
+    * @return   mixed   JSON string representation of input var or an error if a problem occurs
+    * @access   public
+    */
+    function encode($var)
+    {
+        switch (gettype($var)) {
+            case 'boolean':
+                return $var ? 'true' : 'false';
+
+            case 'NULL':
+                return 'null';
+
+            case 'integer':
+                return (int) $var;
+
+            case 'double':
+            case 'float':
+                return (float) $var;
+
+            case 'string':
+                // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
+                $ascii = '';
+                $strlen_var = strlen($var);
+
+               /*
+                * Iterate over every character in the string,
+                * escaping with a slash or encoding to UTF-8 where necessary
+                */
+                for ($c = 0; $c < $strlen_var; ++$c) {
+
+                    $ord_var_c = ord($var{$c});
+
+                    switch (true) {
+                        case $ord_var_c == 0x08:
+                            $ascii .= '\b';
+                            break;
+                        case $ord_var_c == 0x09:
+                            $ascii .= '\t';
+                            break;
+                        case $ord_var_c == 0x0A:
+                            $ascii .= '\n';
+                            break;
+                        case $ord_var_c == 0x0C:
+                            $ascii .= '\f';
+                            break;
+                        case $ord_var_c == 0x0D:
+                            $ascii .= '\r';
+                            break;
+
+                        case $ord_var_c == 0x22:
+                        case $ord_var_c == 0x2F:
+                        case $ord_var_c == 0x5C:
+                            // double quote, slash, slosh
+                            $ascii .= '\\'.$var{$c};
+                            break;
+
+                        case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
+                            // characters U-00000000 - U-0000007F (same as ASCII)
+                            $ascii .= $var{$c};
+                            break;
+
+                        case (($ord_var_c & 0xE0) == 0xC0):
+                            // characters U-00000080 - U-000007FF, mask 110XXXXX
+                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                            $char = pack('C*', $ord_var_c, ord($var{$c + 1}));
+                            $c += 1;
+                            $utf16 = $this->utf82utf16($char);
+                            $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                            break;
+
+                        case (($ord_var_c & 0xF0) == 0xE0):
+                            // characters U-00000800 - U-0000FFFF, mask 1110XXXX
+                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                            $char = pack('C*', $ord_var_c,
+                                         ord($var{$c + 1}),
+                                         ord($var{$c + 2}));
+                            $c += 2;
+                            $utf16 = $this->utf82utf16($char);
+                            $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                            break;
+
+                        case (($ord_var_c & 0xF8) == 0xF0):
+                            // characters U-00010000 - U-001FFFFF, mask 11110XXX
+                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                            $char = pack('C*', $ord_var_c,
+                                         ord($var{$c + 1}),
+                                         ord($var{$c + 2}),
+                                         ord($var{$c + 3}));
+                            $c += 3;
+                            $utf16 = $this->utf82utf16($char);
+                            $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                            break;
+
+                        case (($ord_var_c & 0xFC) == 0xF8):
+                            // characters U-00200000 - U-03FFFFFF, mask 111110XX
+                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                            $char = pack('C*', $ord_var_c,
+                                         ord($var{$c + 1}),
+                                         ord($var{$c + 2}),
+                                         ord($var{$c + 3}),
+                                         ord($var{$c + 4}));
+                            $c += 4;
+                            $utf16 = $this->utf82utf16($char);
+                            $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                            break;
+
+                        case (($ord_var_c & 0xFE) == 0xFC):
+                            // characters U-04000000 - U-7FFFFFFF, mask 1111110X
+                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                            $char = pack('C*', $ord_var_c,
+                                         ord($var{$c + 1}),
+                                         ord($var{$c + 2}),
+                                         ord($var{$c + 3}),
+                                         ord($var{$c + 4}),
+                                         ord($var{$c + 5}));
+                            $c += 5;
+                            $utf16 = $this->utf82utf16($char);
+                            $ascii .= sprintf('\u%04s', bin2hex($utf16));
+                            break;
+                    }
+                }
+
+                return '"'.$ascii.'"';
+
+            case 'array':
+               /*
+                * As per JSON spec if any array key is not an integer
+                * we must treat the the whole array as an object. We
+                * also try to catch a sparsely populated associative
+                * array with numeric keys here because some JS engines
+                * will create an array with empty indexes up to
+                * max_index which can cause memory issues and because
+                * the keys, which may be relevant, will be remapped
+                * otherwise.
+                *
+                * As per the ECMA and JSON specification an object may
+                * have any string as a property. Unfortunately due to
+                * a hole in the ECMA specification if the key is a
+                * ECMA reserved word or starts with a digit the
+                * parameter is only accessible using ECMAScript's
+                * bracket notation.
+                */
+
+                // treat as a JSON object
+                if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
+                    $properties = array_map(array($this, 'name_value'),
+                                            array_keys($var),
+                                            array_values($var));
+
+                    foreach($properties as $property) {
+                        if(Services_JSON::isError($property)) {
+                            return $property;
+                        }
+                    }
+
+                    return '{' . join(',', $properties) . '}';
+                }
+
+                // treat it like a regular array
+                $elements = array_map(array($this, 'encode'), $var);
+
+                foreach($elements as $element) {
+                    if(Services_JSON::isError($element)) {
+                        return $element;
+                    }
+                }
+
+                return '[' . join(',', $elements) . ']';
+
+            case 'object':
+                $vars = get_object_vars($var);
+
+                $properties = array_map(array($this, 'name_value'),
+                                        array_keys($vars),
+                                        array_values($vars));
+
+                foreach($properties as $property) {
+                    if(Services_JSON::isError($property)) {
+                        return $property;
+                    }
+                }
+
+                return '{' . join(',', $properties) . '}';
+
+            default:
+                return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
+                    ? 'null'
+                    : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
+        }
+    }
+
+   /**
+    * array-walking function for use in generating JSON-formatted name-value pairs
+    *
+    * @param    string  $name   name of key to use
+    * @param    mixed   $value  reference to an array element to be encoded
+    *
+    * @return   string  JSON-formatted name-value pair, like '"name":value'
+    * @access   private
+    */
+    function name_value($name, $value)
+    {
+        $encoded_value = $this->encode($value);
+
+        if(Services_JSON::isError($encoded_value)) {
+            return $encoded_value;
+        }
+
+        return $this->encode(strval($name)) . ':' . $encoded_value;
+    }
+
+   /**
+    * reduce a string by removing leading and trailing comments and whitespace
+    *
+    * @param    $str    string      string value to strip of comments and whitespace
+    *
+    * @return   string  string value stripped of comments and whitespace
+    * @access   private
+    */
+    function reduce_string($str)
+    {
+        $str = preg_replace(array(
+
+                // eliminate single line comments in '// ...' form
+                '#^\s*//(.+)$#m',
+
+                // eliminate multi-line comments in '/* ... */' form, at start of string
+                '#^\s*/\*(.+)\*/#Us',
+
+                // eliminate multi-line comments in '/* ... */' form, at end of string
+                '#/\*(.+)\*/\s*$#Us'
+
+            ), '', $str);
+
+        // eliminate extraneous space
+        return trim($str);
+    }
+
+   /**
+    * decodes a JSON string into appropriate variable
+    *
+    * @param    string  $str    JSON-formatted string
+    *
+    * @return   mixed   number, boolean, string, array, or object
+    *                   corresponding to given JSON input string.
+    *                   See argument 1 to Services_JSON() above for object-output behavior.
+    *                   Note that decode() always returns strings
+    *                   in ASCII or UTF-8 format!
+    * @access   public
+    */
+    function decode($str)
+    {
+        $str = $this->reduce_string($str);
+
+        switch (strtolower($str)) {
+            case 'true':
+                return true;
+
+            case 'false':
+                return false;
+
+            case 'null':
+                return null;
+
+            default:
+                $m = array();
+
+                if (is_numeric($str)) {
+                    // Lookie-loo, it's a number
+
+                    // This would work on its own, but I'm trying to be
+                    // good about returning integers where appropriate:
+                    // return (float)$str;
+
+                    // Return float or int, as appropriate
+                    return ((float)$str == (integer)$str)
+                        ? (integer)$str
+                        : (float)$str;
+
+                } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
+                    // STRINGS RETURNED IN UTF-8 FORMAT
+                    $delim = substr($str, 0, 1);
+                    $chrs = substr($str, 1, -1);
+                    $utf8 = '';
+                    $strlen_chrs = strlen($chrs);
+
+                    for ($c = 0; $c < $strlen_chrs; ++$c) {
+
+                        $substr_chrs_c_2 = substr($chrs, $c, 2);
+                        $ord_chrs_c = ord($chrs{$c});
+
+                        switch (true) {
+                            case $substr_chrs_c_2 == '\b':
+                                $utf8 .= chr(0x08);
+                                ++$c;
+                                break;
+                            case $substr_chrs_c_2 == '\t':
+                                $utf8 .= chr(0x09);
+                                ++$c;
+                                break;
+                            case $substr_chrs_c_2 == '\n':
+                                $utf8 .= chr(0x0A);
+                                ++$c;
+                                break;
+                            case $substr_chrs_c_2 == '\f':
+                                $utf8 .= chr(0x0C);
+                                ++$c;
+                                break;
+                            case $substr_chrs_c_2 == '\r':
+                                $utf8 .= chr(0x0D);
+                                ++$c;
+                                break;
+
+                            case $substr_chrs_c_2 == '\\"':
+                            case $substr_chrs_c_2 == '\\\'':
+                            case $substr_chrs_c_2 == '\\\\':
+                            case $substr_chrs_c_2 == '\\/':
+                                if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
+                                   ($delim == "'" && $substr_chrs_c_2 != '\\"')) {
+                                    $utf8 .= $chrs{++$c};
+                                }
+                                break;
+
+                            case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
+                                // single, escaped unicode character
+                                $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
+                                       . chr(hexdec(substr($chrs, ($c + 4), 2)));
+                                $utf8 .= $this->utf162utf8($utf16);
+                                $c += 5;
+                                break;
+
+                            case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
+                                $utf8 .= $chrs{$c};
+                                break;
+
+                            case ($ord_chrs_c & 0xE0) == 0xC0:
+                                // characters U-00000080 - U-000007FF, mask 110XXXXX
+                                //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                                $utf8 .= substr($chrs, $c, 2);
+                                ++$c;
+                                break;
+
+                            case ($ord_chrs_c & 0xF0) == 0xE0:
+                                // characters U-00000800 - U-0000FFFF, mask 1110XXXX
+                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                                $utf8 .= substr($chrs, $c, 3);
+                                $c += 2;
+                                break;
+
+                            case ($ord_chrs_c & 0xF8) == 0xF0:
+                                // characters U-00010000 - U-001FFFFF, mask 11110XXX
+                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                                $utf8 .= substr($chrs, $c, 4);
+                                $c += 3;
+                                break;
+
+                            case ($ord_chrs_c & 0xFC) == 0xF8:
+                                // characters U-00200000 - U-03FFFFFF, mask 111110XX
+                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                                $utf8 .= substr($chrs, $c, 5);
+                                $c += 4;
+                                break;
+
+                            case ($ord_chrs_c & 0xFE) == 0xFC:
+                                // characters U-04000000 - U-7FFFFFFF, mask 1111110X
+                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
+                                $utf8 .= substr($chrs, $c, 6);
+                                $c += 5;
+                                break;
+
+                        }
+
+                    }
+
+                    return $utf8;
+
+                } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
+                    // array, or object notation
+
+                    if ($str{0} == '[') {
+                        $stk = array(SERVICES_JSON_IN_ARR);
+                        $arr = array();
+                    } else {
+                        if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
+                            $stk = array(SERVICES_JSON_IN_OBJ);
+                            $obj = array();
+                        } else {
+                            $stk = array(SERVICES_JSON_IN_OBJ);
+                            $obj = new stdClass();
+                        }
+                    }
+
+                    array_push($stk, array('what'  => SERVICES_JSON_SLICE,
+                                           'where' => 0,
+                                           'delim' => false));
+
+                    $chrs = substr($str, 1, -1);
+                    $chrs = $this->reduce_string($chrs);
+
+                    if ($chrs == '') {
+                        if (reset($stk) == SERVICES_JSON_IN_ARR) {
+                            return $arr;
+
+                        } else {
+                            return $obj;
+
+                        }
+                    }
+
+                    //print("\nparsing {$chrs}\n");
+
+                    $strlen_chrs = strlen($chrs);
+
+                    for ($c = 0; $c <= $strlen_chrs; ++$c) {
+
+                        $top = end($stk);
+                        $substr_chrs_c_2 = substr($chrs, $c, 2);
+
+                        if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
+                            // found a comma that is not inside a string, array, etc.,
+                            // OR we've reached the end of the character list
+                            $slice = substr($chrs, $top['where'], ($c - $top['where']));
+                            array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
+                            //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
+
+                            if (reset($stk) == SERVICES_JSON_IN_ARR) {
+                                // we are in an array, so just push an element onto the stack
+                                array_push($arr, $this->decode($slice));
+
+                            } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
+                                // we are in an object, so figure
+                                // out the property name and set an
+                                // element in an associative array,
+                                // for now
+                                $parts = array();
+                                
+                                if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
+                                    // "name":value pair
+                                    $key = $this->decode($parts[1]);
+                                    $val = $this->decode($parts[2]);
+
+                                    if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
+                                        $obj[$key] = $val;
+                                    } else {
+                                        $obj->$key = $val;
+                                    }
+                                } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
+                                    // name:value pair, where name is unquoted
+                                    $key = $parts[1];
+                                    $val = $this->decode($parts[2]);
+
+                                    if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
+                                        $obj[$key] = $val;
+                                    } else {
+                                        $obj->$key = $val;
+                                    }
+                                }
+
+                            }
+
+                        } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
+                            // found a quote, and we are not inside a string
+                            array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
+                            //print("Found start of string at {$c}\n");
+
+                        } elseif (($chrs{$c} == $top['delim']) &&
+                                 ($top['what'] == SERVICES_JSON_IN_STR) &&
+                                 ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
+                            // found a quote, we're in a string, and it's not escaped
+                            // we know that it's not escaped becase there is _not_ an
+                            // odd number of backslashes at the end of the string so far
+                            array_pop($stk);
+                            //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
+
+                        } elseif (($chrs{$c} == '[') &&
+                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
+                            // found a left-bracket, and we are in an array, object, or slice
+                            array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
+                            //print("Found start of array at {$c}\n");
+
+                        } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
+                            // found a right-bracket, and we're in an array
+                            array_pop($stk);
+                            //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
+
+                        } elseif (($chrs{$c} == '{') &&
+                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
+                            // found a left-brace, and we are in an array, object, or slice
+                            array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
+                            //print("Found start of object at {$c}\n");
+
+                        } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
+                            // found a right-brace, and we're in an object
+                            array_pop($stk);
+                            //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
+
+                        } elseif (($substr_chrs_c_2 == '/*') &&
+                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
+                            // found a comment start, and we are in an array, object, or slice
+                            array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
+                            $c++;
+                            //print("Found start of comment at {$c}\n");
+
+                        } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
+                            // found a comment end, and we're in one now
+                            array_pop($stk);
+                            $c++;
+
+                            for ($i = $top['where']; $i <= $c; ++$i)
+                                $chrs = substr_replace($chrs, ' ', $i, 1);
+
+                            //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
+
+                        }
+
+                    }
+
+                    if (reset($stk) == SERVICES_JSON_IN_ARR) {
+                        return $arr;
+
+                    } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
+                        return $obj;
+
+                    }
+
+                }
+        }
+    }
+
+    /**
+     * @todo Ultimately, this should just call PEAR::isError()
+     */
+    function isError($data, $code = null)
+    {
+        if (class_exists('pear')) {
+            return PEAR::isError($data, $code);
+        } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
+                                 is_subclass_of($data, 'services_json_error'))) {
+            return true;
+        }
+
+        return false;
+    }
+}
+
+if (class_exists('PEAR_Error')) {
+
+    class Services_JSON_Error extends PEAR_Error
+    {
+        function Services_JSON_Error($message = 'unknown error', $code = null,
+                                     $mode = null, $options = null, $userinfo = null)
+        {
+            parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
+        }
+    }
+
+} else {
+
+    /**
+     * @todo Ultimately, this class shall be descended from PEAR_Error
+     */
+    class Services_JSON_Error
+    {
+        function Services_JSON_Error($message = 'unknown error', $code = null,
+                                     $mode = null, $options = null, $userinfo = null)
+        {
+
+        }
+    }
+
+}
+    
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/lib/Snoopy.class.php b/wp-content/plugins/sitepress-multilingual-cms/lib/Snoopy.class.php
new file mode 100644
index 0000000..62497f6
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/lib/Snoopy.class.php
@@ -0,0 +1,1318 @@
+<?php
+if ( !in_array('IcanSnoopy', get_declared_classes() ) ) :
+/*************************************************
+
+Snoopy - the PHP net client
+Author: Monte Ohrt <monte ispi net>
+Copyright (c): 1999-2008 New Digital Group, all rights reserved
+Version: 1.2.4
+
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+You may contact the author of Snoopy by e-mail at:
+monte ohrt com
+
+The latest version of Snoopy can be obtained from:
+http://snoopy.sourceforge.net/
+
+*************************************************/
+
+class IcanSnoopy
+{
+    /**** Public variables ****/
+
+    /* user definable vars */
+
+    var $host            =    "www.php.net";        // host name we are connecting to
+    var $port            =    80;                    // port we are connecting to
+    var $proxy_host        =    "";                    // proxy host to use
+    var $proxy_port        =    "";                    // proxy port to use
+    var $proxy_user        =    "";                    // proxy user to use
+    var $proxy_pass        =    "";                    // proxy password to use
+
+    var $agent            =    "Snoopy v1.2.4";    // agent we masquerade as
+    var    $referer        =    "";                    // referer info to pass
+    var $cookies        =    array();            // array of cookies to pass
+                                                // $cookies["username"]="joe";
+    var    $rawheaders        =    array();            // array of raw headers to send
+                                                // $rawheaders["Content-type"]="text/html";
+
+    var $maxredirs        =    5;                    // http redirection depth maximum. 0 = disallow
+    var $lastredirectaddr    =    "";                // contains address of last redirected address
+    var    $offsiteok        =    true;                // allows redirection off-site
+    var $maxframes        =    0;                    // frame content depth maximum. 0 = disallow
+    var $expandlinks    =    true;                // expand links to fully qualified URLs.
+                                                // this only applies to fetchlinks()
+                                                // submitlinks(), and submittext()
+    var $passcookies    =    true;                // pass set cookies back through redirects
+                                                // NOTE: this currently does not respect
+                                                // dates, domains or paths.
+
+    var    $user            =    "";                    // user for http authentication
+    var    $pass            =    "";                    // password for http authentication
+
+    // http accept types
+    var $accept            =    "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
+
+    var $results        =    "";                    // where the content is put
+
+    var $error            =    "";                    // error messages sent here
+    var    $response_code    =    "";                    // response code returned from server
+    var    $headers        =    array();            // headers returned from server sent here
+    var    $maxlength        =    500000;                // max return data length (body)
+    var $read_timeout    =    0;                    // timeout on read operations, in seconds
+                                                // supported only since PHP 4 Beta 4
+                                                // set to 0 to disallow timeouts
+    var $timed_out        =    false;                // if a read operation timed out
+    var    $status            =    0;                    // http request status
+
+    var $temp_dir        =    "/tmp";                // temporary directory that the webserver
+                                                // has permission to write to.
+                                                // under Windows, this should be C:\temp
+
+    var    $curl_path        =    "/usr/local/bin/curl";
+                                                // Snoopy will use cURL for fetching
+                                                // SSL content if a full system path to
+                                                // the cURL binary is supplied here.
+                                                // set to false if you do not have
+                                                // cURL installed. See http://curl.haxx.se
+                                                // for details on installing cURL.
+                                                // Snoopy does *not* use the cURL
+                                                // library functions built into php,
+                                                // as these functions are not stable
+                                                // as of this Snoopy release.
+
+    /**** Private variables ****/
+
+    var    $_maxlinelen    =    4096;                // max line length (headers)
+
+    var $_httpmethod    =    "GET";                // default http request method
+    var $_httpversion    =    "HTTP/1.0";            // default http request version
+    var $_submit_method    =    "POST";                // default submit method
+    var $_submit_type    =    "application/x-www-form-urlencoded";    // default submit type
+    var $_mime_boundary    =   "";                    // MIME boundary for multipart/form-data submit type
+    var $_redirectaddr    =    false;                // will be set if page fetched is a redirect
+    var $_redirectdepth    =    0;                    // increments on an http redirect
+    var $_frameurls        =     array();            // frame src urls
+    var $_framedepth    =    0;                    // increments on frame depth
+
+    var $_isproxy        =    false;                // set if using a proxy server
+    var $_fp_timeout    =    30;                    // timeout for socket connection
+
+/*======================================================================*\
+    Function:    fetch
+    Purpose:    fetch the contents of a web page
+                (and possibly other protocols in the
+                future like ftp, nntp, gopher, etc.)
+    Input:        $URI    the location of the page to fetch
+    Output:        $this->results    the output text from the fetch
+\*======================================================================*/
+
+    function fetch($URI)
+    {
+
+        //preg_match("|^([^:]+)://([^:/]+)(:[\d]+)*(.*)|",$URI,$URI_PARTS);
+        $URI_PARTS = parse_url($URI);
+        if (!empty($URI_PARTS["user"]))
+            $this->user = $URI_PARTS["user"];
+        if (!empty($URI_PARTS["pass"]))
+            $this->pass = $URI_PARTS["pass"];
+        if (empty($URI_PARTS["query"]))
+            $URI_PARTS["query"] = '';
+        if (empty($URI_PARTS["path"]))
+            $URI_PARTS["path"] = '';
+
+        switch(strtolower($URI_PARTS["scheme"]))
+        {
+            case "http":
+                $this->host = $URI_PARTS["host"];
+                if(!empty($URI_PARTS["port"]))
+                    $this->port = $URI_PARTS["port"];
+                if($this->_connect($fp))
+                {
+                    if($this->_isproxy)
+                    {
+                        // using proxy, send entire URI
+                        $this->_httprequest($URI,$fp,$URI,$this->_httpmethod);
+                    }
+                    else
+                    {
+                        $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+                        // no proxy, send only the path
+                        $this->_httprequest($path, $fp, $URI, $this->_httpmethod);
+                    }
+
+                    $this->_disconnect($fp);
+
+                    if($this->_redirectaddr)
+                    {
+                        /* url was redirected, check if we've hit the max depth */
+                        if($this->maxredirs > $this->_redirectdepth)
+                        {
+                            // only follow redirect if it's on this site, or offsiteok is true
+                            if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+                            {
+                                /* follow the redirect */
+                                $this->_redirectdepth++;
+                                $this->lastredirectaddr=$this->_redirectaddr;
+                                $this->fetch($this->_redirectaddr);
+                            }
+                        }
+                    }
+
+                    if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+                    {
+                        $frameurls = $this->_frameurls;
+                        $this->_frameurls = array();
+
+                        while(list(,$frameurl) = each($frameurls))
+                        {
+                            if($this->_framedepth < $this->maxframes)
+                            {
+                                $this->fetch($frameurl);
+                                $this->_framedepth++;
+                            }
+                            else
+                                break;
+                        }
+                    }
+                }
+                else
+                {
+                    return false;
+                }
+                return true;
+                break;
+            case "https":
+                if(!$this->curl_path)
+                    return false;
+                
+                // disable error reporting
+                // needed for open_basedir restrictions (is_readable)
+                $_display_errors = ini_get('display_errors');
+                $_error_reporting = ini_get('error_reporting');
+                ini_set('display_errors', '0');        
+                ini_set('error_reporting', E_NONE);        
+                
+                $_test = function_exists("is_executable") && (! is_readable($this->curl_path) || ! is_executable($this->curl_path));
+                
+                // restore error reporting
+                // needed for open_basedir restrictions
+                ini_set('display_errors', $_display_errors);        
+                ini_set('error_reporting', $_error_reporting);        
+                
+                if($_test) return false;
+                
+                $this->host = $URI_PARTS["host"];
+                if(!empty($URI_PARTS["port"]))
+                    $this->port = $URI_PARTS["port"];
+                if($this->_isproxy)
+                {
+                    // using proxy, send entire URI
+                    $this->_httpsrequest($URI,$URI,$this->_httpmethod);
+                }
+                else
+                {
+                    $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+                    // no proxy, send only the path
+                    $this->_httpsrequest($path, $URI, $this->_httpmethod);
+                }
+
+                if($this->_redirectaddr)
+                {
+                    /* url was redirected, check if we've hit the max depth */
+                    if($this->maxredirs > $this->_redirectdepth)
+                    {
+                        // only follow redirect if it's on this site, or offsiteok is true
+                        if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+                        {
+                            /* follow the redirect */
+                            $this->_redirectdepth++;
+                            $this->lastredirectaddr=$this->_redirectaddr;
+                            $this->fetch($this->_redirectaddr);
+                        }
+                    }
+                }
+
+                if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+                {
+                    $frameurls = $this->_frameurls;
+                    $this->_frameurls = array();
+
+                    while(list(,$frameurl) = each($frameurls))
+                    {
+                        if($this->_framedepth < $this->maxframes)
+                        {
+                            $this->fetch($frameurl);
+                            $this->_framedepth++;
+                        }
+                        else
+                            break;
+                    }
+                }
+                return true;
+                break;
+            default:
+                // not a valid protocol
+                $this->error    =    'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
+                return false;
+                break;
+        }
+        return true;
+    }
+
+/*======================================================================*\
+    Function:    submit
+    Purpose:    submit an http form
+    Input:        $URI    the location to post the data
+                $formvars    the formvars to use.
+                    format: $formvars["var"] = "val";
+                $formfiles  an array of files to submit
+                    format: $formfiles["var"] = "/dir/filename.ext";
+    Output:        $this->results    the text output from the post
+\*======================================================================*/
+
+    function submit($URI, $formvars="", $formfiles="")
+    {
+        unset($postdata);
+
+        $postdata = $this->_prepare_post_body($formvars, $formfiles);
+
+        $URI_PARTS = parse_url($URI);
+        if (!empty($URI_PARTS["user"]))
+            $this->user = $URI_PARTS["user"];
+        if (!empty($URI_PARTS["pass"]))
+            $this->pass = $URI_PARTS["pass"];
+        if (empty($URI_PARTS["query"]))
+            $URI_PARTS["query"] = '';
+        if (empty($URI_PARTS["path"]))
+            $URI_PARTS["path"] = '';
+
+        switch(strtolower($URI_PARTS["scheme"]))
+        {
+            case "http":
+                $this->host = $URI_PARTS["host"];
+                if(!empty($URI_PARTS["port"]))
+                    $this->port = $URI_PARTS["port"];
+                if($this->_connect($fp))
+                {
+                    if($this->_isproxy)
+                    {
+                        // using proxy, send entire URI
+                        $this->_httprequest($URI,$fp,$URI,$this->_submit_method,$this->_submit_type,$postdata);
+                    }
+                    else
+                    {
+                        $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+                        // no proxy, send only the path
+                        $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+                    }
+
+                    $this->_disconnect($fp);
+
+                    if($this->_redirectaddr)
+                    {
+                        /* url was redirected, check if we've hit the max depth */
+                        if($this->maxredirs > $this->_redirectdepth)
+                        {
+                            if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
+                                $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
+
+                            // only follow redirect if it's on this site, or offsiteok is true
+                            if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+                            {
+                                /* follow the redirect */
+                                $this->_redirectdepth++;
+                                $this->lastredirectaddr=$this->_redirectaddr;
+                                if( strpos( $this->_redirectaddr, "?" ) > 0 )
+                                    $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get
+                                else
+                                    $this->submit($this->_redirectaddr,$formvars, $formfiles);
+                            }
+                        }
+                    }
+
+                    if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+                    {
+                        $frameurls = $this->_frameurls;
+                        $this->_frameurls = array();
+
+                        while(list(,$frameurl) = each($frameurls))
+                        {
+                            if($this->_framedepth < $this->maxframes)
+                            {
+                                $this->fetch($frameurl);
+                                $this->_framedepth++;
+                            }
+                            else
+                                break;
+                        }
+                    }
+
+                }
+                else
+                {
+                    return false;
+                }
+                return true;
+                break;
+            case "https":
+                if(!$this->curl_path)
+                    return false;
+
+                // disable error reporting
+                // needed for open_basedir restrictions (is_readable)
+                $_display_errors = ini_get('display_errors');
+                $_error_reporting = ini_get('error_reporting');
+                ini_set('display_errors', '0');        
+                ini_set('error_reporting', E_NONE);        
+                
+                $_test = function_exists("is_executable") && (! is_readable($this->curl_path) || ! is_executable($this->curl_path));
+                
+                // restore error reporting
+                // needed for open_basedir restrictions
+                ini_set('display_errors', $_display_errors);        
+                ini_set('error_reporting', $_error_reporting);        
+                
+                if($_test) return false;
+                    
+                $this->host = $URI_PARTS["host"];
+                if(!empty($URI_PARTS["port"]))
+                    $this->port = $URI_PARTS["port"];
+                if($this->_isproxy)
+                {
+                    // using proxy, send entire URI
+                    $this->_httpsrequest($URI, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+                }
+                else
+                {
+                    $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : "");
+                    // no proxy, send only the path
+                    $this->_httpsrequest($path, $URI, $this->_submit_method, $this->_submit_type, $postdata);
+                }
+
+                if($this->_redirectaddr)
+                {
+                    /* url was redirected, check if we've hit the max depth */
+                    if($this->maxredirs > $this->_redirectdepth)
+                    {
+                        if(!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr))
+                            $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr,$URI_PARTS["scheme"]."://".$URI_PARTS["host"]);
+
+                        // only follow redirect if it's on this site, or offsiteok is true
+                        if(preg_match("|^http://".preg_quote($this->host)."|i",$this->_redirectaddr) || $this->offsiteok)
+                        {
+                            /* follow the redirect */
+                            $this->_redirectdepth++;
+                            $this->lastredirectaddr=$this->_redirectaddr;
+                            if( strpos( $this->_redirectaddr, "?" ) > 0 )
+                                $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get
+                            else
+                                $this->submit($this->_redirectaddr,$formvars, $formfiles);
+                        }
+                    }
+                }
+
+                if($this->_framedepth < $this->maxframes && count($this->_frameurls) > 0)
+                {
+                    $frameurls = $this->_frameurls;
+                    $this->_frameurls = array();
+
+                    while(list(,$frameurl) = each($frameurls))
+                    {
+                        if($this->_framedepth < $this->maxframes)
+                        {
+                            $this->fetch($frameurl);
+                            $this->_framedepth++;
+                        }
+                        else
+                            break;
+                    }
+                }
+                return true;
+                break;
+
+            default:
+                // not a valid protocol
+                $this->error    =    'Invalid protocol "'.$URI_PARTS["scheme"].'"\n';
+                return false;
+                break;
+        }
+        return true;
+    }
+
+/*======================================================================*\
+    Function:    fetchlinks
+    Purpose:    fetch the links from a web page
+    Input:        $URI    where you are fetching from
+    Output:        $this->results    an array of the URLs
+\*======================================================================*/
+
+    function fetchlinks($URI)
+    {
+        if ($this->fetch($URI))
+        {
+            if($this->lastredirectaddr)
+                $URI = $this->lastredirectaddr;
+            if(is_array($this->results))
+            {
+                for($x=0;$x<count($this->results);$x++)
+                    $this->results[$x] = $this->_striplinks($this->results[$x]);
+            }
+            else
+                $this->results = $this->_striplinks($this->results);
+
+            if($this->expandlinks)
+                $this->results = $this->_expandlinks($this->results, $URI);
+            return true;
+        }
+        else
+            return false;
+    }
+
+/*======================================================================*\
+    Function:    fetchform
+    Purpose:    fetch the form elements from a web page
+    Input:        $URI    where you are fetching from
+    Output:        $this->results    the resulting html form
+\*======================================================================*/
+
+    function fetchform($URI)
+    {
+
+        if ($this->fetch($URI))
+        {
+
+            if(is_array($this->results))
+            {
+                for($x=0;$x<count($this->results);$x++)
+                    $this->results[$x] = $this->_stripform($this->results[$x]);
+            }
+            else
+                $this->results = $this->_stripform($this->results);
+
+            return true;
+        }
+        else
+            return false;
+    }
+
+
+/*======================================================================*\
+    Function:    fetchtext
+    Purpose:    fetch the text from a web page, stripping the links
+    Input:        $URI    where you are fetching from
+    Output:        $this->results    the text from the web page
+\*======================================================================*/
+
+    function fetchtext($URI)
+    {
+        if($this->fetch($URI))
+        {
+            if(is_array($this->results))
+            {
+                for($x=0;$x<count($this->results);$x++)
+                    $this->results[$x] = $this->_striptext($this->results[$x]);
+            }
+            else
+                $this->results = $this->_striptext($this->results);
+            return true;
+        }
+        else
+            return false;
+    }
+
+/*======================================================================*\
+    Function:    submitlinks
+    Purpose:    grab links from a form submission
+    Input:        $URI    where you are submitting from
+    Output:        $this->results    an array of the links from the post
+\*======================================================================*/
+
+    function submitlinks($URI, $formvars="", $formfiles="")
+    {
+        if($this->submit($URI,$formvars, $formfiles))
+        {
+            if($this->lastredirectaddr)
+                $URI = $this->lastredirectaddr;
+            if(is_array($this->results))
+            {
+                for($x=0;$x<count($this->results);$x++)
+                {
+                    $this->results[$x] = $this->_striplinks($this->results[$x]);
+                    if($this->expandlinks)
+                        $this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
+                }
+            }
+            else
+            {
+                $this->results = $this->_striplinks($this->results);
+                if($this->expandlinks)
+                    $this->results = $this->_expandlinks($this->results,$URI);
+            }
+            return true;
+        }
+        else
+            return false;
+    }
+
+/*======================================================================*\
+    Function:    submittext
+    Purpose:    grab text from a form submission
+    Input:        $URI    where you are submitting from
+    Output:        $this->results    the text from the web page
+\*======================================================================*/
+
+    function submittext($URI, $formvars = "", $formfiles = "")
+    {
+        if($this->submit($URI,$formvars, $formfiles))
+        {
+            if($this->lastredirectaddr)
+                $URI = $this->lastredirectaddr;
+            if(is_array($this->results))
+            {
+                for($x=0;$x<count($this->results);$x++)
+                {
+                    $this->results[$x] = $this->_striptext($this->results[$x]);
+                    if($this->expandlinks)
+                        $this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
+                }
+            }
+            else
+            {
+                $this->results = $this->_striptext($this->results);
+                if($this->expandlinks)
+                    $this->results = $this->_expandlinks($this->results,$URI);
+            }
+            return true;
+        }
+        else
+            return false;
+    }
+
+
+
+/*======================================================================*\
+    Function:    set_submit_multipart
+    Purpose:    Set the form submission content type to
+                multipart/form-data
+\*======================================================================*/
+    function set_submit_multipart()
+    {
+        $this->_submit_type = "multipart/form-data";
+    }
+
+
+/*======================================================================*\
+    Function:    set_submit_normal
+    Purpose:    Set the form submission content type to
+                application/x-www-form-urlencoded
+\*======================================================================*/
+    function set_submit_normal()
+    {
+        $this->_submit_type = "application/x-www-form-urlencoded";
+    }
+
+
+
+
+/*======================================================================*\
+    Private functions
+\*======================================================================*/
+
+
+/*======================================================================*\
+    Function:    _striplinks
+    Purpose:    strip the hyperlinks from an html document
+    Input:        $document    document to strip.
+    Output:        $match        an array of the links
+\*======================================================================*/
+
+    function _striplinks($document)
+    {
+        preg_match_all("'<\s*a\s.*?href\s*=\s*            # find <a href=
+                        ([\"\'])?                    # find single or double quote
+                        (?(1) (.*?)\\1 | ([^\s\>]+))        # if quote found, match up to next matching
+                                                    # quote, otherwise match up to next space
+                        'isx",$document,$links);
+
+
+        // catenate the non-empty matches from the conditional subpattern
+
+        while(list($key,$val) = each($links[2]))
+        {
+            if(!empty($val))
+                $match[] = $val;
+        }
+
+        while(list($key,$val) = each($links[3]))
+        {
+            if(!empty($val))
+                $match[] = $val;
+        }
+
+        // return the links
+        return $match;
+    }
+
+/*======================================================================*\
+    Function:    _stripform
+    Purpose:    strip the form elements from an html document
+    Input:        $document    document to strip.
+    Output:        $match        an array of the links
+\*======================================================================*/
+
+    function _stripform($document)
+    {
+        preg_match_all("'<\/?(FORM|INPUT|SELECT|TEXTAREA|(OPTION))[^<>]*>(?(2)(.*(?=<\/?(option|select)[^<>]*>[\r\n]*)|(?=[\r\n]*))|(?=[\r\n]*))'Usi",$document,$elements);
+
+        // catenate the matches
+        $match = implode("\r\n",$elements[0]);
+
+        // return the links
+        return $match;
+    }
+
+
+
+/*======================================================================*\
+    Function:    _striptext
+    Purpose:    strip the text from an html document
+    Input:        $document    document to strip.
+    Output:        $text        the resulting text
+\*======================================================================*/
+
+    function _striptext($document)
+    {
+
+        // I didn't use preg eval (//e) since that is only available in PHP 4.0.
+        // so, list your entities one by one here. I included some of the
+        // more common ones.
+
+        $search = array("'<script[^>]*?>.*?</script>'si",    // strip out javascript
+                        "'<[\/\!]*?[^<>]*?>'si",            // strip out html tags
+                        "'([\r\n])[\s]+'",                    // strip out white space
+                        "'&(quot|#34|#034|#x22);'i",        // replace html entities
+                        "'&(amp|#38|#038|#x26);'i",            // added hexadecimal values
+                        "'&(lt|#60|#060|#x3c);'i",
+                        "'&(gt|#62|#062|#x3e);'i",
+                        "'&(nbsp|#160|#xa0);'i",
+                        "'&(iexcl|#161);'i",
+                        "'&(cent|#162);'i",
+                        "'&(pound|#163);'i",
+                        "'&(copy|#169);'i",
+                        "'&(reg|#174);'i",
+                        "'&(deg|#176);'i",
+                        "'&(#39|#039|#x27);'",
+                        "'&(euro|#8364);'i",                // europe
+                        "'&a(uml|UML);'",                    // german
+                        "'&o(uml|UML);'",
+                        "'&u(uml|UML);'",
+                        "'&A(uml|UML);'",
+                        "'&O(uml|UML);'",
+                        "'&U(uml|UML);'",
+                        "'&szlig;'i",
+                        );
+        $replace = array(    "",
+                            "",
+                            "\\1",
+                            "\"",
+                            "&",
+                            "<",
+                            ">",
+                            " ",
+                            chr(161),
+                            chr(162),
+                            chr(163),
+                            chr(169),
+                            chr(174),
+                            chr(176),
+                            chr(39),
+                            chr(128),
+                            "ä",
+                            "ö",
+                            "ü",
+                            "Ä",
+                            "Ö",
+                            "Ü",
+                            "ß",
+                        );
+
+        $text = preg_replace($search,$replace,$document);
+
+        return $text;
+    }
+
+/*======================================================================*\
+    Function:    _expandlinks
+    Purpose:    expand each link into a fully qualified URL
+    Input:        $links            the links to qualify
+                $URI            the full URI to get the base from
+    Output:        $expandedLinks    the expanded links
+\*======================================================================*/
+
+    function _expandlinks($links,$URI)
+    {
+
+        preg_match("/^[^\?]+/",$URI,$match);
+
+        $match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);
+        $match = preg_replace("|/$|","",$match);
+        $match_part = parse_url($match);
+        $match_root =
+        $match_part["scheme"]."://".$match_part["host"];
+
+        $search = array(     "|^http://".preg_quote($this->host)."|i",
+                            "|^(\/)|i",
+                            "|^(?!http://)(?!mailto:)|i",
+                            "|/\./|",
+                            "|/[^\/]+/\.\./|"
+                        );
+
+        $replace = array(    "",
+                            $match_root."/",
+                            $match."/",
+                            "/",
+                            "/"
+                        );
+
+        $expandedLinks = preg_replace($search,$replace,$links);
+
+        return $expandedLinks;
+    }
+
+/*======================================================================*\
+    Function:    _httprequest
+    Purpose:    go get the http data from the server
+    Input:        $url        the url to fetch
+                $fp            the current open file pointer
+                $URI        the full URI
+                $body        body contents to send if any (POST)
+    Output:
+\*======================================================================*/
+
+    function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
+    {
+        $cookie_headers = '';
+        if($this->passcookies && $this->_redirectaddr)
+            $this->setcookies();
+
+        $URI_PARTS = parse_url($URI);
+        if(empty($url))
+            $url = "/";
+        $headers = $http_method." ".$url." ".$this->_httpversion."\r\n";
+        if(!empty($this->agent))
+            $headers .= "User-Agent: ".$this->agent."\r\n";
+        if(!empty($this->host) && !isset($this->rawheaders['Host'])) {
+            $headers .= "Host: ".$this->host;
+            if(!empty($this->port) && $this->port != 80)
+                $headers .= ":".$this->port;
+            $headers .= "\r\n";
+        }
+        if(!empty($this->accept))
+            $headers .= "Accept: ".$this->accept."\r\n";
+        if(!empty($this->referer))
+            $headers .= "Referer: ".$this->referer."\r\n";
+        if(!empty($this->cookies))
+        {
+            if(!is_array($this->cookies))
+                $this->cookies = (array)$this->cookies;
+
+            reset($this->cookies);
+            if ( count($this->cookies) > 0 ) {
+                $cookie_headers .= 'Cookie: ';
+                foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+                $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
+                }
+                $headers .= substr($cookie_headers,0,-2) . "\r\n";
+            }
+        }
+        if(!empty($this->rawheaders))
+        {
+            if(!is_array($this->rawheaders))
+                $this->rawheaders = (array)$this->rawheaders;
+            while(list($headerKey,$headerVal) = each($this->rawheaders))
+                $headers .= $headerKey.": ".$headerVal."\r\n";
+        }
+        if(!empty($content_type)) {
+            $headers .= "Content-type: $content_type";
+            if ($content_type == "multipart/form-data")
+                $headers .= "; boundary=".$this->_mime_boundary;
+            $headers .= "\r\n";
+        }
+        if(!empty($body))
+            $headers .= "Content-length: ".strlen($body)."\r\n";
+        if(!empty($this->user) || !empty($this->pass))
+            $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n";
+
+        //add proxy auth headers
+        if(!empty($this->proxy_user))
+            $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass)."\r\n";
+
+
+        $headers .= "\r\n";
+
+        // set the read timeout if needed
+        if ($this->read_timeout > 0)
+            socket_set_timeout($fp, $this->read_timeout);
+        $this->timed_out = false;
+
+        fwrite($fp,$headers.$body,strlen($headers.$body));
+
+        $this->_redirectaddr = false;
+        unset($this->headers);
+
+        while($currentHeader = fgets($fp,$this->_maxlinelen))
+        {
+            if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+            {
+                $this->status=-100;
+                return false;
+            }
+
+            if($currentHeader == "\r\n")
+                break;
+
+            // if a header begins with Location: or URI:, set the redirect
+            if(preg_match("/^(Location:|URI:)/i",$currentHeader))
+            {
+                // get URL portion of the redirect
+                preg_match("/^(Location:|URI:)[ ]+(.*)/i",chop($currentHeader),$matches);
+                // look for :// in the Location header to see if hostname is included
+                if(!preg_match("|\:\/\/|",$matches[2]))
+                {
+                    // no host in the path, so prepend
+                    $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+                    // eliminate double slash
+                    if(!preg_match("|^/|",$matches[2]))
+                            $this->_redirectaddr .= "/".$matches[2];
+                    else
+                            $this->_redirectaddr .= $matches[2];
+                }
+                else
+                    $this->_redirectaddr = $matches[2];
+            }
+
+            if(preg_match("|^HTTP/|",$currentHeader))
+            {
+                if(preg_match("|^HTTP/[^\s]*\s(.*?)\s|",$currentHeader, $status))
+                {
+                    $this->status= $status[1];
+                }
+                $this->response_code = $currentHeader;
+            }
+
+            $this->headers[] = $currentHeader;
+        }
+
+        $results = '';
+        do {
+            $_data = fread($fp, $this->maxlength);
+            if (strlen($_data) == 0) {
+                break;
+            }
+            $results .= $_data;
+        } while(true);
+
+        if ($this->read_timeout > 0 && $this->_check_timeout($fp))
+        {
+            $this->status=-100;
+            return false;
+        }
+
+        // check if there is a a redirect meta tag
+
+        if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+
+        {
+            $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
+        }
+
+        // have we hit our frame depth and is there frame src to fetch?
+        if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+        {
+            $this->results[] = $results;
+            for($x=0; $x<count($match[1]); $x++)
+                $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+        }
+        // have we already fetched framed content?
+        elseif(is_array($this->results))
+            $this->results[] = $results;
+        // no framed content
+        else
+            $this->results = $results;
+
+        return true;
+    }
+
+/*======================================================================*\
+    Function:    _httpsrequest
+    Purpose:    go get the https data from the server using curl
+    Input:        $url        the url to fetch
+                $URI        the full URI
+                $body        body contents to send if any (POST)
+    Output:
+\*======================================================================*/
+
+    function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
+    {
+        if($this->passcookies && $this->_redirectaddr)
+            $this->setcookies();
+
+        $headers = array();
+
+        $URI_PARTS = parse_url($URI);
+        if(empty($url))
+            $url = "/";
+        // GET ... header not needed for curl
+        //$headers[] = $http_method." ".$url." ".$this->_httpversion;
+        if(!empty($this->agent))
+            $headers[] = "User-Agent: ".$this->agent;
+        if(!empty($this->host))
+            if(!empty($this->port))
+                $headers[] = "Host: ".$this->host.":".$this->port;
+            else
+                $headers[] = "Host: ".$this->host;
+        if(!empty($this->accept))
+            $headers[] = "Accept: ".$this->accept;
+        if(!empty($this->referer))
+            $headers[] = "Referer: ".$this->referer;
+        if(!empty($this->cookies))
+        {
+            if(!is_array($this->cookies))
+                $this->cookies = (array)$this->cookies;
+
+            reset($this->cookies);
+            if ( count($this->cookies) > 0 ) {
+                $cookie_str = 'Cookie: ';
+                foreach ( $this->cookies as $cookieKey => $cookieVal ) {
+                $cookie_str .= $cookieKey."=".urlencode($cookieVal)."; ";
+                }
+                $headers[] = substr($cookie_str,0,-2);
+            }
+        }
+        if(!empty($this->rawheaders))
+        {
+            if(!is_array($this->rawheaders))
+                $this->rawheaders = (array)$this->rawheaders;
+            while(list($headerKey,$headerVal) = each($this->rawheaders))
+                $headers[] = $headerKey.": ".$headerVal;
+        }
+        if(!empty($content_type)) {
+            if ($content_type == "multipart/form-data")
+                $headers[] = "Content-type: $content_type; boundary=".$this->_mime_boundary;
+            else
+                $headers[] = "Content-type: $content_type";
+        }
+        if(!empty($body))
+            $headers[] = "Content-length: ".strlen($body);
+        if(!empty($this->user) || !empty($this->pass))
+            $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass);
+
+        for($curr_header = 0; $curr_header < count($headers); $curr_header++) {
+            $safer_header = strtr( $headers[$curr_header], "\"", " " );
+            $cmdline_params .= " -H \"".$safer_header."\"";
+        }
+
+        if(!empty($body))
+            $cmdline_params .= " -d \"$body\"";
+
+        if($this->read_timeout > 0)
+            $cmdline_params .= " -m ".$this->read_timeout;
+            
+        if(@!is_readable($temp_dir) || @!is_writable($temp_dir)){
+            $updir = wp_upload_dir();
+            if(isset($updir['basedir'])){
+                $temp_dir = $updir['basedir'];    
+            }else{
+                $temp_dir = $updir['path'];    
+            }
+            @mkdir($temp_dir);
+            $headerfile = $updir['path'] . '/icl_' . time() . '.tar.gz';            
+        }else{
+            $headerfile = tempnam($temp_dir, "sno");    
+        }    
+
+        exec($this->curl_path." -k -D \"$headerfile\"".$cmdline_params." \"".escapeshellcmd($URI)."\"",$results,$return);
+        
+        if(isset($updir)){
+            @unlink($headerfile);
+        }
+
+        if($return)
+        {
+            $this->error = "Error: cURL could not retrieve the document, error $return.";
+            return false;
+        }
+
+
+        $results = implode("\r\n",$results);
+
+        $result_headers = file("$headerfile");
+
+        $this->_redirectaddr = false;
+        unset($this->headers);
+
+        for($currentHeader = 0; $currentHeader < count($result_headers); $currentHeader++)
+        {
+
+            // if a header begins with Location: or URI:, set the redirect
+            if(preg_match("/^(Location: |URI: )/i",$result_headers[$currentHeader]))
+            {
+                // get URL portion of the redirect
+                preg_match("/^(Location: |URI:)\s+(.*)/",chop($result_headers[$currentHeader]),$matches);
+                // look for :// in the Location header to see if hostname is included
+                if(!preg_match("|\:\/\/|",$matches[2]))
+                {
+                    // no host in the path, so prepend
+                    $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+                    // eliminate double slash
+                    if(!preg_match("|^/|",$matches[2]))
+                            $this->_redirectaddr .= "/".$matches[2];
+                    else
+                            $this->_redirectaddr .= $matches[2];
+                }
+                else
+                    $this->_redirectaddr = $matches[2];
+            }
+
+            if(preg_match("|^HTTP/|",$result_headers[$currentHeader]))
+                $this->response_code = $result_headers[$currentHeader];
+
+            $this->headers[] = $result_headers[$currentHeader];
+        }
+
+        // check if there is a a redirect meta tag
+
+        if(preg_match("'<meta[\s]*http-equiv[^>]*?content[\s]*=[\s]*[\"\']?\d+;[\s]*URL[\s]*=[\s]*([^\"\']*?)[\"\']?>'i",$results,$match))
+        {
+            $this->_redirectaddr = $this->_expandlinks($match[1],$URI);
+        }
+
+        // have we hit our frame depth and is there frame src to fetch?
+        if(($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i",$results,$match))
+        {
+            $this->results[] = $results;
+            for($x=0; $x<count($match[1]); $x++)
+                $this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS["scheme"]."://".$this->host);
+        }
+        // have we already fetched framed content?
+        elseif(is_array($this->results))
+            $this->results[] = $results;
+        // no framed content
+        else
+            $this->results = $results;
+
+        unlink("$headerfile");
+
+        return true;
+    }
+
+/*======================================================================*\
+    Function:    setcookies()
+    Purpose:    set cookies for a redirection
+\*======================================================================*/
+
+    function setcookies()
+    {
+        for($x=0; $x<count($this->headers); $x++)
+        {
+        if(preg_match('/^set-cookie:[\s]+([^=]+)=([^;]+)/i', $this->headers[$x],$match))
+            $this->cookies[$match[1]] = urldecode($match[2]);
+        }
+    }
+
+
+/*======================================================================*\
+    Function:    _check_timeout
+    Purpose:    checks whether timeout has occurred
+    Input:        $fp    file pointer
+\*======================================================================*/
+
+    function _check_timeout($fp)
+    {
+        if ($this->read_timeout > 0) {
+            $fp_status = socket_get_status($fp);
+            if ($fp_status["timed_out"]) {
+                $this->timed_out = true;
+                return true;
+            }
+        }
+        return false;
+    }
+
+/*======================================================================*\
+    Function:    _connect
+    Purpose:    make a socket connection
+    Input:        $fp    file pointer
+\*======================================================================*/
+
+    function _connect(&$fp)
+    {
+        if(!empty($this->proxy_host) && !empty($this->proxy_port))
+            {
+                $this->_isproxy = true;
+
+                $host = $this->proxy_host;
+                $port = $this->proxy_port;
+            }
+        else
+        {
+            $host = $this->host;
+            $port = $this->port;
+        }
+
+        $this->status = 0;        
+        if($fp = @fsockopen(
+                    $host,
+                    $port,
+                    $errno,
+                    $errstr,
+                    $this->_fp_timeout
+                    ))
+        {
+            // socket connection succeeded
+
+            return true;
+        }
+        else
+        {
+            // socket connection failed
+            $this->status = $errno;
+            switch($errno)
+            {
+                case -3:
+                    $this->error="socket creation failed (-3)";
+                case -4:
+                    $this->error="dns lookup failure (-4)";
+                case -5:
+                    $this->error="connection refused or timed out (-5)";
+                default:
+                    $this->error = sprintf(__('WPML cannot connect to <a%s>www.icanlocalize.com</a>. Please make sure that outgoing communication on port 80 (or 443) is enabled.
+<a%s>www.icanlocalize.com</a> is found on IP - %s. You can open all ports to and from that IP.', 'sitepress'), ' href="http://www.icanlocalize.com/";', ' href="http://www.icanlocalize.com/";', '72.249.85.19');
+            }
+            return false;
+        }
+    }
+/*======================================================================*\
+    Function:    _disconnect
+    Purpose:    disconnect a socket connection
+    Input:        $fp    file pointer
+\*======================================================================*/
+
+    function _disconnect($fp)
+    {
+        return(fclose($fp));
+    }
+
+
+/*======================================================================*\
+    Function:    _prepare_post_body
+    Purpose:    Prepare post body according to encoding type
+    Input:        $formvars  - form variables
+                $formfiles - form upload files
+    Output:        post body
+\*======================================================================*/
+
+    function _prepare_post_body($formvars, $formfiles)
+    {
+        settype($formvars, "array");
+        settype($formfiles, "array");
+        $postdata = '';
+
+        if (count($formvars) == 0 && count($formfiles) == 0)
+            return;
+
+        switch ($this->_submit_type) {
+            case "application/x-www-form-urlencoded":
+                reset($formvars);
+                while(list($key,$val) = each($formvars)) {
+                    if (is_array($val) || is_object($val)) {
+                        while (list($cur_key, $cur_val) = each($val)) {
+                            $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&";
+                        }
+                    } else
+                        $postdata .= urlencode($key)."=".urlencode($val)."&";
+                }
+                break;
+
+            case "multipart/form-data":
+                $this->_mime_boundary = "Snoopy".md5(uniqid(microtime()));
+
+                reset($formvars);
+                while(list($key,$val) = each($formvars)) {
+                    if (is_array($val) || is_object($val)) {
+                        while (list($cur_key, $cur_val) = each($val)) {
+                            $postdata .= "--".$this->_mime_boundary."\r\n";
+                            $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
+                            $postdata .= "$cur_val\r\n";
+                        }
+                    } else {
+                        $postdata .= "--".$this->_mime_boundary."\r\n";
+                        $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n";
+                        $postdata .= "$val\r\n";
+                    }
+                }
+
+                reset($formfiles);
+                while (list($field_name, $file_names) = each($formfiles)) {
+                    settype($file_names, "array");
+                    while (list(, $file_name) = each($file_names)) {
+                        // HACK: check to see if $file_name is an array
+                        if (is_array($file_name)) {
+                            // passing the file_name and file_data in an array.
+                            $file_content = $file_name[1];
+                            $file_name = $file_name[0];
+                            $base_name = basename($file_name);
+                            
+                        } else {
+                            
+                            // disable error reporting
+                            // needed for open_basedir restrictions (is_readable)
+                            $_display_errors = ini_get('display_errors');
+                            $_error_reporting = ini_get('error_reporting');
+                            ini_set('display_errors', '0');        
+                            ini_set('error_reporting', E_NONE);        
+                            
+                            $_is_readable = @is_readable($file_name);
+                            
+                            // restore error reporting
+                            // needed for open_basedir restrictions
+                            ini_set('display_errors', $_display_errors);        
+                            ini_set('error_reporting', $_error_reporting);        
+                            
+                            if (!$_is_readable) continue;
+    
+                            $fp = fopen($file_name, "r");
+                            $file_content = fread($fp, filesize($file_name));
+                            fclose($fp);
+                            $base_name = basename($file_name);
+                        }
+
+                        $postdata .= "--".$this->_mime_boundary."\r\n";
+                        $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n"; //HACK
+                        $postdata .= "Content-type: application/octet-stream\r\n\r\n";  //HACK
+                        $postdata .= "$file_content\r\n";
+                    }
+                }
+                $postdata .= "--".$this->_mime_boundary."--\r\n";
+                break;
+        }
+
+        return $postdata;
+    }
+}
+endif;
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/lib/http.php b/wp-content/plugins/sitepress-multilingual-cms/lib/http.php
new file mode 100644
index 0000000..2dc92a7
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/lib/http.php
@@ -0,0 +1 @@
+<?php //legacy ?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/lib/icl_api.php b/wp-content/plugins/sitepress-multilingual-cms/lib/icl_api.php
new file mode 100644
index 0000000..71db2ec
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/lib/icl_api.php
@@ -0,0 +1,665 @@
+<?php
+class ICanLocalizeQuery{
+      private $site_id; 
+      private $access_key;
+      private $error = null;
+
+      function __construct($site_id=null, $access_key=null){             
+            $this->site_id = $site_id;
+            $this->access_key = $access_key;
+      } 
+      
+      public function setting($setting){
+          return $this->$setting;
+      }
+      
+      public function error(){
+          return $this->error;
+      }
+      
+    
+    function createAccount($data){
+		if (isset($_GET['page']) && $_GET['page'] == 'sitepress-multilingual-cms/menu/support.php') {
+			$add = '?ignore_languages=1';
+		}
+        $request = ICL_API_ENDPOINT . '/websites/create_by_cms.xml'.$add;
+        $response = $this->_request($request, 'POST', $data);        
+        if(!$response){
+            return array(0, $this->error);
+        }else{
+            $site_id = $response['info']['website']['attr']['id'];
+            $access_key = $response['info']['website']['attr']['accesskey'];
+        }
+        return array($site_id, $access_key);
+    }
+
+    function updateAccount($data){        
+        $request = ICL_API_ENDPOINT . '/websites/'.$data['site_id'].'/update_by_cms.xml';
+        unset($data['site_id']);
+        $response = $this->_request($request, 'POST', $data);        
+        if(!$response){
+            return $this->error;
+        }else{
+            return 0;            
+        }
+    }
+
+    function transfer_account($data) {
+        $request = ICL_API_ENDPOINT . '/websites/'.$data['site_id'].'/transfer_account.xml';
+        $response = $this->_request($request, 'POST', $data);        
+        if(!$response){
+            return array(false, $this->error);
+        }else{
+            $error_code = $response['info']['status']['attr']['err_code'];
+	    if ($error_code == 0) {
+		  $access_key = $response['info']['website']['attr']['accesskey'];
+                  return array(true, $access_key);
+	    } else {
+		  return array(false, $response['info']['status']['value']);
+	    }
+        }
+    }
+    
+    function get_website_details(){
+        $request_url = ICL_API_ENDPOINT . '/websites/' . $this->site_id . '.xml?accesskey=' . $this->access_key;
+        $res = $this->_request($request_url);
+        if(isset($res['info']['website'])){
+            return $res['info']['website'];
+        }else{
+            return array();
+        }
+    }
+    
+    
+    function _request($request, $method='GET', $formvars=null, $formfiles=null, $gzipped = false){
+        
+        $request = str_replace(" ", "%20", $request);
+        $c = new IcanSnoopy();
+
+        // disable error reporting
+        // needed for open_basedir restrictions (is_readable)
+        $_display_errors = ini_get('display_errors');
+        $_error_reporting = ini_get('error_reporting');
+        ini_set('display_errors', '0');        
+        ini_set('error_reporting', E_NONE);        
+        
+        if (! is_readable($c->curl_path) || ! is_executable($c->curl_path)){
+            $c->curl_path = '/usr/bin/curl';
+        }        
+        
+        // restore error reporting
+        // needed for open_basedir restrictions
+        ini_set('display_errors', $_display_errors);        
+        ini_set('error_reporting', $_error_reporting);        
+        
+        
+        $c->_fp_timeout = 3;
+        $url_parts = parse_url($request);
+        $https = $url_parts['scheme']=='https';
+        if($method=='GET'){            
+            $_force_mp_post_http = get_option('_force_mp_post_http');
+            if($_force_mp_post_http){
+                $request = str_replace('https://','http://',$request);
+                $https = false;
+            }
+            $c->fetch($request);  
+            if((!$c->results || $c->timed_out) && $https){
+                $c->fetch(str_replace('https://','http://',$request));  
+            }          
+            if($c->timed_out){die(__('Error:','sitepress').$c->error);}
+        }else{
+            $c->set_submit_multipart();          
+            
+            $_force_mp_post_http = get_option('_force_mp_post_http');
+            if($_force_mp_post_http){
+                $request = str_replace('https://','http://',$request);
+                $https = false;
+            }else{
+                $_mp_post_https_tries = (int)get_option('_mp_post_https_tries');
+                if($_mp_post_https_tries == 2){ //it's the third try
+                    $request = str_replace('https://','http://',$request);
+                    $https = false;
+                    update_option('_force_mp_post_http', 1);
+                }else{
+                    $_mp_post_https_tries++;
+                    update_option('_mp_post_https_tries', $_mp_post_https_tries);
+                }
+            }
+            $c->submit($request, $formvars, $formfiles);            
+            if((!$c->results || $c->timed_out) && $https){
+                $c->submit(str_replace('https://','http://',$request), $formvars, $formfiles);  
+            }                      
+            if($c->timed_out){die(__('Error:','sitepress').$c->error);}
+            update_option('_mp_post_https_tries', 0);
+            
+        }
+        if($c->error){
+            $this->error = $c->error;
+            return false;
+        }
+        
+        if($gzipped){
+            $c->results = $this->_gzdecode($c->results);
+        }        
+        $results = xml2array($c->results,1);                
+        if(isset($results['info']) && $results['info']['status']['attr']['err_code']=='-1'){
+            $this->error = $results['info']['status']['value'];            
+            return false;
+        }
+                
+        return $results;
+    }
+    
+    function _request_gz($request_url){
+        $gzipped = true;
+        return $this->_request($request_url, 'GET', null, null, $gzipped);
+    }   
+       
+    function build_cms_request_xml($data, $orig_lang, $previous_rid = false, $linkTo = '') {
+        global $wp_taxonomies;
+        $taxonomies = array_diff(array_keys((array)$wp_taxonomies), array('post_tag','category'));
+        
+        if($previous_rid){
+            $command = 'update_content';
+            $previous_rid = 'previous_cms_request_id="'.$previous_rid.'"';
+        }else{
+            $command = 'new_content';
+            $previous_rid = '';
+        }
+        $tab = "\t";
+        $nl = PHP_EOL;
+        
+        $xml  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>".$nl;
+        $xml .= '<cms_request_details type="sitepress" command="'.$command.'" from_lang="'.$orig_lang.'" '.$previous_rid.'>'.$nl;
+        $xml .= $tab.'<link url="'.$data['url'].'" />'.$nl;
+        $xml .= $tab.'<contents>'.$nl;
+        foreach($data['contents'] as $key=>$val){
+            if($key=='categories' || $key == 'tags' || in_array($key, $taxonomies)){$quote="'";}else{$quote='"';}
+            $xml .= $tab.$tab.'<content type="'.$key.'" translate="'.$val['translate'].'" data='.$quote.$val['data'].$quote;
+            if(isset($val['format'])) $xml .= ' format="'.$val['format'].'"';
+            $xml .=  ' />'.$nl;    
+        }        
+        $xml .= $tab.'</contents>'.$nl;
+        $xml .= $tab.'<cms_target_languages>'.$nl;
+        foreach($data['target_languages'] as $lang){
+            $xml .= $tab.$tab.'<target_language lang="'.utf8_encode($lang).'" />'.$nl;    
+        }                
+        $xml .= $tab.'</cms_target_languages>'.$nl;
+        $xml .= '</cms_request_details>';                
+        return $xml;
+    }
+      
+    function send_request($xml, $title, $to_languages, $orig_language, $permlink, $note=""){
+        $request_url = ICL_API_ENDPOINT . '/websites/'. $this->site_id . '/cms_requests.xml';
+        
+        $parameters['accesskey'] = $this->access_key;
+        $parameters['doc_count'] = 1;          
+        $i = 1;
+        foreach($to_languages as $l){
+          $parameters['to_language'.$i] = $l;
+          $i++;
+        }
+        $parameters['orig_language'] = $orig_language;          
+        $parameters['file1[description]'] = 'cms_request_details';          
+        $parameters['title'] = $title;          
+        if($permlink){
+            $parameters['permlink'] = $permlink;          
+        }
+        
+        $parameters['note'] = $note;
+        
+        // add a unique key so that so that the server can return an
+        // existing cms_request_id if we are sending the same info
+        
+        $parameters['key'] = md5($xml);
+        
+        //$parameters['list_type'] = 'post';          
+        //$parameters['list_id'] = $timestamp;          
+        
+        
+        $file = "cms_request_details.xml.gz";
+        
+        // send the file upload as the file_name and file_content in an array.
+        // Snoopy has been changed to use this format.
+        $res = $this->_request($request_url, 'POST' , $parameters, array('file1[uploaded_data]'=>array(array($file, gzencode($xml)))));
+        if($res['info']['status']['attr']['err_code']=='0'){
+            return $res['info']['result']['attr']['id'];
+        }else{
+            return isset($res['info']['status']['attr']['err_code'])?-1*$res['info']['status']['attr']['err_code']:0;
+        }
+        
+        return $res;
+        
+        
+    }   
+    
+    function cms_requests(){
+        $request_url = ICL_API_ENDPOINT . '/websites/' . $this->site_id . '/cms_requests.xml?filter=pickup&accesskey=' . $this->access_key;        
+        $res = $this->_request($request_url);
+        if(empty($res['info']['pending_cms_requests']['cms_request'])){
+            $pending_requests = array();
+        }elseif(count($res['info']['pending_cms_requests']['cms_request'])==1){
+            $pending_requests[0] = $res['info']['pending_cms_requests']['cms_request']['attr']; 
+        }else{
+            foreach($res['info']['pending_cms_requests']['cms_request'] as $req){
+                $pending_requests[] = $req['attr'];
+            }
+        }
+        return $pending_requests;
+    }   
+    
+    function cms_request_details($request_id, $language){
+        $request_url = ICL_API_ENDPOINT . '/websites/' . $this->site_id . '/cms_requests/'.$request_id.'/cms_download.xml?accesskey=' . $this->access_key . '&language=' . $language;                
+        $res = $this->_request($request_url);
+        if(isset($res['info']['cms_download'])){
+            return $res['info']['cms_download'];
+        }else{
+            return array();
+        }
+    }
+    
+    function cms_do_download($request_id, $language){
+        global $wp_taxonomies;
+        $taxonomies = array_diff(array_keys((array)$wp_taxonomies), array('post_tag','category'));
+        
+        $request_url = ICL_API_ENDPOINT . '/websites/' . $this->site_id . '/cms_requests/'.$request_id.'/cms_download?accesskey=' . $this->access_key . '&language=' . $language;                        
+        $res = $this->_request_gz($request_url);                
+        $content = $res['cms_request_details']['contents']['content'];
+                
+        $translation = array();
+        if($content)        
+        foreach($content as $c){
+            if($c['attr']['type']=='tags' || $c['attr']['type']=='categories' || in_array($c['attr']['type'], $taxonomies)){
+                $exp = explode(',',$c['translations']['translation']['attr']['data']);
+                $arr = array();
+                foreach($exp as $e){
+                    if($c['attr']['format'] == 'csv_base64'){
+                        $arr[] = base64_decode(html_entity_decode($e));
+                    } else {
+                        $arr[] = html_entity_decode($e);
+                    }
+                }
+                $c['translations']['translation']['attr']['data'] = $arr;
+            }
+            if(isset($c['translations'])){
+                $translation[$c['attr']['type']] = $c['translations']['translation']['attr']['data'];
+            }else{
+                $translation[$c['attr']['type']] = $c['attr']['data'];
+            }
+            if($c['attr']['format'] == 'base64'){
+                $translation[$c['attr']['type']] = base64_decode($translation[$c['attr']['type']]);
+            }
+            
+            if($c['attr']['type'] == 'body'){
+                $translation['body'] = html_entity_decode($translation['body'], ENT_QUOTES, 'UTF-8');
+            }
+            
+        }
+        return $translation;
+    }
+    
+    function cms_update_request_status($request_id, $status, $language){
+        $request_url = ICL_API_ENDPOINT . '/websites/' . $this->site_id . '/cms_requests/'.$request_id.'/update_status.xml';                            
+        $parameters['accesskey'] = $this->access_key;
+        $parameters['status'] = $status;
+        if($language){
+            $parameters['language'] = $language;
+        }        
+        
+        $res = $this->_request($request_url, 'POST' , $parameters);
+        
+        return ($res['result']['attr']['error_code']==0);
+    }
+    
+    function cms_request_translations($request_id){
+        $request_url = ICL_API_ENDPOINT . '/websites/' . $this->site_id . '/cms_requests/'.$request_id.'.xml?accesskey=' . $this->access_key;               
+        $res = $this->_request($request_url);
+        if(isset($res['info']['cms_request'])){
+            return $res['info']['cms_request'];
+        }else{
+            return array();
+        }        
+    }
+    
+    function _gzdecode($data){
+        
+        return icl_gzdecode($data);
+    }
+    
+    function cms_create_message($body, $from_language, $to_language){
+        $request_url = ICL_API_ENDPOINT . '/websites/'. $this->site_id . '/create_message.xml';    
+        $parameters['accesskey'] = $this->access_key;
+        $parameters['body'] = base64_encode($body);
+        $parameters['from_language'] = $from_language;
+        $parameters['to_language'] = $to_language;
+        $parameters['signature'] = md5($body.$from_language.$to_language);
+        $res = $this->_request($request_url, 'POST' , $parameters);        
+        if($res['info']['status']['attr']['err_code']=='0'){
+            return $res['info']['result']['attr']['id'];
+        }else{
+            return isset($res['info']['status']['attr']['err_code'])?-1*$res['info']['status']['attr']['err_code']:0;
+        }
+        
+        return $res;
+        
+    }
+    
+    function get_session_id($support_mode) {
+        global $sitepress;
+        $sitepress_settigs = $sitepress->get_settings();
+        $request_url = ICL_API_ENDPOINT . '/login/login.xml';    
+        $request_url .= '?accesskey=' . $this->access_key;
+        $request_url .= '&wid=' . $this->site_id;
+        $request_url .= '&usertype=Client';
+        $request_url .= '&compact=1';
+		if ($support_mode) {
+			$email_setting = 'support_icl_account_email';
+		} else {
+			$email_setting = 'icl_account_email';
+		}
+		if (!isset($sitepress_settigs[$email_setting])) {
+			$current_user = wp_get_current_user();
+			$email = $current_user->data->user_email;
+		} else {
+			$email = $sitepress_settigs[$email_setting];
+		}
+        $request_url .= '&email=' . $email;
+        
+        $res = $this->_request($request_url, 'GET');        
+        if($res['info']['status']['attr']['err_code']=='0'){
+            return $res['info']['session_num']['value'];
+        }else{
+            return null;
+        }
+      
+    }
+    
+    function get_reminders($refresh = false) {
+        global $wpdb, $sitepress;
+        
+        // see if we need to refresh the reminders from ICanLocalize
+        $icl_settings = $sitepress->get_settings();
+        $last_time = $icl_settings['last_icl_reminder_fetch'];
+        
+        if (!$refresh && ((time() - $last_time) > 60) && $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->prefix}icl_reminders w WHERE w.show=1") == 0) {
+            $refresh = true;
+        }
+        
+        if (((time() - $last_time) > 10 * 60) || $refresh) {
+    
+            $request_url = ICL_API_ENDPOINT . '/reminders.xml?accesskey='.$this->access_key.'&wid=' . $this->site_id;
+    
+            $res = $this->_request($request_url, 'GET');        
+            if($res['info']['status']['attr']['err_code']=='3'){
+                // not logged in get a new session_id
+                $session_id = $this->get_session_id(FALSE);
+        
+                $request_url = ICL_API_ENDPOINT . '/reminders.xml?accesskey='.$this->access_key.'&wid=' . $this->site_id;
+        
+                $res = $this->_request($request_url, 'GET');
+            }
+                
+            if($res['info']['status']['attr']['err_code']=='0'){
+                
+                @mysql_query("TRUNCATE {$wpdb->prefix}icl_reminders");
+                
+                // First add any low funding warning.
+                $website_data = $this->get_website_details();
+                if (isset($website_data['unfunded_cms_requests'])) {
+                    $missing_funds = $website_data['unfunded_cms_requests']['attr']['missing_funds'];
+                    $number_waiting = sizeof($website_data['unfunded_cms_requests']['cms_request']);
+                    
+                    $r['message'] = sprintf(__('You don\'t have enough funds in your ICanLocalize account - [b]Funds required - $%s[/b]', 'sitepress'), $missing_funds);
+                    $r['id'] = -1;
+                    $r['can_delete'] = 1;
+                    $r['show'] = 1;
+                    $r['url'] = '/finance';
+                    $wpdb->insert($wpdb->prefix.'icl_reminders', $r);
+                }
+                // save the translator status
+                $sitepress->get_icl_translator_status($icl_settings, $website_data);
+                $sitepress->save_settings($iclsettings);               
+                
+                // Now add the reminders.
+                $reminders_xml = $res['info']['reminders']['reminder'];
+                if($reminders_xml) {
+                    
+                    if (sizeof($reminders_xml) == 1) {
+                        // fix problem when only on item found
+                        $reminders_xml = array($reminders_xml);
+                    }
+                    
+                    foreach($reminders_xml as $r){
+    
+                        $r['attr']['can_delete'] = $r['attr']['can_delete'] == 'true' ? 1 : 0;
+                        $r['attr']['show'] = 1;
+                        
+                        $wpdb->insert($wpdb->prefix.'icl_reminders', $r['attr']);
+                    }
+                }
+                $last_time = time();
+                $sitepress->save_settings(array('last_icl_reminder_fetch' => $last_time));
+            }
+        }
+
+        // check if low funding is still valid
+        if ($wpdb->get_var("SELECT id FROM {$wpdb->prefix}icl_reminders WHERE id=-1") == -1) {
+        
+            $website_data = $this->get_website_details();
+            if (!isset($website_data['unfunded_cms_requests'])) {
+                $wpdb->query("DELETE FROM {$wpdb->prefix}icl_reminders WHERE id=-1");
+            }
+        }
+
+            
+        return $wpdb->get_results("SELECT * FROM {$wpdb->prefix}icl_reminders w WHERE w.show=1 ORDER BY id");
+        
+    }
+
+    function get_current_session($refresh = false, $support_mode = false) {
+        global $sitepress;
+    
+        // see if we need to refresh the reminders from ICanLocalize
+        $icl_settings = $sitepress->get_settings();
+        $last_time = $icl_settings['last_icl_reminder_fetch'];
+        if (($refresh || $support_mode) && (time() - $last_time > 30 * 60)) {
+            $session_id = $this->get_session_id($support_mode);
+    
+            $last_time = time();
+            if (!$support_mode) {
+				$sitepress->save_settings(array('icl_current_session' => $session_id));
+			}
+            return $session_id;
+        } else {
+            return $icl_settings['icl_current_session'];
+        }
+        
+    }
+    
+    function delete_message($message_id) {
+        global $wpdb;
+
+        if ((int)$message_id >= 0) {
+            $session_id = $this->get_current_session();
+    
+            $request_url = ICL_API_ENDPOINT . '/reminders/' . $message_id . '.xml?wid='.$this->site_id.'&accesskey=' . $this->access_key;
+            
+            $data = array('session' => $session_id, 'accesskey' => $this->access_key, 
+                          '_method' => 'DELETE');
+    
+            $res = $this->_request($request_url, 'POST', $data);
+            if($res['info']['status']['attr']['err_code']=='3'){
+                // not logged in get a new session_id
+                $session_id = $this->get_session_id(FALSE);
+
+                $res = $this->_request($request_url, 'POST', $data);
+            }
+
+            if($res['info']['result']['value']=='Reminder deleted' ||
+                    $res['info']['result']['value']=='Reminder not found'){
+                // successfully deleted on the server.
+                $wpdb->query("DELETE FROM {$wpdb->prefix}icl_reminders WHERE id={$message_id}");
+            }
+        
+            
+        } else {
+            // this is the low funding reminder.
+            $wpdb->query("DELETE FROM {$wpdb->prefix}icl_reminders WHERE id={$message_id}");
+        }
+            
+    }
+    
+    function report_back_permalink($request_id, $language, $translation) {
+        global $wpdb;
+        $request_url = ICL_API_ENDPOINT . '/websites/' . $this->site_id . '/cms_requests/'. $request_id . '/update_permlink.xml';
+        
+        $parameters['accesskey'] = $this->access_key;
+        $parameters['language'] = $language;
+        if($wpdb->get_var("SELECT post_type FROM $wpdb->posts WHERE ID={$translation->element_id}")=='page'){
+            $parameters['permlink'] = get_option('home') . '?page_id=' . $translation->element_id;
+        }else{
+            $parameters['permlink'] = get_option('home') . '?p=' . $translation->element_id;
+        }
+        
+        $res = $this->_request($request_url, 'POST', $parameters);
+        
+    }
+    
+    function get_help_links() {
+        $request_url = 'http://wpml.org/wpml-resource-maps/pro-translation.xml';
+
+        $res = $this->_request($request_url, 'GET');
+        
+        return $res;
+    }
+    
+    function test_affiliate_info($id, $key){
+        $request_url = ICL_API_ENDPOINT . '/websites/validate_affiliate.xml?affiliate_id='.$id.'&affiliate_key=' . $key;
+        $res = $this->_request($request_url, 'GET');
+        return $res['info']['result']['value'] == 'OK';
+    }
+        
+}
+  
+/**
+ * gzdecode implementation
+ *
+ * @see http://hu.php.net/manual/en/function.gzencode.php#44470
+ * 
+ * @param string $data
+ * @param string $filename
+ * @param string $error
+ * @param int $maxlength
+ * @return string
+ */
+function icl_gzdecode($data, &$filename = '', &$error = '', $maxlength = null) {
+    $len = strlen ( $data );
+    if ($len < 18 || strcmp ( substr ( $data, 0, 2 ), "\x1f\x8b" )) {
+        $error = "Not in GZIP format.";
+        return null; // Not GZIP format (See RFC 1952)
+    }
+    $method = ord ( substr ( $data, 2, 1 ) ); // Compression method
+    $flags = ord ( substr ( $data, 3, 1 ) ); // Flags
+    if ($flags & 31 != $flags) {
+        $error = "Reserved bits not allowed.";
+        return null;
+    }
+    // NOTE: $mtime may be negative (PHP integer limitations)
+    $mtime = unpack ( "V", substr ( $data, 4, 4 ) );
+    $mtime = $mtime [1];
+    $xfl = substr ( $data, 8, 1 );
+    $os = substr ( $data, 8, 1 );
+    $headerlen = 10;
+    $extralen = 0;
+    $extra = "";
+    if ($flags & 4) {
+        // 2-byte length prefixed EXTRA data in header
+        if ($len - $headerlen - 2 < 8) {
+            return false; // invalid
+        }
+        $extralen = unpack ( "v", substr ( $data, 8, 2 ) );
+        $extralen = $extralen [1];
+        if ($len - $headerlen - 2 - $extralen < 8) {
+            return false; // invalid
+        }
+        $extra = substr ( $data, 10, $extralen );
+        $headerlen += 2 + $extralen;
+    }
+    $filenamelen = 0;
+    $filename = "";
+    if ($flags & 8) {
+        // C-style string
+        if ($len - $headerlen - 1 < 8) {
+            return false; // invalid
+        }
+        $filenamelen = strpos ( substr ( $data, $headerlen ), chr ( 0 ) );
+        if ($filenamelen === false || $len - $headerlen - $filenamelen - 1 < 8) {
+            return false; // invalid
+        }
+        $filename = substr ( $data, $headerlen, $filenamelen );
+        $headerlen += $filenamelen + 1;
+    }
+    $commentlen = 0;
+    $comment = "";
+    if ($flags & 16) {
+        // C-style string COMMENT data in header
+        if ($len - $headerlen - 1 < 8) {
+            return false; // invalid
+        }
+        $commentlen = strpos ( substr ( $data, $headerlen ), chr ( 0 ) );
+        if ($commentlen === false || $len - $headerlen - $commentlen - 1 < 8) {
+            return false; // Invalid header format
+        }
+        $comment = substr ( $data, $headerlen, $commentlen );
+        $headerlen += $commentlen + 1;
+    }
+    $headercrc = "";
+    if ($flags & 2) {
+        // 2-bytes (lowest order) of CRC32 on header present
+        if ($len - $headerlen - 2 < 8) {
+            return false; // invalid
+        }
+        $calccrc = crc32 ( substr ( $data, 0, $headerlen ) ) & 0xffff;
+        $headercrc = unpack ( "v", substr ( $data, $headerlen, 2 ) );
+        $headercrc = $headercrc [1];
+        if ($headercrc != $calccrc) {
+            $error = "Header checksum failed.";
+            return false; // Bad header CRC
+        }
+        $headerlen += 2;
+    }
+    // GZIP FOOTER
+    $datacrc = unpack ( "V", substr ( $data, - 8, 4 ) );
+    $datacrc = sprintf ( '%u', $datacrc [1] & 0xFFFFFFFF );
+    $isize = unpack ( "V", substr ( $data, - 4 ) );
+    $isize = $isize [1];
+    // decompression:
+    $bodylen = $len - $headerlen - 8;
+    if ($bodylen < 1) {
+        // IMPLEMENTATION BUG!
+        return null;
+    }
+    $body = substr ( $data, $headerlen, $bodylen );
+    $data = "";
+    if ($bodylen > 0) {
+        switch ($method) {
+            case 8 :
+                // Currently the only supported compression method:
+                $data = gzinflate ( $body, $maxlength );
+                break;
+            default :
+                $error = "Unknown compression method.";
+                return false;
+        }
+    } // zero-byte body content is allowed
+    // Verifiy CRC32
+    $crc = sprintf ( "%u", crc32 ( $data ) );
+    $crcOK = $crc == $datacrc;
+    $lenOK = $isize == strlen ( $data );
+    if (! $lenOK || ! $crcOK) {
+        $error = ($lenOK ? '' : 'Length check FAILED. ') . ($crcOK ? '' : 'Checksum FAILED.');
+        return false;
+    }
+    return $data;
+}
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/lib/xml2array.php b/wp-content/plugins/sitepress-multilingual-cms/lib/xml2array.php
new file mode 100644
index 0000000..191e256
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/lib/xml2array.php
@@ -0,0 +1,93 @@
+<?php
+if(!function_exists('xml2array')):
+
+function xml2array($contents, $get_attributes=1) {
+    if(!$contents) return array();
+
+    if(!function_exists('xml_parser_create')) {
+        //print "'xml_parser_create()' function not found!";
+        return array();
+    }
+    //Get the XML parser of PHP - PHP must have this module for the parser to work
+    $parser = xml_parser_create();
+    xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, 0 );
+    xml_parser_set_option( $parser, XML_OPTION_SKIP_WHITE, 1 );
+    xml_parse_into_struct( $parser, $contents, $xml_values );
+    xml_parser_free( $parser );
+
+    if(!$xml_values) return;//Hmm...
+
+    //Initializations
+    $xml_array = array();
+    $parents = array();
+    $opened_tags = array();
+    $arr = array();
+
+    $current = &$xml_array;
+
+    //Go through the tags.
+    foreach($xml_values as $data) {
+        unset($attributes,$value);//Remove existing values, or there will be trouble
+
+        //This command will extract these variables into the foreach scope
+        // tag(string), type(string), level(int), attributes(array).
+        extract($data);//We could use the array by itself, but this cooler.
+
+        $result = '';
+        if($get_attributes) {//The second argument of the function decides this.
+            $result = array();
+            if(isset($value)) $result['value'] = $value;
+
+            //Set the attributes too.
+            if(isset($attributes)) {
+                foreach($attributes as $attr => $val) {
+                    if($get_attributes == 1) $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
+                    /**  :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */
+                }
+            }
+        } elseif(isset($value)) {
+            $result = $value;
+        }
+
+        //See tag status and do the needed.
+        if($type == "open") {//The starting of the tag '<tag>'
+            $parent[$level-1] = &$current;
+
+            if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag
+                $current[$tag] = $result;
+                $current = &$current[$tag];
+
+            } else { //There was another element with the same tag name
+                if(isset($current[$tag][0])) {
+                    array_push($current[$tag], $result);
+                } else {
+                    $current[$tag] = array($current[$tag],$result);
+                }
+                $last = count($current[$tag]) - 1;
+                $current = &$current[$tag][$last];
+            }
+
+        } elseif($type == "complete") { //Tags that ends in 1 line '<tag />'
+            //See if the key is already taken.
+            if(!isset($current[$tag])) { //New Key
+                $current[$tag] = $result;
+
+            } else { //If taken, put all things inside a list(array)
+                if((is_array($current[$tag]) and $get_attributes == 0)//If it is already an array...
+                        or (isset($current[$tag][0]) and is_array($current[$tag][0]) and $get_attributes == 1)) {
+                    array_push($current[$tag],$result); // ...push the new element into that array.
+                } else { //If it is not an array...
+                    $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value
+                }
+            }
+
+        } elseif($type == 'close') { //End of tag '</tag>'
+            $current = &$parent[$level-1];
+        }
+    }
+
+    return($xml_array);
+} 
+
+endif;
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/license.txt b/wp-content/plugins/sitepress-multilingual-cms/license.txt
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/license.txt
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/absolute-links.php b/wp-content/plugins/sitepress-multilingual-cms/menu/absolute-links.php
new file mode 100644
index 0000000..0ba8504
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/absolute-links.php
@@ -0,0 +1,72 @@
+<?php     
+    require_once ICL_PLUGIN_PATH . '/sitepress.php'; 
+    $active_languages = $sitepress->get_active_languages();            
+    $languages = $sitepress->get_languages();            
+    if(!$sitepress_settings['modules']['absolute-links']['enabled']){
+        $total_posts_pages_processed = (int) $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE meta_key = '_alp_processed'");
+    }
+?>
+<?php $sitepress->noscript_notice() ?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32" style="background: transparent url(<?php echo ICL_PLUGIN_URL ?>/res/img/icon<?php if(!$sitepress_settings['basic_menu']) echo '_adv'?>.png) no-repeat"><br /></div>
+    <h2><?php echo __('Setup WPML', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    
+    <h3><?php echo __('About Sticky Links', 'sitepress') ?></h3>    
+    
+    <p><?php echo __('WPML can turn internal links to posts and pages into sticky links. What this means is that links to pages and posts will automatically update if their URL changes. There are many reasons why page URL changes:', 'sitepress'); ?></p>
+    <ul style="list-style:disc;margin-left:20px;">
+        <li><?php echo __('The slug changes.', 'sitepress'); ?></li>
+        <li><?php echo __('The page parent changes.', 'sitepress'); ?></li>
+        <li><?php echo __('Permlink structure changes.', 'sitepress'); ?></li>
+    </ul>
+    <p><?php echo __('If you select to enable sticky links, internal links to pages and posts will never break. When the URL changes, all links to it will automatically update.', 'sitepress'); ?></p>
+    <p><?php echo __('When you edit a page (while sticky links are enabled) you will notice that links in that page change to the default WordPress links. This is a normal thing. Visitors will not see these &#8220;strange&#8221; links. Instead they will get links to the full URL.', 'sitepress'); ?></p>
+    
+    <h3><?php _e('Options', 'sitepress')?></h3>
+    <form name="icl_save_sl_options" id="icl_save_sl_options" action="" method="post">
+    <ul>
+        <li>
+            <label><input type="checkbox" name="icl_sticky_links_widgets" value="1" 
+            <?php if($sitepress_settings['modules']['absolute-links']['sticky_links_widgets']):?>checked="checked"<?php endif;?>  />
+            &nbsp;<?php _e('Turn links in text widgets to Sticky', 'sitepress')?></label>
+        </li>
+        <li>
+            <label><input type="checkbox" name="icl_sticky_links_strings" value="1"
+            <?php if($sitepress_settings['modules']['absolute-links']['sticky_links_strings']):?>checked="checked"<?php endif;?>  />
+            &nbsp;<?php _e("Turn links in WPML's string Translation to Sticky", 'sitepress')?></label>
+        </li>
+    </ul>
+    <p>
+        <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+        <span class="icl_ajx_response" id="icl_ajx_response2"></span>
+    </p>    
+    </form>
+    
+    <span style="position:absolute;" id="icl_ajax_loader_alp"></span>    
+    
+    <div id="icl_alp_wrap">
+    <?php if($sitepress_settings['modules']['absolute-links']['enabled']):?>    
+    <?php $iclAbsoluteLinks->management_page_content(); ?>    
+    <?php else: ?>
+    <?php 
+        $total_posts_pages_processed = (int) $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE meta_key = '_alp_processed'");
+        if($total_posts_pages_processed > 0){
+            $fr = array('[a]','[/a]');
+            $to = array('<a href="#revert-links">','</a>');
+            echo str_replace($fr, $to, sprintf(__('Some links (%s) were converted to absolute. You can [a]return them to their original values[/a]', 'sitepress'),$total_posts_pages_processed));
+        }
+    ?>
+    <?php endif; ?>
+    </div>
+    
+    <br /> 
+    <p><input id="icl_<?php if($sitepress_settings['modules']['absolute-links']['enabled']): ?>disable<?php else:?>enable<?php endif?>_absolute_links" type="button" class="button-primary" value="<?php echo $sitepress_settings['modules']['absolute-links']['enabled'] ? __('Disable Sticky links','sitepress') : __('Enable Sticky links','sitepress') ?>" /></p>
+    <span id="icl_toggle_ct_confirm_message" style="display:none"><?php echo __('Are you sure you want to disable Sticky links?','sitepress'); ?></span>
+    <span id="icl_overview_url" style="display:none"><?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/overview.php'; ?></span>
+    <br /> 
+    
+    <?php do_action('icl_menu_footer'); ?>
+    
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/affiliate-info.php b/wp-content/plugins/sitepress-multilingual-cms/menu/affiliate-info.php
new file mode 100644
index 0000000..9094a5c
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/affiliate-info.php
@@ -0,0 +1,58 @@
+<?php        
+    require_once ICL_PLUGIN_PATH . '/inc/plugins-texts-functions.php';     
+    if(defined('ICL_AFFILIATE_ID')){
+        $icl_affiliate_id = ICL_AFFILIATE_ID;
+    }else{
+        $icl_affiliate_id = '';
+    }
+    if(defined('ICL_AFFILIATE_KEY')){
+        $icl_affiliate_key = ICL_AFFILIATE_KEY;
+    }else{
+        $icl_affiliate_key = '';
+    }    
+?>
+<?php $sitepress->noscript_notice() ?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv"><br /></div>
+    <h2><?php echo __('Affiliate information check', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    
+    <form id="icl_affiliate_info_check" method="post" action="">
+    
+    <h3><?php _e('Affiliate test') ?></h3>
+    <table class="widefat">
+        <tr>
+            <td align="right"><?php _e('Affiliate ID', 'sitepress') ?></td>
+            <td>
+                <input type="text" name="icl_affiliate_id" readonly="readonly" value="<?php echo $icl_affiliate_id ?>" />
+                <?php if(!$icl_affiliate_id): ?>
+                <p class="icl_error_text"><?php _e('Affiliate ID not defined in the theme','sitepress') ?></p>
+                <?php endif; ?>
+            </td>
+        </tr>
+        <tr>
+            <td align="right"><?php _e('Affiliate Key', 'sitepress') ?></td>
+            <td>
+                <input type="text" name="icl_affiliate_key" readonly="readonly" value="<?php echo $icl_affiliate_key ?>" size="38" />
+                <?php if(!$icl_affiliate_key): ?>
+                <p class="icl_error_text"><?php _e('Affiliate KEY not defined in the theme','sitepress') ?></p>
+                <?php endif; ?>                
+            </td>
+        </tr>
+        <tr>
+            <td align="right" colspan="2">
+                <span class="icl_cyan_box icl_valid_text" 
+                    style="padding:3px;display:none;"><?php _e('Congratulations! Your affiliate information is correct.','sitepress') ?></span>
+                <span class="icl_cyan_box icl_error_text" 
+                    style="padding:3px;display:none;"><?php _e('Sorry, the affiliate information did not validate.','sitepress') ?></span>
+                <input type="submit" value="<?php _e('Test', 'sitepress')?>" <?php 
+                    if(!$icl_affiliate_id || !$icl_affiliate_key) echo 'disabled="disabled"'; ?> />
+            </td>
+        </tr>
+    </table>
+    
+    </form>
+     
+    <?php do_action('icl_menu_footer'); ?>       
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/basic_advanced_switch.php b/wp-content/plugins/sitepress-multilingual-cms/menu/basic_advanced_switch.php
new file mode 100644
index 0000000..01341ff
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/basic_advanced_switch.php
@@ -0,0 +1,14 @@
+    <div class="icl_advanced_switch">        
+        <?php if($sitepress_settings['basic_menu']): ?>
+        <span><?php printf(__('Using WordPress as CMS? Try WPML\'s <span title="%s" %s>advanced features</span>.','sitepress'),__('Theme localization, translation synchronization, comments translation, CMS navigation, Sticky links','sitepress'), 'style="border-bottom: 1pt dotted #707070;"') ?> <a class="button icl_golden_button" href="admin.php?page=<?php echo $_GET['page'] ?>&amp;icl_action=advanced&amp;nonce=<?php echo wp_create_nonce('icl_enable_advanced_mode') ?>" title="<?php _e("Switch to advanced setup mode", 'sitepress') ?>"><?php _e('Go Advanced', 'sitepress')?></a></span>
+        <?php else: ?>
+        <?php 
+            if($_GET['page']==basename(ICL_PLUGIN_PATH).'/menu/content-translation.php'){
+                $_bgotopage = $_GET['page'];
+            }else{
+                $_bgotopage = basename(ICL_PLUGIN_PATH).'/menu/languages.php';
+            }
+        ?>
+        <span>&nbsp;<a class="button" href="admin.php?page=<?php echo $_bgotopage ?>&amp;icl_action=basic&amp;nonce=<?php echo wp_create_nonce('icl_enable_basic_mode') ?>" title="<?php _e("Switch to basic setup mode", 'sitepress') ?>"><?php _e('Back to Basic mode', 'sitepress')?></a></span>
+        <?php endif; ?>
+    </div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/category-menu.php b/wp-content/plugins/sitepress-multilingual-cms/menu/category-menu.php
new file mode 100644
index 0000000..4367a16
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/category-menu.php
@@ -0,0 +1,42 @@
+<?php $this->noscript_notice() ?>
+
+<?php
+    if ($referer = $_SERVER['HTTP_REFERER']) {
+        if (false !== strpos($referer, 'action=edit')) {
+            // we have come from another edit page and we don't want to
+            // return there after the "Update"
+            $ref = "categories.php";
+            echo '<input type="hidden" name="_wp_original_http_referer" value="' . attribute_escape( stripslashes( $ref ) ) . '" />';
+        }
+    }
+?>
+
+<?php
+    global $sitepress;
+    $sitepress->add_language_selector_to_page($active_languages,
+                                              $selected_language,
+                                              $translations,
+                                              $element_id,
+                                              'tax_category');
+    $sitepress->add_translation_of_selector_to_page($trid,
+                                                 $selected_language,
+                                                 $default_language,
+                                                 $source_language,
+                                                 $untranslated_ids,
+                                                 $element_id,
+                                                 'tax_category');
+    $sitepress->add_translate_options($trid,
+                                   $active_languages,
+                                   $selected_language,
+                                   $translations,
+                                   'tax_category');
+
+?>
+
+
+
+</div>
+</div>
+</div>
+</div>
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/comments-translation.php b/wp-content/plugins/sitepress-multilingual-cms/menu/comments-translation.php
new file mode 100644
index 0000000..ff8062f
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/comments-translation.php
@@ -0,0 +1,62 @@
+<?php     
+require_once ICL_PLUGIN_PATH . '/sitepress.php'; 
+$active_languages = $sitepress->get_active_languages();            
+$languages = $sitepress->get_languages();            
+global $userdata, $current_user;
+$users = get_editable_authors($userdata->ID);
+if($user_language = get_usermeta($current_user->data->ID,'icl_admin_language',true)){
+    $lang_details = $sitepress->get_language_details($user_language);
+    $user_language = $lang_details['display_name'];
+}else{
+    $user_language = __('the default language','sitepress');
+}
+?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32" style="background: transparent url(<?php echo ICL_PLUGIN_URL ?>/res/img/icon<?php if(!$sitepress_settings['basic_menu']) echo '_adv'?>.png) no-repeat"><br /></div>
+    <h2><?php echo __('Setup WPML', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    
+    <h3><?php echo __('Comments translation', 'sitepress') ?></h3>    
+    <br />
+    <p><?php _e('Visitor comments can be translated to and from each userâ??s language. Different users can choose their language preferences in their profile pages.','sitepress') ?></p>
+    <p><?php printf(__('Your current admin language is %s. You can change it in your <a href="%s">profile page</a>.','sitepress'),$user_language, 'profile.php#wpml'); ?></p>
+    <?php if(!$sitepress->icl_account_configured() || !$sitepress->get_icl_translation_enabled()): ?>
+    <br />
+    <?php printf(__('To translate your replies, you need to enable <a href="%s">professional translation</a>.','sitepress'),'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/content-translation.php')?>
+    <?php endif; ?>
+    
+    <form name="icl_ct_user_pref" id="icl_ct_user_pref" method="post" action="">
+    <input type="hidden" name="icl_ajx_action" value="save_ct_user_pref" />    
+    <table id="iclt_user_comments_settings" class="widefat" cellpadding="0" cellspacing="0" style="width:50%;margin:10px 0 10px 0;">
+        <thead>
+            <tr>
+                <th scope="col"><?php _e('User login', 'sitepress') ?></th>
+                <th scope="col" nowrap="nowrap"><?php _e('Translate comments by visitors', 'sitepress') ?></th>
+                <th scope="col" nowrap="nowrap"><?php _e('Translate replies', 'sitepress') ?></th>                    
+            </tr>
+        </thead>
+        <tbody>
+            <?php foreach((array)$users as $u): 
+                $enable_comments_translation = get_usermeta($u->ID,'icl_enable_comments_translation',true);
+                $enable_replies_translation = get_usermeta($u->ID,'icl_enable_replies_translation',true);
+            ?>
+            <tr>
+            <td><a href="user-edit.php?user_id=<?php echo $u->ID?>"><?php echo $u->user_login ?></a></td>
+            <td width="5%" align="center"><input type="checkbox" name="icl_enable_comments_translation[<?php echo $u->ID ?>]" value="1" 
+                <?php if($enable_comments_translation): ?>checked="checked"<?php endif?> /></td>
+            <td width="5%" align="center"><input type="checkbox" name="icl_enable_replies_translation[<?php echo $u->ID ?>]" value="1" 
+                <?php if($enable_replies_translation && $sitepress->icl_account_configured() && $sitepress->get_icl_translation_enabled()): ?>checked="checked"<?php endif?> <?php if(!$sitepress->icl_account_configured() || !$sitepress->get_icl_translation_enabled()) echo 'disabled="disabled"' ?> /></td>
+            </tr>                                                                       
+            <?php endforeach; ?>
+        </tbody>
+    </table>       
+    <p>
+        <input type="submit" class="button secondary" value="<?php _e('Save', 'sitepress'); ?>"/>
+        <span class="icl_ajx_response" id="icl_ajx_response"></span>
+    </p>
+    </form>  
+    
+    
+    <?php do_action('icl_menu_footer'); ?>
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/compatibility-packages.php b/wp-content/plugins/sitepress-multilingual-cms/menu/compatibility-packages.php
new file mode 100644
index 0000000..ddb8656
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/compatibility-packages.php
@@ -0,0 +1,96 @@
+<?php 
+$icl_enabled_packages = $WPML_Packages->get_enabled_packages();
+?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32" style="background: transparent url(<?php echo ICL_PLUGIN_URL ?>/res/img/icon<?php if(!$sitepress_settings['basic_menu']) echo '_adv'?>.png) no-repeat"><br /></div>
+    <h2><?php echo __('Setup WPML', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    
+    <h3><?php echo __('Compatibility packages', 'sitepress') ?></h3>    
+    <?php foreach($WPML_Packages->get_packages() as $package_type => $packages): ?>
+    <h4><?php echo ucfirst($package_type) ?></h4>
+    
+    <form action="" method="post">
+        <?php if(isset($_POST['icl_packages'][$package_type])): ?>
+        <div class="icl_form_success">
+        <?php _e('Packages list updated', 'sitepress'); ?>
+        </div>
+        <?php endif; ?>        
+        
+        <?php if(!empty($packages)): ?>
+        <table id="icl_packages_<?php echo $package_type ?>" class="widefat">
+            <thead>
+                <tr>
+                    <th class="manage-column column-cb check-column" scope="col">&nbsp;</th>
+                    <th><?php _e('Package name', 'sitepress') ?></th>
+                    <th><?php _e('Version', 'sitepress') ?></th>
+                    <th><?php _e('Description', 'sitepress') ?></th>
+                    <?php if($package_type=='themes'):?>
+                    <th><?php _e('Used for theme', 'sitepress') ?></th>
+                    <?php endif; ?>
+                    <?php if($package_type=='plugins'):?>
+                    <th><?php _e('Used for plugin', 'sitepress') ?></th>
+                    <?php endif; ?>                
+                    <th><?php _e('Author', 'sitepress') ?></th>
+                </tr>
+            </thead>
+            <tbody>
+                <?php $incr = 0; ?>
+                <?php foreach($packages as $package_id => $package):?>
+                <?php 
+                    $incr++;
+                    if($icl_enabled_packages[$package_type][$package_id]){
+                        $checked = ' checked="checked"';
+                    }else{
+                        $checked = '';
+                    }
+                ?>
+                <tr <?php if($incr%2==0): ?>class="alternate"<?php endif?>>
+                    <td>
+                        <input type="hidden" name="icl_packages[<?php echo $package_type ?>][<?php echo $package_id ?>]" value="0" />
+                        <input type="checkbox" name="icl_packages[<?php echo $package_type ?>][<?php echo $package_id ?>]" value="1"<?php echo $checked; ?> />
+                    </td>
+                    <td><?php if($package['URI']) echo '<a href="'.$package['URI'].'">'; echo $package['Name']; if($package['URI']) echo '</a>';?></td>
+                    <td><?php echo $package['Version'];?></td>
+                    <td><?php echo $package['Description'];?></td>
+                    <?php if($package_type=='themes'):?>
+                    <td><?php echo $package['Theme']; if($package['ThemeVersion']) echo ' ('.$package['ThemeVersion'].')'; ?></td>
+                    <?php endif; ?>
+                    <?php if($package_type=='plugins'):?>
+                    <td><?php echo $package['Plugin']; if($package['PluginVersion']) echo ' ('.$package['PluginVersion'].')'; ?></td>
+                    <?php endif; ?>
+                    <td><?php if($package['AuthorURI']) echo '<a href="'.$package['AuthorURI'].'">'; echo $package['Author']; if($package['AuthorURI']) echo '</a>';?></td>                                    
+                </tr>
+                <?php endforeach; ?>            
+            </tbody>
+            <tfoot>
+                <tr>
+                    <th class="manage-column column-cb check-column" scope="col">&nbsp;</th>
+                    <th><?php _e('Package name', 'sitepress') ?></th>
+                    <th><?php _e('Version', 'sitepress') ?></th>
+                    <th><?php _e('Description', 'sitepress') ?></th>
+                    <?php if($package_type=='themes'):?>
+                    <th><?php _e('Used for theme', 'sitepress') ?></th>
+                    <?php endif; ?>
+                    <?php if($package_type=='plugins'):?>
+                    <th><?php _e('Used for plugin', 'sitepress') ?></th>
+                    <?php endif; ?>                
+
+                    <th><?php _e('Author', 'sitepress') ?></th>
+                </tr>
+            </tfoot>        
+        </table>
+        <?php else: ?>
+            <div style="text-align:center"><?php _e('No packages found', 'sitepress'); ?></div>  
+        <?php endif; ?>
+        
+        <?php if(!empty($packages)): ?>
+        <p class="submit alignright"><input type="submit" value="<?php _e('Update', 'sitepress'); ?>" /></p>
+        <br clear="all" />
+        <?php endif; ?>
+    </form>
+    
+    <?php endforeach; ?>
+    
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-how-it-works.php b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-how-it-works.php
new file mode 100644
index 0000000..0281a95
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-how-it-works.php
@@ -0,0 +1,56 @@
+<?php $sitepress->noscript_notice() ?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32<?php if(!$sitepress_settings['basic_menu']) echo ' icon32_adv'?>"><br /></div>    
+    
+    <h2><?php _e('Professional Translation - How it works', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>    
+    
+    <img src="<?php echo ICL_PLUGIN_URL?>/res/img/web_logo_large.png" style="float: right; border: 1pt solid #C0C0C0; margin: 16px 10px 10px 10px;" alt="ICanLocalize" />   
+        
+    <p style="line-height:1.5"><?php echo __('<a href="http://www.icanlocalize.com";>ICanLocalize</a> can provide professional translation for your site\'s contents.', 'sitepress'); ?></p>
+
+    <h3><?php echo __('Your job:', 'sitepress'); ?></h3>
+    
+    
+    <?php
+        $steps = array(
+            __('You select the content you want translated from the dashboard', 'sitepress'),
+            __('Select the language you want it translated to', 'sitepress'),
+        );
+    ?>
+    
+    <ul>
+        <?php foreach($steps as $number => $item): ?>
+            <li><?php echo $number + 1 . '. ' . $item;?></li>
+        <?php endforeach;?>
+    </ul>
+    
+    <p>That's it - the rest happens automatically</p>
+    <h3><?php echo __('How it works after that:', 'sitepress'); ?></h3>
+    
+    
+    <?php
+        $steps = array(
+            __('The content you choose is sent to the ICanLocalize server', 'sitepress'),
+            __('The translator chosen by you to do the work is automatically notified that there is something requiring translation', 'sitepress'),
+            __('The translator downloads the content from the ICanLocalize server', 'sitepress'),
+            __('The translator translates the content using a custom built editor', 'sitepress'),
+            __('When the translation is ready the translator uploads to the ICanLocalize server', 'sitepress'),
+            __('The ICanLocalize server sends the translation content to your site via XML-RPC', 'sitepress'),
+            __('The WPML plugin publishes the content creating menus and automatically fixing links to translated content.', 'sitepress'),
+        );
+    ?>
+    
+    <ul>
+        <?php foreach($steps as $number => $item): ?>
+            <li><?php echo $number + 1 . '. ' . $item;?></li>
+        <?php endforeach;?>
+    </ul>
+    
+
+    <h3><?php echo __('What happens if you edit the original?', 'sitepress'); ?></h3>
+    
+    <?php do_action('icl_menu_footer'); ?>
+    
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-icl-account-wizard.php b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-icl-account-wizard.php
new file mode 100644
index 0000000..5fe2fdb
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-icl-account-wizard.php
@@ -0,0 +1,217 @@
+<?php
+
+class ICL_account_wizard {
+
+
+	function __construct() {
+        }
+        
+        function use_existing_support_account() { 
+            global $sitepress;
+        ?>
+            <form class="icl_account_form" id="icl_use_account" method="post" action="admin.php?page=<?php echo ICL_PLUGIN_FOLDER  ?>/menu/content-translation.php#icl_create_account_form" <?php if(!$sitepress->icl_support_configured()): ?>style="display:none"<?php endif; ?>>
+            <?php wp_nonce_field('icl_use_account', 'icl_use_account_nonce') ?>
+			
+            <p style="line-height:1.5"><?php _e('Choose this option if you want to pay for translation work through your existing account.', 'sitepress'); ?></p>
+			
+            <p class="submit">                                        
+                <div style="text-align:right">
+                    <?php //Hidden button for catching "Enter" key ?>                                            
+                    <input id="icl_content_trans_setup_finish_enter" class="button-primary" name="icl_content_trans_setup_finish_enter" value="<?php echo __('Add project to my account and finish', 'sitepress') ?>" type="submit" style="display:none"/>
+
+                    <input class="button" name="icl_content_trans_setup_cancel" value="<?php echo __('Cancel', 'sitepress') ?>" type="button" />
+                    <input id="icl_content_trans_setup_back_2" class="button-primary" name="icl_content_trans_setup_back_2" value="<?php echo __('Back', 'sitepress') ?>" type="submit" />
+                    <input id="icl_content_trans_setup_finish" class="button-primary" name="icl_content_trans_setup_finish" value="<?php echo __('Use existing account and Finish', 'sitepress') ?>" type="submit" />
+                </div>
+            </p>
+            </form>
+            <?php
+        }
+        
+        
+        function create_account($transfer_after_create) {
+            global $sitepress;
+        
+        ?>
+        
+            <?php if(!$sitepress->icl_account_configured()): ?>        
+				<form class="icl_account_form" id="icl_create_account" method="post" action="admin.php?page=<?php echo ICL_PLUGIN_FOLDER  ?>/menu/content-translation.php#icl_create_account_form" <?php if($sitepress->icl_support_configured()): ?>style="display:none"<?php endif; ?>>
+				<?php
+					if ($transfer_after_create) {
+						wp_nonce_field('icl_create_account_and_transfer', 'icl_create_account_and_transfer_nonce');
+						?>
+						<p style="line-height:1.5"><?php _e('Choose this option to create a new account, which would be responsible for paying for translation work.', 'sitepress'); ?></p>
+						<?php
+					} else {
+						wp_nonce_field('icl_create_account', 'icl_create_account_nonce');
+						?>
+						<p style="line-height:1.5"><?php _e('Creating an account in ICanLocalize is free. You will only need to pay when sending posts and pages for translation.', 'sitepress'); ?></p>
+						<?php
+					}
+				?>
+			<?php else: ?>
+	            <div class="icl_account_form" id="icl_create_account" <?php if($_POST['icl_transfer'] == '3'): ?>style="display:none"<?php endif;?>>
+				<p style="line-height:1.5"><?php _e('Choose this option to create a new account, which would be responsible for paying for translation work.', 'sitepress'); ?></p>
+			<?php endif; ?>
+
+            
+            <table class="form-table icl-account-setup">
+                <tbody>
+                <tr class="form-field">
+                    <th scope="row"><?php echo __('First name', 'sitepress')?></th>
+                    <td><input name="user[fname]" type="text" value="<?php echo $_POST['user']['fname']?$_POST['user']['fname']:$current_user->first_name ?>" /></td>
+                </tr>
+                <tr class="form-field">
+                    <th scope="row"><?php echo __('Last name', 'sitepress')?></th>
+                    <td><input name="user[lname]" type="text" value="<?php echo  $_POST['user']['lname']?$_POST['user']['lname']:$current_user->last_name ?>" /></td>
+                </tr>        
+                <tr class="form-field">
+                    <th scope="row"><?php echo __('Email', 'sitepress')?></th>
+                    <td><input name="user[email]" type="text" value="<?php echo  $_POST['user']['email']?$_POST['user']['email']:$current_user->data->user_email ?>" /></td>
+                </tr>
+                </tbody>
+            </table>
+            <?php if(!$sitepress->icl_account_configured()): ?>        
+                <p class="submit">                                        
+                    <div style="text-align:right">
+                        <?php //Hidden button for catching "Enter" key ?>                                            
+                        <input id="icl_content_trans_setup_finish_enter" class="button-primary" name="icl_content_trans_setup_finish_enter" value="<?php echo __('Add project to my account and finish', 'sitepress') ?>" type="submit" style="display:none"/>
+
+                        <input class="button" name="icl_content_trans_setup_cancel" value="<?php echo __('Cancel', 'sitepress') ?>" type="button" />
+                        <input id="icl_content_trans_setup_back_2" class="button-primary" name="icl_content_trans_setup_back_2" value="<?php echo __('Back', 'sitepress') ?>" type="submit" />
+                        <input id="icl_content_trans_setup_finish" class="button-primary" name="icl_content_trans_setup_finish" value="<?php echo __('Create account and Finish', 'sitepress') ?>" type="submit" />
+                    </div>
+                </p>
+                <div class="icl_progress"><?php _e('Saving. Please wait...', 'sitepress'); ?></div>
+	            </form>
+			<?php else: ?>
+	            </div>
+			<?php endif; ?>
+        <?php                                
+        }
+        
+        function configure_account() {
+        
+            ?>
+            <form class="icl_account_form" id="icl_configure_account" action="admin.php?page=<?php echo ICL_PLUGIN_FOLDER  ?>/menu/content-translation.php#icl_create_account_form" method="post" style="display:none">
+            <?php wp_nonce_field('icl_configure_account','icl_configure_account_nonce') ?>    
+            <table class="form-table icl-account-setup">
+                <tbody>
+                <tr class="form-field">
+                    <th scope="row"><?php echo __('Email', 'sitepress')?></th>
+                    <td><input name="user[email]" type="text" value="<?php echo  $_POST['user']['email']?$_POST['user']['email']:$current_user->data->user_email ?>" /></td>
+                </tr>
+                <tr class="form-field">
+                    <th scope="row"><?php echo __('Password', 'sitepress')?></th>
+                    <td><input name="user[password]" type="password" /></td>
+                </tr>        
+                </tbody>
+            </table>
+            <?php if(!$sitepress_settings['content_translation_setup_complete']): ?>        
+                <p class="submit">                                        
+                    <div style="text-align:right">
+                        <?php //Hidden button for catching "Enter" key ?>
+                        <input id="icl_content_trans_setup_finish_enter" class="button-primary" name="icl_content_trans_setup_finish_enter" value="<?php echo __('Add project to my account and finish', 'sitepress') ?>" type="submit" style="display:none"/>
+                        
+                        <input class="button" name="icl_content_trans_setup_cancel" value="<?php echo __('Cancel', 'sitepress') ?>" type="button" />
+                        <input id="icl_content_trans_setup_back_2" class="button-primary" name="icl_content_trans_setup_back_2" value="<?php echo __('Back', 'sitepress') ?>" type="submit" />
+                        <input id="icl_content_trans_setup_finish" class="button-primary" name="icl_content_trans_setup_finish" value="<?php echo __('Add project to my account and finish', 'sitepress') ?>" type="submit" />
+                    </div>
+                </p>
+                <div class="icl_progress"><?php _e('Saving. Please wait...', 'sitepress'); ?></div>                                        
+            <?php else: ?>
+                <p class="submit">                                        
+                    <input type="hidden" name="create_account" value="0" />                                        
+                    <input class="button" name="configure account" value="<?php echo __('Add this project to my account', 'sitepress') ?>" type="submit" 
+                        <?php if($icl_account_ready_errors):  ?>disabled="disabled"<?php endif; ?> />
+                    <a href="javascript:;" onclick="jQuery('#icl_configure_account').hide();jQuery('#icl_create_account').fadeIn();"><?php echo __('Create a new ICanLocalize account', 'sitepress') ?></a>                                        
+                </p>                                    
+                <div class="icl_progress"><?php _e('Saving. Please wait...', 'sitepress'); ?></div>
+            <?php endif; ?>
+            </form>    
+        <?php                                
+        }
+  
+        function transfer_to_account() {
+			global $sitepress;
+        
+            ?>
+            <?php if(!$sitepress->icl_account_configured()): ?>        
+	            <form class="icl_account_form" id="icl_transfer_account" action="admin.php?page=<?php echo ICL_PLUGIN_FOLDER  ?>/menu/content-translation.php#icl_create_account_form" method="post" style="display:none">
+	            <?php wp_nonce_field('icl_transfer_account','icl_transfer_account_nonce') ?>
+			<?php else: ?>
+	            <div class="icl_account_form" id="icl_transfer_account" <?php if($_POST['icl_transfer'] != '3'): ?>style="display:none"<?php endif;?>>
+			<?php endif; ?>
+			
+		    <p style="line-height:1.5"><?php _e('Choose this option to transfer this project to another ICanLocalize account, which will be responsible for paying for translation work.', 'sitepress'); ?></p>
+
+            <table class="form-table icl-account-setup">
+                <tbody>
+                <tr class="form-field">
+                    <th scope="row"><?php echo __('Email', 'sitepress')?></th>
+                    <td><input name="user[email2]" type="text" value="<?php echo  $_POST['user']['email']?$_POST['user']['email']:$current_user->data->user_email ?>" /></td>
+                </tr>
+                <tr class="form-field">
+                    <th scope="row"><?php echo __('Password', 'sitepress')?></th>
+                    <td><input name="user[password]" type="password" /></td>
+                </tr>        
+                </tbody>
+            </table>
+            <?php if(!$sitepress->icl_account_configured()): ?>        
+                <p class="submit">                                        
+                    <div style="text-align:right">
+                        <?php //Hidden button for catching "Enter" key ?>
+                        <input id="icl_content_trans_setup_finish_enter" class="button-primary" name="icl_content_trans_setup_finish_enter" value="<?php echo __('Add project to my account and finish', 'sitepress') ?>" type="submit" style="display:none"/>
+                        
+                        <input class="button" name="icl_content_trans_setup_cancel" value="<?php echo __('Cancel', 'sitepress') ?>" type="button" />
+                        <input id="icl_content_trans_setup_back_2" class="button-primary" name="icl_content_trans_setup_back_2" value="<?php echo __('Back', 'sitepress') ?>" type="submit" />
+                        <input id="icl_content_trans_setup_finish" class="button-primary" name="icl_content_trans_setup_finish" value="<?php echo __('Add project to user\'s account and finish', 'sitepress') ?>" type="submit" />
+                    </div>
+                </p>
+                <div class="icl_progress"><?php _e('Saving. Please wait...', 'sitepress'); ?></div>                                        
+	            </form>
+			<?php else: ?>
+	            </div>
+			<?php endif; ?>
+        <?php                                
+        }
+  
+        function on_click($item) {
+            switch($item) {
+                case 0:
+                    return "jQuery('#icl_use_account').fadeIn();
+                            jQuery('#icl_create_account').hide();
+                            jQuery('#icl_configure_account').hide();
+                            jQuery('#icl_transfer_account').hide();
+                            jQuery('#icl_new').attr('checked', '');
+                            jQuery('#icl_add').attr('checked', '');
+                            jQuery('#icl_transfer').attr('checked', '');";
+                case 1:
+                    return "jQuery('#icl_use_account').hide();
+                            jQuery('#icl_create_account').fadeIn();
+                            jQuery('#icl_configure_account').hide();
+                            jQuery('#icl_transfer_account').hide();
+                            jQuery('#icl_existing').attr('checked', '');
+                            jQuery('#icl_add').attr('checked', '');
+                            jQuery('#icl_transfer').attr('checked', '');";
+                case 2:
+                    return "jQuery('#icl_use_account').hide();
+                            jQuery('#icl_create_account').hide();
+                            jQuery('#icl_configure_account').fadeIn();
+                            jQuery('#icl_transfer_account').hide();
+                            jQuery('#icl_existing').attr('checked', '');
+                            jQuery('#icl_new').attr('checked', '');
+                            jQuery('#icl_transfer').attr('checked', '');";
+                case 3:
+                    return "jQuery('#icl_use_account').hide();
+                            jQuery('#icl_create_account').hide();
+                            jQuery('#icl_configure_account').hide();
+                            jQuery('#icl_transfer_account').fadeIn();
+                            jQuery('#icl_existing').attr('checked', '');
+                            jQuery('#icl_new').attr('checked', '');
+                            jQuery('#icl_add').attr('checked', '');";
+            }
+        }
+}
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-icl-account.php b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-icl-account.php
new file mode 100644
index 0000000..b2fd3c7
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-icl-account.php
@@ -0,0 +1,151 @@
+<?php
+
+require_once ICL_PLUGIN_PATH . '/menu/content-translation-icl-account-wizard.php';
+
+$wizard = new ICL_account_wizard();
+
+?>
+
+        <?php if($sitepress->icl_account_configured()): /* run wizard */?>        
+            <?php if(isset($_POST['icl_form_errors'])):  ?>
+            <div class="icl_form_errors">
+                <?php echo $_POST['icl_form_errors'] ?>
+            </div>
+            <br />
+            <?php endif; ?>
+        <?php endif; ?>
+
+            <table class="widefat">
+                <thead>
+                    <tr>
+                        <th><?php _e('ICanlocalize account setup', 'sitepress') ?></th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr>
+                        <td>
+                              
+                            <?php if(!$sitepress->icl_account_configured()): ?>
+                            
+                                <h3 id="icl_create_account_form"><?php echo __('Translation jobs go through an account at ICanLocalize.', 'sitepress') ?></h3>             
+
+                                <?php if(isset($_POST['icl_form_errors']) || ($icl_account_ready_errors && !$sitepress->icl_account_configured() )):  ?>
+                                <div class="icl_form_errors">
+                                    <?php echo $_POST['icl_form_errors'] ?>
+                                    <?php if($icl_account_ready_errors):  ?>
+                                    <?php echo __('Before you create an ICanLocalize account you need to fix these:', 'sitepress'); ?>
+                                    <ul>
+                                    <?php foreach($icl_account_ready_errors as $err):?>        
+                                    <li><?php echo $err ?></li>    
+                                    <?php endforeach ?>
+                                    </ul>   
+                                    <?php endif; ?>
+                                </div>
+                                <?php endif; ?>
+                            
+                                <?php if($sitepress->icl_support_configured()): ?>
+                                <p style="line-height:1.5">You already have an ICanLocalize account for technical support. <br />
+                                You can continue using this account, create a new account for translations or transfer this project to another account.</p>
+                                <br />
+                                <ul>
+                                    <li style="list-style: none;">
+                                        <label><input id="icl_existing" type="radio" value="0" onclick="<?php echo $wizard->on_click(0);?>" <?php if($sitepress->icl_support_configured()): ?>checked="checked"<?php endif; ?>/>
+                                            <?php echo sprintf(__('Use my existing ICanLocalize account - <b>%s</b>', 'sitepress'), $sitepress_settings['support_icl_account_email']); ?>
+                                        </label>
+                                        <?php $wizard->use_existing_support_account(); ?>
+                                    </li>
+                                    <?php endif; ?>
+                                    <li style="list-style: none;">
+                                        <label><input id="icl_new" type="radio" value="1" onclick="<?php echo $wizard->on_click(1);?>" <?php if(!$sitepress->icl_support_configured()): ?>checked="checked"<?php endif;?> />
+                                            <?php echo __('Create a new account in ICanLocalize', 'sitepress'); ?>
+                                        </label>
+                                        <?php $wizard->create_account($sitepress->icl_support_configured()); ?>
+                                    </li>
+                                    <?php if(!$sitepress->icl_support_configured()): ?>
+                                    <li style="list-style: none;">
+                                        <label><input id="icl_add" type="radio" value="2" onclick="<?php echo $wizard->on_click(2);?>" />
+                                            <?php echo __('Add to an existing account at ICanLocalize', 'sitepress'); ?>
+                                        </label>
+                                            
+                                        <?php $wizard->configure_account(); ?>
+                                    </li>
+                                    <?php endif; ?>
+                                    <?php if($sitepress->icl_support_configured()): ?>
+                                    <li style="list-style: none;">
+                                        <label><input id="icl_transfer" type="radio" value="3" onclick="<?php echo $wizard->on_click(3);?>" />
+                                            <?php echo __('Transfer to an existing account at ICanLocalize', 'sitepress'); ?>
+                                        </label>
+                                            
+                                        <?php $wizard->transfer_to_account(); ?>
+                                    </li>
+                                    <?php endif; ?>
+                                </ul>
+                                    
+                                
+                            <?php else: // if account configured ?>   
+
+                                <form id="icl_transfer_this_account" method="post" action="admin.php?page=<?php echo ICL_PLUGIN_FOLDER  ?>/menu/content-translation.php#icl_create_account_form" <?php if($_POST['icl_acct_option2']):?>style="display:none"<?php endif?>>
+                                <?php wp_nonce_field('icl_transfer_this_account','icl_transfer_this_accountnonce') ?>    
+                                <p class="submit">                                    
+                                    <?php echo __('You can transfer this site to another ICanLocalize account.', 'sitepress')?>
+                                    <a href="javascript:;" onclick="jQuery('#icl_transfer_this_account').hide();jQuery('#icl_configure_account_transfer').fadeIn();"><?php echo __('Show settings &raquo;', 'sitepress') ?></a>
+                                </p>
+                                </form> 
+                
+                                <form id="icl_configure_account_transfer" action="" style="display:none">
+                                <?php wp_nonce_field('icl_change_website_access_data','icl_change_website_access_data_nonce') ?>
+
+                                <?php echo __('You can transfer this site to another ICanLocalize account.', 'sitepress')?>
+                                <br />
+                                <br />
+                                <ul>
+                                    <li>
+                                        <label><input id="icl_new" name="icl_new" type="radio" value="1" onclick="<?php echo $wizard->on_click(1);?>" checked="checked" />
+                                            <?php echo __('Create a new account in ICanLocalize', 'sitepress'); ?>
+                                        </label>
+                                        <?php $wizard->create_account(true); ?>
+                                    </li>
+                                    <li>
+                                        <label><input id="icl_transfer" name="icl_transfer" type="radio" value="3" onclick="<?php echo $wizard->on_click(3);?>" />
+                                            <?php echo __('Transfer to an existing account at ICanLocalize', 'sitepress'); ?>
+                                        </label>
+                                            
+                                        <?php $wizard->transfer_to_account(); ?>
+                                    </li>
+                                </ul>
+                                    
+                                <div class="icl_form_errors" id="icl_account_errors" style="display:none">
+                                </div>
+                                <div class="icl_form_success" id="icl_account_success" style="display:none">
+                                </div>
+                                    
+                                <p class="submit">                                         
+                                    <input type="hidden" name="create_account" value="0" />
+                                    <input id="icl_save_account_transfer" type="button" class="button-secondary action" value="<?php echo __('Transfer this site', 'sitepress') ?>" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response_account"></span>
+                                    <a href="javascript:;" onclick="jQuery('#icl_configure_account_transfer').hide();jQuery('#icl_transfer_this_account').fadeIn();"><?php echo __('I don\'t want to transfer this site.', 'sitepress') ?></a>
+                                </p>
+                                </form>    
+                
+                                
+                            <?php endif; ?>
+         
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+            
+            <?php if($sitepress->icl_account_configured() ): ?>
+             <p class="alignright">   
+             <input type="button" class="icl_account_setup_toggle button-primary" value="<?php _e('Close', 'sitepress')?>" />   
+             </p>
+             
+            <?php if($sitepress_settings['content_translation_setup_complete']): ?>
+                <p><input id="icl_disable_content_translation" type="button" class="button-secondary" 
+                    value="<?php echo __('Disable professional translation','sitepress') ?>" /></p>
+            <?php endif; ?>        
+
+             <div class="clear"></div>
+                          
+             <?php endif; ?>
+             
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-langs.php b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-langs.php
new file mode 100644
index 0000000..5089ab2
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-langs.php
@@ -0,0 +1,112 @@
+        <?php if(!$sitepress_settings['content_translation_languages_setup']): ?>        
+            <form id="icl_language_pairs_form" method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>">
+            <?php wp_nonce_field('icl_language_pairs_form','icl_language_pairs_formnounce') ?>
+            
+            <?php
+                // see if any languages are selected
+                $selected_count = 0;
+                foreach ($active_languages as $lang) {
+                    if ($sitepress->get_icl_translation_enabled($lang['code'])) {
+                        $selected_count += 1;
+                    }
+                }
+                if ($selected_count == 0) {
+                    $enable_default = true;
+                }
+            ?>
+            <?php endif; ?>
+                
+            
+                                    
+            <table class="widefat">
+                <thead>
+                    <tr>
+                        <th><?php _e('Translation pairs', 'sitepress') ?></th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr>
+                        <td>
+                            <?php if($sitepress_settings['content_translation_languages_setup']): ?>        
+                                <form id="icl_language_pairs_form" name="icl_language_pairs_form" action="">
+                                <?php
+                                    $enable_default = false;
+                                    $lang_to_style = 'float:left;list-style:none;width:100%;';
+                                ?>
+                            <?php else: $lang_to_style = 'float:left;list-style:none;width:30%;';?>
+                            <?php endif; ?>
+
+                                <?php $show_enabled_first = array(true, false) ?>
+                                <?php foreach($show_enabled_first as $show_enabled): ?>
+                                    <?php if($show_enabled): ?>
+                                        <div id="icl_languages_enabled" >
+                                        <ul class="icl_language_pairs">
+                                    <?php else: ?>
+                                        <p style="clear:both;"><a href="#icl-show_disabled_langs"><span><?php _e('Show more translation pairs &raquo;','sitepress') ?></span><span style="display:none;"><?php _e('&laquo; Hide additional languages','sitepress') ?></span></a></p>
+                                        <div id="icl_languages_disabled" style="display:none;">
+                                        <ul class="icl_language_pairs">
+                                    <?php endif; ?>
+                                    <?php 
+                                        if($sitepress_settings['st']['strings_language']){
+                                            $active_languages[$sitepress_settings['st']['strings_language']] = $sitepress->get_language_details($sitepress_settings['st']['strings_language']);
+                                        }
+                                        
+                                    ?>
+                                    <?php foreach($active_languages as $lang): ?>                                                    
+                                        <?php
+                                            $enabled = $sitepress->get_icl_translation_enabled($lang['code']);
+                                            if ($enable_default && $lang['code'] == $default_language){
+                                                $enabled = true;
+                                            }
+                                        ?>
+                                        <?php if(($show_enabled && ($enabled || $lang['code'] == $default_language)) || (!$show_enabled && !($enabled || $lang['code'] == $default_language))): ?>
+                                            <li style="float:left;width:98%;">
+                                                <?php
+                                                    $set_check = $enabled;
+                                                ?>
+                                                <label><input class="icl_tr_from" type="checkbox" name="icl_lng_from_<?php echo $lang['code']?>" id="icl_lng_from_<?php echo $lang['code']?>" <?php if($set_check): ?>checked="checked"<?php endif?> />
+                                                <?php printf(__('Translate from %s to these languages','sitepress'), $lang['display_name']) ?></label>
+                                                <ul id="icl_tr_pair_sub_<?php echo $lang['code'] ?>" <?php if(!$enabled): ?>style="display:none"<?php endif?>>
+                                                <?php foreach($active_languages as $langto): if($lang['code']==$langto['code']) continue; ?>        
+                                                    <?php 
+                                                    if($langto['code'] == $sitepress_settings['st']['strings_language'] 
+                                                        && !in_array($sitepress_settings['st']['strings_language'], array_keys($sitepress->get_active_languages()))) continue;
+                                                    ?>
+                                                    <li style="<?php echo $lang_to_style?>">
+                                                        <label><input class="icl_tr_to" type="checkbox" name="icl_lng_to_<?php echo $lang['code']?>_<?php echo $langto['code']?>" id="icl_lng_from_<?php echo $lang['code']?>_<?php echo $langto['code']?>" <?php if($sitepress->get_icl_translation_enabled($lang['code'],$langto['code'])): ?>checked="checked"<?php endif?> />
+                                                            <?php echo $langto['display_name'] . ' '?>
+                                                            <span class="icl-tr-not-avail-to" id="icl_lng_from_status_<?php echo $lang['code']?>_<?php echo $langto['code']?>">
+                                                                <?php echo $sitepress->get_language_status_text($lang['code'], $langto['code']) ?>
+                                                            </span>
+                                                        </label>
+                                                    </li>    
+                                                <?php endforeach; ?>
+                                                </ul>
+                                            </li>
+                                            
+                                        <?php endif; ?>
+                                    <?php endforeach; ?>
+                                    </ul>
+                                    </div>
+                                <?php endforeach; ?>
+
+                            <?php if($sitepress_settings['content_translation_languages_setup']): ?>        
+                                <input id="icl_save_language_pairs" type="button" class="button-secondary action" value="<?php echo __('Save', 'sitepress') ?>" />
+                                <span class="icl_ajx_response" id="icl_ajx_response"></span>
+                                </form>
+                            <?php endif; ?>
+
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+                         
+        <?php if(!$sitepress_settings['content_translation_languages_setup']): ?>        
+            <br />   
+            <div style="text-align:right">
+                <input class="button" name="icl_content_trans_setup_cancel" value="<?php echo __('Cancel', 'sitepress') ?>" type="button" />
+                <input class="button-primary" name="icl_content_trans_setup_next_1" disabled="disabled" value="<?php echo __('Next', 'sitepress') ?>" type="submit" />
+            </div>
+            </form>
+        <?php endif; ?>
+                            
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-options.php b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-options.php
new file mode 100644
index 0000000..1f63a91
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-options.php
@@ -0,0 +1,120 @@
+        <?php if($sitepress_settings['translator_choice'] === null) {
+            $sitepress_settings['translator_choice'] = 0;
+        }
+        ?>
+
+
+            <table class="widefat">
+                <thead>
+                    <tr>
+                        <th><?php _e('Translation options', 'sitepress') ?></th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr>
+                        <td>
+            
+                            <form name="icl_more_options" id="icl_more_options" action="">
+                            
+                            <div id="icl-content-translation-advanced-options">
+                
+                                    <h3><?php echo __('Translation delivery','sitepress') ?></h3>    
+                                    <ul>
+                                        <li>
+                                            <?php echo __("Select the desired translation delivery mehtod:", 'sitepress') ?><br />
+                                        </li>
+                                        <li>
+                                            <ul>
+                                                <li>
+                                                    <label><input name="icl_delivery_method" type="radio" value="0" 
+                                                        <?php if((int)$sitepress_settings['translation_pickup_method'] == 0): ?>checked="checked"<?php endif;?> /> 
+                                                        <?php echo __('Translations will be posted back to this website via XML-RPC.', 'sitepress'); ?>
+                                                    </label><br />
+                                                </li>                        
+                                                <li>
+                                                    <label><input name="icl_delivery_method" type="radio" value="1" 
+                                                        <?php if($sitepress_settings['translation_pickup_method'] == 1): ?>checked="checked"<?php endif;?> disabled="disabled" /> 
+                                                        <?php echo __('This WordPress installation will poll for translations.', 'sitepress'); ?>
+                                                    </label><br />
+                                                </li>                        
+                                            </ul>
+                                        </li>
+                                        <li>
+                                            <i><?php echo __("Choose polling if your site is inaccessible from the Internet.", 'sitepress') ?></i><br />
+                                        </li>
+                                    </ul>
+                
+                                <h3><?php echo __("Notification preferences:", 'sitepress') ?></h3>
+                                <ul>
+                                    <li>
+                                        <ul>
+                                            <li>
+                                                <label><input name="icl_notify_complete" type="checkbox" value="1" 
+                                                    <?php if($sitepress_settings['notify_complete']): ?>checked="checked"<?php endif;?> /> 
+                                                    <?php echo __('Send an email notification when translations complete.', 'sitepress'); ?>
+                                                </label><br />
+                                            </li>
+                                            <li>
+                                                <label><input name="icl_alert_delay" type="checkbox" value="1" <?php if($sitepress_settings['alert_delay']): ?>checked="checked"<?php endif;?> /> <?php echo __('Send an alert when translations delay for more than 4 days.', 'sitepress'); ?></label><br />
+                                            </li>
+                                        </ul>
+                    
+                                    </li>
+                                    <li>
+                                        <i><?php echo __("ICanLocalize will send email notifications for these events.", 'sitepress') ?></i><br />
+                                    </li>
+                                </ul>
+                                
+                                <h3><?php echo __("Translated document status:", 'sitepress') ?></h3>
+                                <ul>
+                                    <li>
+                                        <ul>
+                                            <li>
+                                                <label><input type="radio" name="icl_translated_document_status" value="0" 
+                                                    <?php if(!$sitepress_settings['translated_document_status']): ?>checked="checked"<?php endif;?> /> 
+                                                    <?php echo __('Draft', 'sitepress') ?>
+                                                </label>
+                                            </li>
+                                            <li>
+                                                <label><input type="radio" name="icl_translated_document_status" value="1" 
+                                                    <?php if($sitepress_settings['translated_document_status']): ?>checked="checked"<?php endif;?> /> 
+                                                    <?php echo __('Same as the original document', 'sitepress') ?>
+                                                </label>
+                                            </li>
+                                        </ul>
+                    
+                                    </li>
+                                    <li>
+                                        <i><?php echo __("Choose if translations should be published when received. Note: If Publish is selected, the translation will only be published if the original node is published when the translation is received.", 'sitepress') ?></i><br />
+                                    </li>
+                                </ul>
+                
+                                <h3><?php echo __("Remote control translation management:", 'sitepress') ?></h3>
+                                <ul>
+                                    <li>
+                                        <ul>
+                                            <li>
+                                                <label><input name="icl_remote_management" type="checkbox" value="1" 
+                                                    <?php if($sitepress_settings['remote_management']): ?>checked="checked"<?php endif;?> /> 
+                                                    <?php echo __('Enable remote control over the translation management.', 'sitepress'); ?>
+                                                </label><br />
+                                            </li>
+                                        </ul>
+                    
+                                    </li>
+                                    <li>
+                                        <i><?php _e("This feature is intended for blog networks. It allows controlling the translation process remotely via XML-RPC calls without going through the WordPress admin pages.<br />If you are running a single site, you don't need to enable this.", 'sitepress') ?></i><br />
+                                    </li>
+                                </ul>
+                                
+                            </div> <?php // div id="icl-content-translation-advanced-options ?>
+                            
+                                <input id="icl_translation_options_save" class="button" name="create account" value="<?php echo __('Save', 'sitepress') ?>" type="submit" />
+                                <span class="icl_ajx_response" id="icl_ajx_response2"></span>    
+                                <input class="button" type="button" value="<?php _e('Cancel', 'sitepress')?>" onclick="jQuery('#icl_account_setup').slideUp(function(){jQuery('.icl_account_setup_toggle').show();jQuery('#icl_languages_translators_stats').show()});" />
+                                </form>
+                          
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-site-description.php b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-site-description.php
new file mode 100644
index 0000000..79f5cc6
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-site-description.php
@@ -0,0 +1,52 @@
+        <?php if(!$sitepress_settings['content_translation_setup_complete']): /* run wizard */?>        
+            <?php if(isset($_POST['icl_form_errors'])):  ?>
+            <div class="icl_form_errors">
+                <?php echo $_POST['icl_form_errors'] ?>
+            </div>
+            <br />
+            <?php endif; ?>
+        <?php endif; ?>
+
+
+        <?php if(!$sitepress_settings['content_translation_setup_complete']): /* run wizard */?>        
+            <form id="icl_more_options_wizard" method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>">
+            <?php wp_nonce_field('icl_site_description_wizard','icl_site_description_wizardnounce') ?>
+        <?php else: ?>
+            <form id="icl_more_options_wizard" name="icl_more_options_wizard" action="">
+            <?php wp_nonce_field('icl_site_description_wizard','icl_site_description_wizardnounce') ?>
+        <?php endif; ?>
+
+            <table class="widefat">
+                <thead>
+                    <tr>
+                        <th><?php _e('Information about your website', 'sitepress') ?></th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr>
+                        <td>
+                            <h4><?php echo __('Describe your website', 'sitepress') ?></h4>             
+                            <textarea id="icl_site_description" name="icl_description" type="textarea" cols="60" rows="5"><?php echo  $sitepress_settings['icl_site_description'] ?></textarea>
+                            <p>Provide a short description of the website so that translators know what background is required from them.</p>
+
+                            <?php if($sitepress_settings['content_translation_setup_complete']): ?>
+                                <input id="icl_save_site_description" type="button" class="button-secondary action" value="<?php echo __('Save', 'sitepress') ?>" />
+                                <span class="icl_ajx_response" id="icl_ajx_response_site"></span>
+                            <?php endif; ?>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        <?php if(!$sitepress_settings['content_translation_setup_complete']): ?>
+            <br />
+            <div style="text-align:right">
+                <?php //Hidden button for catching "Enter" key ?>
+                <input id="icl_content_trans_setup_next_2_enter" class="button-primary" name="icl_content_trans_setup_next_2_enter" value="<?php echo __('Next', 'sitepress') ?>" type="submit" style="display:none"/>
+                
+                <input class="button" name="icl_content_trans_setup_cancel" value="<?php echo __('Cancel', 'sitepress') ?>" type="button" />
+                <input id="icl_content_trans_setup_back_2" class="button-primary" name="icl_content_trans_setup_back_2" value="<?php echo __('Back', 'sitepress') ?>" type="submit" />
+                <input id="icl_content_trans_setup_next_2" class="button-primary" name="icl_content_trans_setup_next_2" value="<?php echo __('Next', 'sitepress') ?>" type="submit" />
+            </div>
+        <?php endif; ?>
+        </form>
+ 
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-wizard-steps.php b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-wizard-steps.php
new file mode 100644
index 0000000..2485d70
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation-wizard-steps.php
@@ -0,0 +1,24 @@
+<?php 
+    if(!$sitepress_settings['content_translation_setup_complete']): /* setup wizard */ 
+        if(!$sitepress_settings['content_translation_languages_setup']){
+            $sw_width = 10;
+        }elseif($sitepress_settings['content_translation_setup_wizard_step'] == 2){
+            $sw_width = 45;
+        }else{          
+            $sw_width = 80;
+        }
+        ?>
+        <div id="icl_setup_wizard_wrap">
+            <h3><?php _e('Before you can start using Professional translation, it needs to be set up', 'sitepress') ?></h3>
+            <br style="clear:both;" />
+            <div id="icl_setup_wizard">
+                <div class="icl_setup_wizard_step"><strong><?php _e('1. Translation Languages', 'sitepress')?></strong></div>
+                <div class="icl_setup_wizard_step"><strong><?php _e('2. Description', 'sitepress')?></strong></div>
+                <div class="icl_setup_wizard_step"><strong><?php _e('3. ICanLocalize account setup', 'sitepress')?></strong></div>            
+            </div>        
+            <br clear="all" />
+            <div id="icl_setup_wizard_progress"><div id="icl_setup_wizard_progress_bar" style="width:<?php echo $sw_width ?>%">&nbsp;</div></div>
+        </div>
+        <br />
+<?php endif; /* setup wizard */ ?>
+        
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation.php b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation.php
new file mode 100644
index 0000000..5e230c0
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/content-translation.php
@@ -0,0 +1,97 @@
+<?php     
+    require_once ICL_PLUGIN_PATH . '/sitepress.php';
+
+    if (isset($_GET['icl_refresh_langs']) || $sitepress->are_waiting_for_translators($sitepress->get_default_language())) {
+        $iclsettings = $sitepress->get_settings();
+        $iclsettings['last_get_translator_status_call'] = time();
+        $sitepress->get_icl_translator_status($iclsettings);
+        $sitepress->save_settings($iclsettings);
+    }
+    
+    $active_languages = $sitepress->get_active_languages();
+    $default_language = $sitepress->get_default_language();
+    // put the default language first.
+    foreach ($active_languages as $index => $lang) {
+        if ($lang['code'] == $default_language) {
+            $default_lang_data = $lang;
+            unset($active_languages[$index]);
+            break;
+        }
+    }
+    if (isset($default_lang_data)) {
+        array_unshift($active_languages, $default_lang_data);
+    }
+    
+    
+    $sitepress_settings = $sitepress->get_settings();    
+    $icl_account_ready_errors = $sitepress->icl_account_reqs();
+    
+    $icl_lang_status = $sitepress_settings['icl_lang_status'];    
+?>
+<?php $sitepress->noscript_notice() ?>
+<div class="wrap" id="icl_wrap" style="float:left;width:98%;">
+    <div id="icon-options-general" class="icon32<?php if(!$sitepress_settings['basic_menu']) echo ' icon32_adv'?>"><br /></div>
+    <h2><?php _e('Professional Translation', 'sitepress') ?></h2>    
+
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>     
+
+    <table style="width:100%; border: none;"><tr>
+    <td style="vertical-align:top;">
+        <div id="icl_pro_content">
+
+                    
+        <?php if(isset($_POST['icl_form_success'])):?>
+        <p class="icl_form_success"><?php echo $_POST['icl_form_success'] ?></p>
+        <?php endif; ?>  
+                
+            <h3><?php _e('Translation management', 'sitepress')?></h3>
+            <?php include ICL_PLUGIN_PATH . '/modules/icl-translation/icl-translation-dashboard.php'; ?>
+        
+            
+            <div class="icl_cyan_box">
+                <?php if($sitepress->icl_account_configured() && $sitepress_settings['icl_html_status']): ?>
+                <h3><?php _e('ICanLocalize account status', 'sitepress')?></h3>
+                <?php echo $sitepress_settings['icl_html_status']; ?>
+                <?php else: ?> 
+                <?php printf(__('For help getting started, %scontact ICanLocalize%s', 'sitepress'), 
+                    '<a href="https://www.icanlocalize.com/site/about-us/contact-us/"; target="_blank">', '</a>'); ?>                          
+                <?php endif; ?>
+            </div>         
+            
+            
+
+            <?php if($sitepress->icl_account_configured()): ?>
+            <div class="icl_cyan_box">
+                 <h3><?php _e('Professional translation setup', 'sitepress')?></h3>
+            
+                <input type="button" class="icl_account_setup_toggle button-primary icl_account_setup_toggle_main" value="<?php _e('Configure professional translation', 'sitepress') ?>"/>
+                
+                <div id="icl_account_setup">
+            
+                    <?php if(defined('ICL_DEBUG_DEVELOPMENT') && ICL_DEBUG_DEVELOPMENT): ?>
+                    <a style="float:right;" href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/content-translation.php&amp;debug_action=reset_pro_translation_configuration&amp;nonce=<?php echo wp_create_nonce('reset_pro_translation_configuration')?>" class="button">Reset pro translation configuration</a>
+                    <?php endif; ?>
+                    
+                    <?php if(count($active_languages) > 1): ?>
+                            <?php include ICL_PLUGIN_PATH . '/menu/content-translation-options.php';?>
+                            <br clear="all" />
+                    <?php else:?>                    
+                        <p class='icl_form_errors'><?php echo __('After you configure more languages for your blog, the translation options will show here', 'sitepress'); ?></p>
+                    <?php endif; ?>            
+            
+                </div> <?php // <div id="icl_account_setup"> ?>
+            </div> <?php // <div class="icl_cyan_box"> ?>            
+            <?php endif; ?>
+            
+    </div>    
+
+    </td><td style="vertical-align:top; padding: 21px 0 0 10px;">
+        <?php echo $sitepress->show_pro_sidebar() ?>
+    </td></tr></table>
+    <?php remove_action('icl_menu_footer', array($sitepress, 'menu_footer')) ?>                                                       
+    <?php do_action('icl_extra_options_' . $_GET['page']); ?>        
+                            
+    <?php do_action('icl_menu_footer'); ?>
+
+</div>
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/edit-languages.php b/wp-content/plugins/sitepress-multilingual-cms/menu/edit-languages.php
new file mode 100644
index 0000000..d015b58
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/edit-languages.php
@@ -0,0 +1,486 @@
+<?php
+
+class SitePressEditLanguages {
+
+	var $active_languages;
+	var $upload_dir;
+	var $is_writable = false;
+	var $error = false;
+	var $required_fields = array('code' => '', 'english_name' => '', 'translations' => 'array', 'flag' => '', 'default_locale' => '');
+	var $add_validation_failed = false;
+
+	function __construct() {
+		
+			// Set upload dir
+		$wp_upload_dir = wp_upload_dir();
+		$this->upload_dir = $wp_upload_dir['basedir'] . '/flags';
+		
+		if (!is_dir($this->upload_dir)) {
+			if (!mkdir($this->upload_dir)) {
+				$this->error(__('Upload directory cannot be created. Check your permissions.','sitepress'));
+			}
+		}
+		if (!$this->is_writable = is_writable($this->upload_dir)) {
+			$this->error(__('Upload dir is not writable','sitepress'));
+		}
+		
+		$this->migrate();
+		
+		$this->get_active_languages();
+		
+			// Trigger save.
+		if (isset($_POST['icl_edit_languages_action']) && $_POST['icl_edit_languages_action'] == 'update') {
+			$this->update();
+		}
+		
+		add_action('admin_footer', array(&$this,'scripts'));
+		
+		
+?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv"><br /></div>
+    <h2><?php _e('Edit Languages', 'sitepress') ?></h2>
+	<div id="icl_edit_languages_info">
+<?php
+	_e('This table allows you to edit languages for your site. Each row represents a language.
+<br /><br />
+For each language, you need to enter the following information:
+<ul>
+    <li><strong>Code:</strong> a unique value that identifies the language. Once entered, the language code cannot be changed.</li>
+    <li><strong>Translations:</strong> the way the language name will be displayed in different languages.</li>
+    <li><strong>Flag:</strong> the flag to display next to the language (optional). You can either upload your own flag or use one of WPML\'s built in flag images.</li>
+    <li><strong>Default locale:</strong> This determines the locale value for this language. You should check the name of WordPress localization file to set this correctly.</li>
+</ul>', 'sitepress'); ?>
+
+	</div>
+<?php
+	if ($this->error) {
+		echo '	<div class="icl_error_text" style="margin:10px;">
+    	<p>'.$this->error.'</p>
+	</div>'; 
+	}
+?>
+	<br />
+	<?php $this->edit_table(); ?>
+	<div class="icl_error_text icl_edit_languages_show" style="display: none; margin:10px;"><p><?php _e('Please note: language codes cannot be changed after adding languages. Make sure you enter the correct code.', 'sitepress'); ?></p></div>
+</div>
+<?php
+	}
+
+	function edit_table() {
+?>
+	<form enctype="multipart/form-data" action="" method="post" id="icl_edit_languages_form">
+	<input type="hidden" name="icl_edit_languages_action" value="update" />
+	<input type="hidden" name="icl_edit_languages_ignore_add" id="icl_edit_languages_ignore_add" value="<?php echo ($this->add_validation_failed) ? 'false' : 'true'; ?>" />
+	<table id="icl_edit_languages_table" class="widefat" cellspacing="0">
+            <thead>
+                <tr>
+                    <th><?php _e('Language name', 'sitepress'); ?></th>
+					<th><?php _e('Code', 'sitepress'); ?></th>
+					<th <?php if (!$this->add_validation_failed) echo 'style="display:none;" ';?>class="icl_edit_languages_show"><?php _e('Translation (new)', 'sitepress'); ?></th>
+					<?php foreach ($this->active_languages as $lang) { ?>
+					<th><?php _e('Translation', 'sitepress'); ?> (<?php echo $lang['english_name']; ?>)</th>
+					<?php } ?>
+					<th><?php _e('Flag', 'sitepress'); ?></th>
+					<th><?php _e('Default locale', 'sitepress'); ?></th>
+                </tr>
+            </thead>
+            <tfoot>
+                <tr>
+                    <th><?php _e('Language name', 'sitepress'); ?></th>
+					<th><?php _e('Code', 'sitepress'); ?></th>
+					<th <?php if (!$this->add_validation_failed) echo 'style="display:none;" ';?>class="icl_edit_languages_show"><?php _e('Translation (new)', 'sitepress'); ?></th>
+					<?php foreach ($this->active_languages as $lang) { ?>
+					<th><?php _e('Translation', 'sitepress'); ?> (<?php echo $lang['english_name']; ?>)</th>
+					<?php } ?>
+					<th><?php _e('Flag', 'sitepress'); ?></th>
+					<th><?php _e('Default locale', 'sitepress'); ?></th>
+                </tr>
+            </tfoot>        
+            <tbody>
+<?php
+		foreach ($this->active_languages as $lang) {
+			$this->table_row($lang);
+		}
+		if ($this->add_validation_failed) {
+			$_POST['icl_edit_languages']['add']['id'] = 'add';
+			$new_lang = $_POST['icl_edit_languages']['add'];
+		} else {
+			$new_lang = array('id'=>'add');
+		}
+		$this->table_row($new_lang,true,true);
+?>
+			</tbody>
+	</table>
+	<p class="submit alignleft"><a href="admin.php?page=sitepress-multilingual-cms/menu/languages.php">&laquo;&nbsp;<?php _e('Back to languages', 'sitepress'); ?></a></p>
+
+	<p class="submit alignright">
+		<input type="button" name="icl_edit_languages_add_language_button" id="icl_edit_languages_add_language_button" value="<?php _e('Add Language', 'sitepress'); ?>" class="button-secondary"<?php if ($this->add_validation_failed) { ?> style="display:none;"<?php } ?> />&nbsp;<input type="button" name="icl_edit_languages_cancel_button" id="icl_edit_languages_cancel_button" value="<?php _e('Cancel', 'sitepress'); ?>" class="button-secondary icl_edit_languages_show"<?php if (!$this->add_validation_failed) { ?> style="display:none;"<?php } ?> />&nbsp;<input disabled type="submit" class="button-primary" value="<?php _e('Save', 'sitepress'); ?>" /></p>
+    <br clear="all" />
+	</form>
+    
+    <p>
+        <input class="button-primary" type="button" id="icl_reset_languages" value="<?php _e('Reset languages', 'sitepress'); ?>" />
+        <span class="hidden"><?php _e('WPML will reset all language information to its default values. Any languages that you added or edited will be lost.','sitepress')?></span>
+    </p>
+
+<?php
+	}
+
+	function table_row( $lang, $echo = true, $add = false ){ ?>
+		
+		<tr style="<?php if ($add && !$this->add_validation_failed) echo 'display:none; '; if ($add) echo 'background-color:yellow; '; ?>"<?php if ($add) echo ' class="icl_edit_languages_show"'; ?>>
+					<td><input type="text" name="icl_edit_languages[<?php echo $lang['id']; ?>][english_name]" value="<?php echo $lang['english_name']; ?>" /></td>
+					<td><input type="text" name="icl_edit_languages[<?php echo $lang['id']; ?>][code]" value="<?php echo $lang['code']; ?>" style="width:30px;"<?php if (!$add) { ?> readonly="readonly"<?php } ?> /></td>
+					<td <?php if (!$this->add_validation_failed) echo 'style="display:none;" ';?>class="icl_edit_languages_show"><input type="text" name="icl_edit_languages[<?php echo $lang['id']; ?>][translations][add]" value="<?php echo  $_POST['icl_edit_languages'][$lang['id']]['translations']['add']; ?>" /></td>
+					<?php foreach($this->active_languages as $translation){ 
+						if ($lang['id'] == 'add') {
+							$value = $_POST['icl_edit_languages']['add']['translations'][$translation['code']];
+						} else {
+							$value = $lang['translation'][$translation['id']];
+						}
+					?>
+					<td><input type="text" name="icl_edit_languages[<?php echo $lang['id']; ?>][translations][<?php echo $translation['code']; ?>]" value="<?php echo $value; ?>" /></td>
+					<?php } ?>
+					<td><?php if ($this->is_writable) { ?><input type="hidden" name="MAX_FILE_SIZE" value="100000" /><input name="icl_edit_languages[<?php echo $lang['id']; ?>][flag_file]" class="icl_edit_languages_flag_upload_field file" style="display:none; float:left;" type="file"  size="10" />&nbsp;<?php } ?><input type="text" name="icl_edit_languages[<?php echo $lang['id']; ?>][flag]" value="<?php echo $lang['flag']; ?>" class="icl_edit_languages_flag_enter_field" style="width:60px; float:left;" /><?php if ($this->is_writable) { ?><div style="float:left;"><label><input type="radio" name="icl_edit_languages[<?php echo $lang['id']; ?>][flag_upload]" value="true" class="radio icl_edit_languages_use_upload"<?php if ($lang['from_template']) { ?> checked="checked"<?php } ?> />&nbsp;<?php _e('Upload flag', 'sitepress'); ?></label><br /><label><input type="radio" name="icl_edit_languages[<?php echo $lang['id']; ?>][flag_upload]" value="false" class="radio icl_edit_languages_use_field"<?php if
  (!$lang['from_template']) { ?> checked="checked"<?php } ?> />&nbsp;<?php _e('Use flag from WPML', 'sitepress'); ?></label></div><?php } ?></td>
+					<td><input type="text" name="icl_edit_languages[<?php echo $lang['id']; ?>][default_locale]" value="<?php echo $lang['default_locale']; ?>" style="width:60px;" /></td>
+				</tr>
+<?php
+	}
+
+	function scripts(){
+?>
+		<script type="text/javascript">
+			jQuery(document).ready(function(){
+				jQuery("#icl_edit_languages_add_language_button").click(function(){
+					jQuery(this).fadeOut('fast',function(){jQuery("#icl_edit_languages_table tr:last, .icl_edit_languages_show").show();});
+					jQuery('#icl_edit_languages_ignore_add').val('false');
+				});
+				jQuery("#icl_edit_languages_cancel_button").click(function(){
+					jQuery(this).fadeOut('fast',function(){
+						jQuery("#icl_edit_languages_add_language_button").show();
+						jQuery(".icl_edit_languages_show").hide();
+						jQuery("#icl_edit_languages_table tr:last input").each(function(){
+							jQuery(this).val('');
+						});
+						jQuery('#icl_edit_languages_ignore_add').val('true');
+						jQuery('#icl_edit_languages_form :submit').attr('disabled',true);
+					});
+				});
+				jQuery('.icl_edit_languages_use_upload').click(function(){
+						jQuery(this).parent().parent().parent().children('.icl_edit_languages_flag_enter_field').hide();
+  						jQuery(this).parent().parent().parent().children('.icl_edit_languages_flag_upload_field').show();
+				});
+				jQuery('.icl_edit_languages_use_field').click(function(){
+						jQuery(this).parent().parent().parent().children('.icl_edit_languages_flag_upload_field').hide();
+						jQuery(this).parent().parent().parent().children('.icl_edit_languages_flag_enter_field').show();
+				});
+				jQuery('#icl_edit_languages_form :submit').attr('disabled',true);
+				jQuery('#icl_edit_languages_form input').click(function(){
+					jQuery('#icl_edit_languages_form :submit').attr('disabled',false);
+				});
+			});
+		</script>
+<?php
+	}
+
+	function get_active_languages() {
+		global $sitepress, $wpdb;
+		$this->active_languages = $sitepress->get_active_languages(true);
+		foreach ($this->active_languages as $lang) {
+			foreach ($this->active_languages as $lang_translation) {
+				$this->active_languages[$lang['code']]['translation'][$lang_translation['id']] = $sitepress->get_display_language_name($lang['code'], $lang_translation['code']);
+			}
+			$flag = $sitepress->get_flag($lang['code']);
+			$this->active_languages[$lang['code']]['flag'] = $flag->flag;
+			$this->active_languages[$lang['code']]['from_template'] = $flag->from_template;
+			$this->active_languages[$lang['code']]['default_locale'] = $wpdb->get_var("SELECT default_locale FROM {$wpdb->prefix}icl_languages WHERE code='".$lang['code']."'");
+		}
+	}
+
+	function insert_main_table($code, $english_name, $default_locale, $major = 0, $active = 0) {
+		global $wpdb;
+		return $wpdb->query("INSERT INTO {$wpdb->prefix}icl_languages (code, english_name, default_locale, major, active) VALUES('".$code."', '".$english_name."', '".$default_locale."', ".$major.", ".$active.")");
+	}
+
+	function update_main_table($id, $code, $english_name, $default_locale){
+		global $wpdb;
+		$wpdb->query("UPDATE {$wpdb->prefix}icl_languages SET code='".$code."', english_name='".$english_name."', default_locale='".$default_locale."'  WHERE ID = ".$id);
+	}
+
+	function insert_translation($name, $language_code, $display_language_code) {
+		global $wpdb;
+		return $wpdb->query("INSERT INTO {$wpdb->prefix}icl_languages_translations (name, language_code, display_language_code) VALUES('".$name."', '".$language_code."', '".$display_language_code."')");
+	}
+
+	function update_translation($name, $language_code, $display_language_code) {
+		global $wpdb;
+		$wpdb->query("UPDATE {$wpdb->prefix}icl_languages_translations SET name='".$name."' WHERE language_code = '".$language_code."' AND display_language_code = '".$display_language_code."'");
+	}
+
+	function insert_flag($lang_code, $flag, $from_template) {
+		global $wpdb;
+		return $wpdb->query("INSERT INTO {$wpdb->prefix}icl_flags (lang_code, flag, from_template) VALUES('".$lang_code."', '".$flag."', ".$from_template.")");
+	}
+
+	function update_flag($lang_code, $flag, $from_template) {
+		global $wpdb;
+		$wpdb->query("UPDATE {$wpdb->prefix}icl_flags SET flag='".$flag."',from_template=".$from_template." WHERE lang_code = '".$lang_code."'");
+	}
+
+	function update() {
+			// Basic check.
+		if (!isset($_POST['icl_edit_languages']) || !is_array($_POST['icl_edit_languages'])){
+			$this->error(__('Please, enter valid data.','sitepress'));
+			return;
+		}
+		
+		global $sitepress,$wpdb;
+		
+			// First check if add and validate it.
+		if (isset($_POST['icl_edit_languages']['add']) && $_POST['icl_edit_languages_ignore_add'] == 'false') {
+			if ($this->validate_one('add', $_POST['icl_edit_languages']['add'])) {
+				$this->insert_one($this->sanitize($_POST['icl_edit_languages']['add']));
+			}
+				// Reset flag upload field.
+			$_POST['icl_edit_languages']['add']['flag_upload'] = 'false';
+		}
+		
+		foreach ($_POST['icl_edit_languages'] as $id => $data){
+			
+				// Ignore insert.
+			if ($id == 'add') { continue; }
+			
+				// Validate and sanitize data.
+			if (!$this->validate_one($id, $data)) continue;
+			$data = $this->sanitize($data);
+			
+				// Update main table.
+			$this->update_main_table($id, $data['code'], $data['english_name'], $data['default_locale']);
+			
+				// Update translations table.
+			foreach ($data['translations'] as $translation_code => $translation_value) {
+				
+					// If new (add language) translations are submitted.
+				if ($translation_code == 'add') {
+					if ($this->add_validation_failed || $_POST['icl_edit_languages_ignore_add'] == 'true') {
+						continue;
+					}
+					if (empty($translation_value)) {
+						$translation_value = $data['english_name'];
+					}
+					$translation_code = $_POST['icl_edit_languages']['add']['code'];
+				}
+				
+					// Check if update.
+				if ($wpdb->get_var("SELECT id FROM {$wpdb->prefix}icl_languages_translations WHERE language_code='".$data['code']."' AND display_language_code='".$translation_code."'")) {
+					$this->update_translation($translation_value, $data['code'], $translation_code);
+				} else {
+					if (!$this->insert_translation($translation_value, $data['code'], $translation_code)) {
+						$this->error(sprintf(__('Error adding translation %s for %s.', 'sitepress'), $data['code'], $translation_code));
+					}
+				}
+			}
+			
+				// Handle flag.
+			if ($data['flag_upload'] == 'true' && !empty($_FILES['icl_edit_languages']['name'][$id]['flag_file'])) {
+				if ($filename = $this->upload_flag($id, $data)) {
+					$data['flag'] = $filename;
+					$from_template = 1;
+				} else {
+					$data['flag'] = $data['code'] . '.png';
+					$this->error(__('Error uploading flag file.', 'sitepress'));
+					$from_template = 0;
+				}
+			} else {
+				if (empty($data['flag'])) {
+					$data['flag'] = $data['code'] . '.png';
+					$from_template = 0;
+				} else {
+					$from_template = isset($data['from_template']) ? 1 : 0;
+				}
+			}
+				// Update flag table.
+			$this->update_flag($data['code'], $data['flag'], $from_template);
+				// Reset flag upload field.
+			$_POST['icl_edit_languages'][$id]['flag_upload'] = 'false';
+		}
+			// Refresh cache.
+		$sitepress->icl_language_name_cache->clear();
+		$sitepress->icl_flag_cache->clear();
+		delete_option('_icl_cache');
+		
+			// Unset ADD fields.
+		if (!$this->add_validation_failed) {
+			unset($_POST['icl_edit_languages']['add']);
+		}
+			// Reser active languages.
+		$this->get_active_languages();
+	}
+
+	function insert_one($data) {
+		global $sitepress;
+		
+			// Insert main table.
+		if (!$this->insert_main_table($data['code'], $data['english_name'], $data['default_locale'], 0, 1)) {
+			$this->error(__('Adding language failed.', 'sitepress'));
+			return false;
+		}
+		
+			// Insert translations.
+		$all_languages = $sitepress->get_languages();
+		foreach ($all_languages as $key => $lang) {
+			
+				// If submitted.
+			if (array_key_exists($lang['code'], $data['translations'])) {
+				if (empty($data['translations'][$lang['code']])) {
+					$data['translations'][$lang['code']] = $data['english_name'];
+				}
+				if (!$this->insert_translation($data['translations'][$lang['code']], $data['code'], $lang['code'])) {
+					$this->error(sprintf(__('Error adding translation %s for %s.', 'sitepress'), $data['code'], $lang['code']));
+				}
+				continue;
+			}
+			
+				// Insert dummy translation.
+			if (!$this->insert_translation($data['english_name'], $data['code'], $lang['code'])) {
+					$this->error(sprintf(__('Error adding translation %s for %s.', 'sitepress'), $data['code'], $lang['code']));
+			}
+		}
+		
+			// Insert native name.
+		if (!isset($data['translations']['add']) || empty($data['translations']['add'])) {
+			$data['translations']['add'] = $data['english_name'];
+		}
+		if (!$this->insert_translation($data['translations']['add'], $data['code'], $data['code'])) {
+			$this->error(__('Error adding native name.', 'sitepress'));
+		}
+		
+			// Handle flag.
+		if ($data['flag_upload'] == 'true' && !empty($_FILES['icl_edit_languages']['name']['add']['flag_file'])) {
+			if ($filename = $this->upload_flag('add', $data)) {
+				$data['flag'] = $filename;
+				$from_template = 1;
+			} else {
+				$data['flag'] = $data['code'] . '.png';
+				$from_template = 0;
+			}
+		} else {
+			if (empty($data['flag'])) {
+				$data['flag'] = $data['code'] . '.png';
+			}
+			$from_template = 0;
+		}
+		
+			// Insert flag table.
+		if (!$this->insert_flag($data['code'], $data['flag'], $from_template)) {
+			$this->error(__('Error adding flag.', 'sitepress'));
+		}
+	}
+
+
+	function validate_one($id, $data) {
+	
+		global $wpdb;
+		
+			// If insert, check if languge code (unique) exists.
+		if ($exists = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code='".$data['code']."'") && $id == 'add') {
+			$this->error = __('Language code exists','sitepress');
+			$this->add_validation_failed = true;
+			return false;
+			
+			// Illegal change of code
+		} else if ($exists && $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code='".$data['code']."' AND id=".$data['id']) != $data['code']) {
+			$this->error = __('Language code exists','sitepress');
+			if ($id == 'add') $this->add_validation_failed = true;
+			return false;
+		}
+		
+		foreach ($this->required_fields as $name => $type) {
+			if ($name == 'flag') {
+				if ($data['flag_upload'] == 'true') {
+					$check =  $_FILES['icl_edit_languages']['name'][$id]['flag_file'];
+					if (empty($check)) continue;
+					if (!$this->check_extension($check)) {
+						if ($id == 'add') {
+							$this->add_validation_failed = true;
+						}
+						return false;
+					}
+				}
+				continue;
+			}
+			if (!isset($_POST['icl_edit_languages'][$id][$name]) || empty($_POST['icl_edit_languages'][$id][$name])) {
+				if ($_POST['icl_edit_languages_ignore_add'] == 'true') {
+					return false;
+				}
+				$this->error(__('Please, enter required data.','sitepress'));
+				if ($id == 'add') {
+					$this->add_validation_failed = true;
+				}
+				return false;
+			}
+			if ($type == 'array' && !is_array($_POST['icl_edit_languages'][$id][$name])) {
+				if ($id == 'add') {
+					$this->add_validation_failed = true;
+				}
+				$this->error(__('Please, enter valid data.','sitepress')); return false;
+			}
+		}
+		return true;
+	}
+
+	function sanitize($data) {
+		global $wpdb;
+		foreach ($data as $key => $value) {
+			if (is_array($value)) {
+				foreach ($value as $k => $v) {
+					$data[$key][$k] = $wpdb->escape($v);
+				}
+			}
+			$data[$key] = $wpdb->escape($value);
+		}
+		return $data;
+	}
+
+	function check_extension($file) {
+		$extension = substr($file, strrpos($file, '.') + 1);
+		if (!in_array($extension,array('png','gif','jpg'))) {
+			$this->error(__('File extension not allowed.','sitepress'));
+			return false;
+		}
+		return true;
+	}
+
+	function error($str = false) {
+		if (!$this->error) {
+			$this->error = '';
+		}
+		$this->error .= $str . '<br />';
+	}
+
+	function upload_flag($id, $data) {
+		$filename = basename($_FILES['icl_edit_languages']['name'][$id]['flag_file']);
+		$target_path = $this->upload_dir . '/' . $filename;
+		if (move_uploaded_file($_FILES['icl_edit_languages']['tmp_name'][$id]['flag_file'], $target_path) ) {
+    		return $filename;
+		} else {
+    		$this->error(__('There was an error uploading the file, please try again!','sitepress'));
+			return false;
+		}
+	}
+
+	function migrate() {
+		global $sitepress, $sitepress_settings;
+		if (!isset($sitepress_settings['edit_languages_flag_migration'])) {
+			foreach( glob(get_stylesheet_directory().'/flags/*') as $filename ){
+				rename($filename, $this->upload_dir . '/' . basename($filename));
+			}
+			$sitepress->save_settings(array('edit_languages_flag_migration' => 1));
+		}
+	}
+
+}
+
+global $icl_edit_languages;
+$icl_edit_languages = new SitePressEditLanguages;
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/icl_reminders.php b/wp-content/plugins/sitepress-multilingual-cms/menu/icl_reminders.php
new file mode 100644
index 0000000..4619568
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/icl_reminders.php
@@ -0,0 +1,25 @@
+<?php
+    global $sitepress;
+    
+    if (isset($sitepress->settings['icl_show_reminders'])) {
+        $show = $sitepress->settings['icl_show_reminders'];
+    } else {
+        $show = true;
+    }
+
+?>
+
+<br clear="all" />
+<div id="icl_reminder_message" class="updated message fade" style="clear:both;margin-top:5px;display:none; padding-bottom: 7px;margin-bottom:30px;">
+    <table width="100%">
+        <tr>
+            <td><h4 style="margin-top:5px 0 5px 0; padding: 0;">ICanLocalize Reminders</h4></td>
+            <td align="right"><a id="icl_reminder_show" href="#" style="text-align:right">
+            <span id="icl_show_text"<?php if($show) { echo ' style="display:none"';}?>><?php _e('Show reminders', 'sitepress')?></span>
+            <span<?php if(!$show) { echo ' style="display:none"';}?>><?php _e('Hide reminders', 'sitepress')?></span>
+            </a></td>
+        </tr>
+    </table>
+    <div id="icl_reminder_list"<?php if(!$show) { echo ' style="display:none"';}?>>
+    </div>
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/language-selector.php b/wp-content/plugins/sitepress-multilingual-cms/menu/language-selector.php
new file mode 100644
index 0000000..9d6c882
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/language-selector.php
@@ -0,0 +1,94 @@
+<?php
+
+global $w_this_lang, $icl_language_switcher_preview;
+if($w_this_lang['code']=='all'){
+    $main_language['native_name'] = __('All languages', 'sitepress');
+}
+
+if ($this->settings['icl_lang_sel_type'] == 'list' || $icl_language_switcher_preview){
+	global $icl_language_switcher;
+	$icl_language_switcher->widget_list();
+	if (!$icl_language_switcher_preview) return;
+}
+
+?>
+<div id="lang_sel"<?php if ($this->settings['icl_lang_sel_type'] == 'list') echo ' style="display:none;"';?> <?php if($this->is_rtl()): ?>class="icl_rtl"<?php endif; ?> >
+    <ul>
+        <li><a href="#" class="lang_sel_sel icl-<?php echo $w_this_lang['code'] ?>">
+            <?php if( $this->settings['icl_lso_flags'] || $icl_language_switcher_preview):?>                
+            <img <?php if( !$this->settings['icl_lso_flags'] ):?>style="display:none"<?php endif?> class="iclflag" src="<?php echo $main_language['country_flag_url'] ?>" alt="<?php echo $main_language['language_code'] ?>" />                                
+            &nbsp;<?php endif;
+                if($icl_language_switcher_preview){
+                    $lang_native = $main_language['native_name'];
+                    if($this->settings['icl_lso_native_lang']){
+                        $lang_native_hidden = false;
+                    }else{
+                        $lang_native_hidden = true;
+                    }
+                    $lang_translated = $main_language['translated_name'];
+                    if($this->settings['icl_lso_display_lang']){
+                        $lang_translated_hidden = false;
+                    }else{
+                        $lang_translated_hidden = true;
+                    }                            
+                }else{
+                    if($this->settings['icl_lso_native_lang']){
+                        $lang_native = $main_language['native_name'];
+                    }else{
+                        $lang_native = false;
+                    }
+                    if($this->settings['icl_lso_display_lang']){
+                        $lang_translated = $main_language['translated_name'];
+                    }else{
+                        $lang_translated = false;
+                    }
+                }
+                echo icl_disp_language($lang_native, $lang_translated, $lang_native_hidden, $lang_translated_hidden);
+            
+			 if(!isset($ie_ver) || $ie_ver > 6): ?></a><?php endif; ?>
+            <?php if(!empty($active_languages)): ?>
+            <?php if(isset($ie_ver) && $ie_ver <= 6): ?><table><tr><td><?php endif ?>            
+            <ul>
+                <?php foreach($active_languages as $lang): ?>
+                <li class="icl-<?php echo $lang['language_code'] ?>">          
+                    <a href="<?php echo $lang['url']?>">
+                    <?php if( $this->settings['icl_lso_flags'] || $icl_language_switcher_preview):?>                
+                    <img <?php if( !$this->settings['icl_lso_flags'] ):?>style="display:none"<?php endif?> class="iclflag" src="<?php echo $lang['country_flag_url'] ?>" alt="<?php echo $lang['language_code'] ?>" />&nbsp;                    
+                    <?php endif; ?>
+                    <?php 
+                        if($icl_language_switcher_preview){
+                            $lang_native = $lang['native_name'];
+                            if($this->settings['icl_lso_native_lang']){
+                                $lang_native_hidden = false;
+                            }else{
+                                $lang_native_hidden = true;
+                            }
+                            $lang_translated = $lang['translated_name'];
+                            if($this->settings['icl_lso_display_lang']){
+                                $lang_translated_hidden = false;
+                            }else{
+                                $lang_translated_hidden = true;
+                            }                            
+                        }else{
+                            if($this->settings['icl_lso_native_lang']){
+                                $lang_native = $lang['native_name'];
+                            }else{
+                                $lang_native = false;
+                            }
+                            if($this->settings['icl_lso_display_lang']){
+                                $lang_translated = $lang['translated_name'];
+                            }else{
+                                $lang_translated = false;
+                            }
+                        }
+                        echo icl_disp_language($lang_native, $lang_translated, $lang_native_hidden, $lang_translated_hidden);
+                         ?>
+                    </a>
+                </li>
+                <?php endforeach; ?>
+            </ul>            
+            <?php if(isset($ie_ver) && $ie_ver <= 6): ?></td></tr></table></a><?php endif ?> 
+            <?php endif; ?>
+        </li>
+    </ul>    
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/languages.php b/wp-content/plugins/sitepress-multilingual-cms/menu/languages.php
new file mode 100644
index 0000000..bcc6ad6
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/languages.php
@@ -0,0 +1,717 @@
+<?php
+    if(!is_plugin_active(basename(dirname(dirname(__FILE__))) . "/sitepress.php")){
+        ?>
+        <h2><?php echo __('Setup WPML', 'sitepress') ?></h2>
+        <div class="updated fade">
+        <p style="line-height:1.5"><?php echo __('The WPML Multilingual CMS plugin is not currently enabled.', 'sitepress');?></p>
+        <p style="line-height:1.5"><?php printf(__('Please go to the <a href="%s">Plugins</a> page and enable the WPML Multilingual CMS plugin before trying to configure the plugin.', 'sitepress'), 'plugins.php');?></p>
+        </div>
+        <?php
+        return;
+    }
+    
+    if (isset($_GET['trop'])) { require_once dirname(__FILE__).'/edit-languages.php'; return; }
+    
+    if(!$sitepress_settings['existing_content_language_verified']){
+        // try to determine the blog language
+        $blog_current_lang = 0;            
+        if($blog_lang = get_option('WPLANG')){
+            $exp = explode('_',$blog_lang);
+            $blog_current_lang = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code='{$exp[0]}'");
+        }
+        if(!$blog_current_lang && defined('WPLANG') && WPLANG != ''){
+            $blog_lang = WPLANG;
+            $exp = explode('_',$blog_lang);
+            $blog_current_lang = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code='{$exp[0]}'");        
+        }
+        if(!$blog_current_lang){
+            $blog_current_lang = 'en';
+        }        
+        $languages = $sitepress->get_languages($blog_current_lang);            
+    }else{
+        $active_languages = $sitepress->get_active_languages();            
+        $languages = $sitepress->get_languages($sitepress->get_admin_language());            
+        $sitepress_settings = $sitepress->get_settings();
+        foreach($active_languages as $lang){
+            if($lang['code'] != $sitepress->get_default_language()){
+                $sample_lang = $lang;
+                break;
+            }
+        }
+        $default_language = $sitepress->get_language_details($sitepress->get_default_language());        
+        $inactive_content = $sitepress->get_inactive_content();        
+    }  
+    
+global $language_switcher_defaults, $language_switcher_defaults_alt;      
+?>
+<?php $sitepress->noscript_notice() ?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32<?php if(!$sitepress_settings['basic_menu']) echo ' icon32_adv'?>" ><br /></div>
+    <h2><?php echo __('Setup WPML', 'sitepress') ?></h2>
+    
+    <?php 
+        if($sitepress_settings['setup_complete']){
+            include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php'; 
+        }        
+    ?>
+    
+    <?php if(!$sitepress_settings['setup_complete']): /* setup wizard */ ?>
+    <?php 
+        if(!$sitepress_settings['existing_content_language_verified']){
+            $sw_width = 20;
+        }elseif(count($sitepress->get_active_languages()) < 2 || $sitepress_settings['setup_wizard_step'] == 2){
+            $sw_width = 50;
+        }else{
+            $sw_width = 80;
+        }
+    ?>
+    <div id="icl_setup_wizard_wrap">
+        <h3><?php _e('Before you can start using WPML, it needs to be set up', 'sitepress') ?></h3>
+        <div id="icl_setup_wizard">
+            <div class="icl_setup_wizard_step"><?php _e('1. Language for existing contents', 'sitepress')?></div>
+            <div class="icl_setup_wizard_step"><?php _e('2. Select languages', 'sitepress')?></div>
+            <div class="icl_setup_wizard_step"><?php _e('3. Add a language switcher', 'sitepress')?></div>            
+        </div>        
+        <br clear="all" />
+        <div id="icl_setup_wizard_progress"><div id="icl_setup_wizard_progress_bar" style="width:<?php echo $sw_width ?>%">&nbsp;</div></div>
+    </div>
+    <br />
+    <?php endif; /* setup wizard */ ?>
+    
+    <?php if(!$sitepress_settings['existing_content_language_verified']): ?>        
+        <form id="icl_initial_language" method="post" action="<?php echo $_SERVER['REQUEST_URI'] ?>">
+        <table class="widefat">
+            <thead>
+                <tr>
+                    <th><?php echo __('Current content language', 'sitepress') ?></th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr>
+                    <td>                    
+                        <?php wp_nonce_field('icl_initial_language','icl_initial_languagenonce') ?>            
+                        <p>
+                            <?php echo __('Before adding other languages, please select the language existing contents are written in:', 'sitepress') ?><br /><br />
+                            <select name="icl_initial_language_code">
+                            <?php 
+                                // for the wizard
+                                if($sitepress->get_default_language()){
+                                    $blog_current_lang = $sitepress->get_default_language();
+                                }
+                            ?>
+                            <?php foreach($languages as $lang):?>
+                            <option <?php if($blog_current_lang==$lang['code']):?>selected="selected"<?php endif;?> value="<?php echo $lang['code']?>"><?php echo $lang['display_name']?></option>
+                            <?php endforeach; ?>
+                            </select>            
+                            &nbsp;
+                        </p>
+                    </td>
+                </tr>
+            </tbody>
+        </table>         
+        <br />
+        <div style="text-align:right">
+            <input class="button-primary" name="save" value="<?php echo __('Next', 'sitepress') ?>" type="submit" />
+            <?php /*
+            <input class="button-primary" name="save" value="<?php echo __('Add more languages', 'sitepress') ?> &raquo;" type="submit" />
+            <input class="button" name="save_one_language" value="<?php echo __('Done (just one language)', 'sitepress') ?>" type="submit" />
+            */ ?>
+        </div>
+        </form>                
+    <?php else: ?>
+        <?php if($sitepress_settings['setup_complete'] || $sitepress_settings['setup_wizard_step'] == 2): ?>
+        <table id="icl_languages_selection_table" class="widefat">
+            <thead>
+                <tr>
+                    <th><?php echo __('Site Languages', 'sitepress') ?></th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr>
+                    <td>
+                        <table id="icl_setup_table" class="form-table">
+                            <tr valign="top">            
+                                <td>
+                                    <?php if($sitepress_settings['setup_complete']): ?>
+                                        <?php _e('These languages are enabled for this site.','sitepress'); ?><br />
+                                        <ul id="icl_enabled_languages">
+                                                <?php foreach($active_languages as $lang): $is_default = ($sitepress->get_default_language()==$lang['code']); ?>
+                                            <li <?php if($is_default):?>class="default_language"<?php endif;?>><label><input name="default_language" type="radio" value="<?php echo $lang['code'] ?>" <?php if($is_default):?>checked="checked"<?php endif;?> /> <?php echo $lang['display_name'] ?> <?php if($is_default):?>(<?php echo __('default', 'sitepress') ?>)<?php endif?></label></li>
+                                            <?php endforeach ?>
+                                        </ul>
+                                        <br clear="all" />
+                                    <?php else: ?>
+                                        <?php _e('Select the languages to enable for your site (you can also add and remove languages later).','sitepress'); ?><br />
+                                    <?php endif; ?>
+                                    <input id="icl_save_default_button" type="button" class="button-secondary action" value="<?php echo __('Apply', 'sitepress') ?>" />
+                                    <input id="icl_cancel_default_button" type="button" class="button-secondary action" value="<?php echo __('Cancel', 'sitepress') ?>" />                                    
+                                    <?php if($sitepress_settings['setup_complete']): ?>
+                                    <input id="icl_change_default_button" type="button" class="button-secondary action" value="<?php echo __('Change default language', 'sitepress') ?>" <?php if(count($active_languages) < 2): ?>style="display:none"<?php endif ?> />
+                                    <?php endif; ?>
+                                    
+                                    <?php if($sitepress_settings['setup_complete']): ?>
+                                    <input id="icl_add_remove_button" type="button" class="button-secondary action" value="<?php echo __('Add / Remove languages', 'sitepress') ?>" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response"></span>
+                                    <br clear="all" />
+                                    <?php endif; ?>
+                                    <div id="icl_avail_languages_picker" <?php if(!$sitepress_settings['setup_complete']) echo 'style="display:block"' ?>>                
+                                        <ul>
+                                        <?php foreach($languages as $lang): ?>
+                                            <li><label><input type="checkbox" value="<?php echo $lang['code'] ?>" <?php if($lang['active']):?>checked="checked"<?php endif;?> 
+                                            <?php if($sitepress->get_default_language()==$lang['code']):?>disabled="disabled"<?php endif;?>/>
+                                                <?php if($lang['major']):?><strong><?php endif;?><?php echo $lang['display_name'] ?><?php if($lang['major']):?></strong><?php endif;?></label></li>
+                                        <?php endforeach ?>
+                                        </ul>
+                                        <?php if($sitepress_settings['setup_complete']): ?>
+                                        <br clear="all" />
+                                        <div>
+                                            <input id="icl_save_language_selection" type="button" class="button-secondary action" value="<?php echo __('Apply', 'sitepress') ?>" />
+                                            <input id="icl_cancel_language_selection" type="button" class="button-secondary action" value="<?php echo __('Cancel', 'sitepress') ?>" />                                
+                                        </div>
+                                        <?php endif; ?>
+                                    </div>
+                                </td>
+                            </tr>
+                            <?php if ($sitepress_settings['setup_complete']) { ?><tr><td><a href="admin.php?page=<?php echo ICL_PLUGIN_FOLDER ?>/menu/languages.php&amp;trop=1"><?php _e('Edit Languages','sitepress'); ?></a></td></tr><?php } ?>
+                        </table>              
+                        
+                        <?php if(!empty($inactive_content)): ?>
+                            <?php 
+                                foreach($inactive_content as $language=>$ic){
+                                    $t_posts += $ic['post'];
+                                    $t_pages += $ic['page'];
+                                    $t_cats += $ic['category'];
+                                    $t_tags += $ic['post_tag'];
+                                } 
+                            ?>        
+                            <br />
+                            <h3><?php echo __('Inactive content', 'sitepress') ?></h3>
+                            <small><?php echo __('In order to edit or delete these you need to activate the corresponding language first', 'sitepress') ?></small>
+                            <table id="icl_inactive_content_table" class="widefat" cellspacing="0">
+                            <thead>
+                            <tr>
+                            <th scope="col"><?php echo __('Language', 'sitepress') ?></th>
+                            <th scope="col"><?php echo __('Posts', 'sitepress') ?></th>
+                            <th scope="col"><?php echo __('Pages', 'sitepress') ?></th>        
+                            <th scope="col"><?php echo __('Categories', 'sitepress') ?></th>
+                            <th scope="col"><?php echo __('Tags', 'sitepress') ?></th>                
+                            </tr>        
+                            </thead>
+                            <tfoot>
+                            <tr>
+                            <th scope="col"><?php echo __('Total', 'sitepress') ?></th>
+                            <td scope="col"><?php echo intval($t_posts) ?></td>
+                            <td scope="col"><?php echo intval($t_pages) ?></td>
+                            <td scope="col"><?php echo intval($t_cats) ?></td>
+                            <td scope="col"><?php echo intval($t_tags) ?></td>
+                            </tr>        
+                            </tfoot>                                
+                            <tbody>        
+                            <?php foreach($inactive_content as $language=>$ic): ?>
+                            <tr>
+                            <th scope="col"><?php echo $language ?></th>
+                            <td scope="col"><?php echo intval($ic['post']); ?></td>
+                            <td scope="col"><?php echo intval($ic['page']); ?></td>
+                            <td scope="col"><?php echo intval($ic['category']); ?></td>
+                            <td scope="col"><?php echo intval($ic['post_tag']); ?></td>
+                            </tr>
+                            <?php endforeach; ?>                                                                  
+                            </tbody>        
+                            </table>    
+                        <?php endif; ?>                      
+                    </td>
+                </tr>
+            </tbody>
+        </table> 
+        <br />
+        <?php if($sitepress_settings['setup_wizard_step']==2): ?>             
+        <div style="text-align:right">
+            <input id="icl_setup_back_1" class="button-primary" name="save" value="<?php echo __('Back', 'sitepress') ?>" type="button" />
+            <input id="icl_setup_next_1" class="button-primary" name="save" value="<?php echo __('Next', 'sitepress') ?>" type="button" <?php if(count($active_languages) < 2):?>disabled="disabled"<?php endif;?> />
+        </div>
+        <?php endif; ?>                      
+        <?php endif; ?>                      
+
+        
+        <div id="icl_more_languages_wrap">
+            <div id="icl_lnt" class="icl_advanced_feature">
+            <?php if(count($active_languages) > 1): ?>            
+            
+                <table class="widefat">
+                    <thead>
+                        <tr>
+                            <th><?php echo __('Choose how to determine which language visitors see contents in', 'sitepress') ?></th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr>
+                            <td>
+                                <br />
+                                <form id="icl_save_language_negotiation_type" name="icl_save_language_negotiation_type" action="">
+                                <ul>
+                                    <?php
+                                    if(!class_exists('WP_Http')) include_once ABSPATH . WPINC . '/class-http.php';
+                                    $client = new WP_Http();
+                                    if(false === strpos($_POST['url'],'?')){$url_glue='?';}else{$url_glue='&';}                    
+                                    $response = $client->request(get_option('home') . '/' . $sample_lang['code'] .'/' . $url_glue . '____icl_validate_domain=1', array('timeout'=>15, 'decompress'=>false));
+                                    if(!is_wp_error($response) && ($response['response']['code']=='200') && ($response['body'] == '<!--'.get_option('home').'-->')){
+                                        $icl_folder_url_disabled = false;
+                                    }else{
+                                        $icl_folder_url_disabled = true;
+                                    }                    
+                                    ?>
+                                    <li>
+                                        <label>
+                                            <input<?php //if($icl_folder_url_disabled) echo ' disabled="disabled'; ?> type="radio" name="icl_language_negotiation_type" value="1" <?php if($sitepress_settings['language_negotiation_type']==1):?>checked="checked"<?php endif?> />                                                    
+                                            <?php echo sprintf(__('Different languages in directories (%s - %s, %s/%s/ - %s, etc.)', 'sitepress'), trailingslashit(get_option('home')), $default_language['display_name'] , get_option('home'), $sample_lang['code'], $sample_lang['display_name'] ) ?>
+                                        </label>
+                                        <?php if($icl_folder_url_disabled):?>                                        
+                                        <div class="icl_error_text" style="margin:10px;">
+                                            <p>
+                                                <?php echo __('It looks like languages per directories will not function.', 'sitepress'); ?>
+                                                <a href="#" onClick="jQuery(this).parent().parent().next().toggle();return false">Details</a>
+                                            </p>
+                                        </div>                                                 
+                                        <div class="icl_error_text" style="display:none;margin:10px;"><?php echo __('
+                                            <p>This can be a result of either:</p>
+                                            <ul style="list-style: circle;margin-left:18px">
+                                            <li>WordPress is installed in a directory (not root) and you\'re using default links.</li>
+                                            <li>URL rewriting is not enabled in your web server.</li>
+                                            <li>The web server cannot write to the .htaccess file</li>
+                                            </ul>
+                                            <a href="http://wpml.org/?page_id=1010";>How to fix</a>
+                                            ', 'sitepress')?>                            
+                                            <p>
+                                                <?php printf(__('When WPML accesses <a target="_blank" href="%s">%s</a> it gets:', 'sitepress'), $__url = get_option('home').'/' . $sample_lang['code'] .'/?____icl_validate_domain=1', $__url); ?>
+                                                <br />
+                                                <?php 
+                                                    if(is_wp_error($response)){
+                                                        echo '<strong>';                                            
+                                                        echo $response->get_error_message();
+                                                        echo '</strong>';
+                                                    }elseif($response['response']['code']!='200'){
+                                                        echo '<strong>';
+                                                        printf(__('HTTP code: %s (%s)', 'sitepress'), $response['response']['code'], $response['response']['message']);
+                                                        echo '</strong>';
+                                                    }else{
+                                                        echo '<div style="width:100%;height:150px;overflow:auto;background-color:#fff;color:#000;font-family:Courier;font-style:normal;border:1px solid #aaa;">'.htmlentities($response['body']).'</div>';
+                                                    }
+                                                ?>
+                                            </p>
+                                            <p>
+                                                <?php printf(__('The expected value is: %s', 'sitepress'), '<br /><strong>&lt;!--'.get_option('home').'--&gt;</strong>'); ?>
+                                            </p>
+                                        </div>                            
+                                        <?php endif; ?>
+                                    </li>
+                                    <?php 
+                                    global $wpmu_version;
+                                    if(isset($wpmu_version)){
+                                        $icl_lnt_disabled = 'disabled="disabled" ';
+                                    }else{
+                                        $icl_lnt_disabled = '';
+                                    } 
+                                    ?>
+                                    <li>
+                                        <label>
+                                            <input <?php echo $icl_lnt_disabled ?>id="icl_lnt_domains" type="radio" name="icl_language_negotiation_type" value="2" <?php if($sitepress_settings['language_negotiation_type']==2):?>checked="checked"<?php endif?> />
+                                            <?php echo __('A different domain per language', 'sitepress') ?>
+                                            <?php if($icl_lnt_disabled): ?>
+                                            <span class="icl_error_text"><?php echo __('This option is not yet available for WPMU', 'sitepress')?></span>
+                                            <?php endif; ?>
+                                        </label>
+                                        <?php if($sitepress_settings['language_negotiation_type']==2):?>                    
+                                        <div id="icl_lnt_domains_box">
+                                        <table class="language_domains">
+                                        <?php foreach($active_languages as $lang) :?>
+                                        <tr>
+                                            <td><?php echo $lang['display_name'] ?></td>
+                                            <?php if($lang['code']==$sitepress->get_default_language()): ?>                        
+                                            <td id="icl_ln_home"><?php echo get_option('home') ?></td>
+                                            <td>&nbsp;</td>
+                                            <td>&nbsp;</td>
+                                            <?php else: ?>
+                                            <td><input type="text" id="language_domain_<?php echo $lang['code'] ?>" name="language_domains[<?php echo $lang['code'] ?>]" value="<?php echo $sitepress_settings['language_domains'][$lang['code']] ?>" size="40" /></td>
+                                            <td><label><input class="validate_language_domain" type="checkbox" name="validate_language_domains[]" value="<?php echo $lang['code'] ?>" checked="checked" /> <?php echo  __('Validate on save', 'sitepress') ?></td>
+                                            <td><span id="ajx_ld_<?php echo $lang['code'] ?>"></span></td>
+                                            <?php endif; ?>
+                                        </tr>
+                                        <?php endforeach; ?>
+                                        </table>
+                                        </div>
+                                        <?php endif; ?>
+                                    </li>                
+                                    <li>
+                                        <label>
+                                            <input type="radio" name="icl_language_negotiation_type" value="3" <?php if($sitepress_settings['language_negotiation_type']==3):?>checked="checked"<?php endif?> />
+                                            <?php echo sprintf(__('Language name added as a parameter (%s?lang=%s - %s)', 'sitepress'),get_option('home'),$sample_lang['code'],$sample_lang['display_name']) ?>
+                                        </label>
+                                    </li>
+                                </ul>
+                                <p>
+                                    <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response2"></span>
+                                </p>
+                                </form>                           
+                            </td>
+                        </tr>
+                    </tbody>
+                </table> 
+                <br />  
+            <?php endif; ?>
+            </div>
+            
+            <div id="icl_lso">
+            <?php if($sitepress_settings['setup_complete'] && count($active_languages) > 1 || $sitepress_settings['setup_wizard_step']==3): ?>
+
+                <form id="icl_save_language_switcher_options" name="icl_save_language_switcher_options" action="">            
+                    <table class="widefat">
+                        <thead>
+                            <tr>
+                                <th><?php echo __('Language switcher options', 'sitepress') ?></th>
+                            </tr>
+                        </thead>
+                        <tbody>
+                            <tr>
+                                <td>
+                                    <p class="icl_form_errors" style="display:none"></p>
+                                    <ul>
+                                        <li>
+                                            <h4 class="icl_advanced_feature"><?php echo __('Language switcher widget', 'sitepress')?></h4>                                
+                                            
+                                            <?php 
+                                            global $wp_registered_sidebars; 
+                                            $swidgets = wp_get_sidebars_widgets();
+                                            $sb = '';
+                                            foreach($swidgets as $k=>$v){
+                                                if(in_array('language-selector', $v)){
+                                                    $sb = $k;
+                                                    $active_sidebar_check = $k;
+                                                }
+                                            }
+                                            if ($sitepress_settings['setup_complete'] && !array_key_exists($active_sidebar_check, $wp_registered_sidebars)) {
+                                                echo '<span class="icl_error_text"><strong>' . sprintf(__('Theme has changed and widget is not active. Please visit %swidgets page%s.', 'sitepress'), '<a href="widgets.php">', '</a>') . '</strong></span>';
+                                            } else {
+                                            ?>                
+                                            <?php _e('Choose where to display the language switcher widget:', 'sitepress') ?>
+                                            <select name="icl_language_switcher_sidebar">                
+                                            <?php foreach($wp_registered_sidebars as $rs): ?>                
+                                            <option value="<?php echo $rs['id']?>" <?php if($sb == $rs['id']) echo 'selected="selected"'?>><?php echo $rs['name']?>&nbsp;</option>
+                                            <?php endforeach;?>
+                                            <option value="" <?php if(!$sb && $sitepress_settings['setup_complete']) echo 'selected="selected"' ?> ><?php _e('--none--', 'sitepress'); ?></option>
+                                            </select>
+                                            <?php } ?>
+                                                                                        
+                                            <p class="icl_advanced_feature"><?php printf(__('The drop-down language switcher can be added to your theme by inserting this PHP code: %s or as a widget','sitepress'),
+                                            '<code class="php">&lt;?php do_action(\'icl_language_selector\'); ?&gt;</code>'); ?>.</p>
+                                                                                        
+                                            <p class="icl_advanced_feature"><?php echo __('You can also create custom language switchers, such as a list of languages or country flags.','sitepress'); ?>
+                                            <a href="http://wpml.org/?page_id=989";><?php echo __('Custom language switcher creation guide','sitepress')?></a>.
+                                            </p>
+                                        </li>
+                                        <li>
+                                            <ul>
+                                                <li>
+                                                    <br /><label>
+                                                        <input type="checkbox" name="icl_widget_title_show" value="1"<?php if ($sitepress_settings['icl_widget_title_show']) echo ' checked="checked"'; ?> />
+                                                        <?php _e('Display \'Languages\' as the widget title', 'sitepress'); ?>
+                                                    </label>
+                                                </li>
+                                                <li>
+                                                    <h4><?php echo __('Language switcher style', 'sitepress')?></h4>
+                                                    
+                                            <?php if(!defined('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS') || !ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS): ?>                                            
+                                            <div id="icl_lang_sel_preview_wrap" style="height:<?php echo 50 + 25 * count($sitepress->get_active_languages())?>px">                                            
+                                            <div id="icl_lang_sel_preview">                                            
+                                            <h4><?php _e('Language switcher widget preview', 'sitepress')?></h4>
+                                            <?php 
+                                                global $icl_language_switcher_preview;
+                                                $icl_language_switcher_preview = true;                                                
+                                                $sitepress->language_selector(); 
+                                            ?>                                                                          
+                                            </div>                                                                     
+                                            </div>
+                                            <?php endif; ?>
+                                            
+                                                    <ul>
+                                                        <li>
+                                                        <label>
+                                                            <input type="radio" name="icl_lang_sel_type" value="dropdown" <?php if(!$sitepress_settings['icl_lang_sel_type'] || $sitepress_settings['icl_lang_sel_type'] == 'dropdown'):?>checked="checked"<?php endif?> />
+                                                            <?php echo __('Drop-down menu', 'sitepress') ?>
+                                                        </label>                    
+                                                        </li>
+                                                        <li>
+                                                            <label>
+                                                                <input type="radio" name="icl_lang_sel_type" value="list" <?php if($sitepress_settings['icl_lang_sel_type'] == 'list'):?>checked="checked"<?php endif?> />
+                                                                <?php echo __('List of languages', 'sitepress') ?>
+                                                            </label>
+                                                        </li>
+                                                    </ul>
+                                                </li>
+                                            </ul>                                
+                                            
+                                        </li>                                  
+                                        <li class="icl_advanced_feature">
+                                            <h4><?php echo __('How to handle languages without translation', 'sitepress')?></h4>
+                                            <p><?php echo __('Some pages or posts may not be translated to all languages. Select how the language selector should behave in case translation is missing.', 'sitepress') ?></p>
+                                            <ul>
+                                                <li>
+                                                    <label>
+                                                        <input type="radio" name="icl_lso_link_empty" value="0" <?php if(!$sitepress_settings['icl_lso_link_empty']):?>checked="checked"<?php endif?> />
+                                                        <?php echo __('Skip language', 'sitepress') ?>
+                                                    </label>
+                                                </li>
+                                                <li>
+                                                <label>
+                                                    <input type="radio" name="icl_lso_link_empty" value="1" <?php if($sitepress_settings['icl_lso_link_empty']==1):?>checked="checked"<?php endif?> />
+                                                    <?php echo __('Link to home of language for missing translations', 'sitepress') ?>
+                                                </label>                    
+                                                </li>
+                                            </ul>
+                                        </li>                    
+                                        <li>
+                                        
+                                            <h4><?php echo __('What to include in the language switcher', 'sitepress')?></h4>
+                                            <ul>
+                                                <li>
+                                                    <label>
+                                                        <input type="checkbox" name="icl_lso_flags" value="1" <?php if($sitepress_settings['icl_lso_flags']):?>checked="checked"<?php endif?> />
+                                                        <?php echo __('Flag', 'sitepress') ?>
+                                                    </label>
+                                                </li>
+                                                <li>
+                                                <label>
+                                                    <input type="checkbox" name="icl_lso_native_lang" value="1" <?php if($sitepress_settings['icl_lso_native_lang']):?>checked="checked"<?php endif?> />
+                                                    <?php echo __('Native language name (the language name as it\'s written in that language)', 'sitepress') ?>
+                                                </label>                    
+                                                </li>
+                                                <li>
+                                                <label>
+                                                    <input type="checkbox" name="icl_lso_display_lang" value="1" <?php if($sitepress_settings['icl_lso_display_lang']):?>checked="checked"<?php endif?> />
+                                                    <?php echo __('Language name in display language (the language name as it\'s written in the currently displayed language)', 'sitepress') ?>
+                                                </label>                    
+                                                </li>                            
+                                            </ul>
+
+                                        <?php do_action('icl_language_switcher_options'); ?>
+
+                                    </ul>
+                                    <?php if($sitepress_settings['setup_complete']): ?>             
+                                        <p>
+                                            <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+                                            <span class="icl_ajx_response" id="icl_ajx_response3"></span>
+                                        </p>                                    
+                                    <?php endif; ?>
+                                </td>
+                            </tr>
+                        </tbody>
+                    </table> 
+                    <br />
+                    <?php if(!$sitepress_settings['setup_complete']): ?>             
+                    <div id="icl_setup_nav_3" style="text-align:right">
+                        <input id="icl_setup_back_2" class="button-primary" name="save" value="<?php echo __('Back', 'sitepress') ?>" type="button" />
+                        <input class="button-primary" name="save" value="<?php echo __('Finish', 'sitepress') ?>" type="submit" />
+                    </div>
+                    <script type="text/javascript">
+                    addLoadEvent(function(){     
+                        jQuery('#icl_save_language_switcher_options').submit(function(){
+                            iclSaveForm_success_cb.push(function(){
+                                location.href = location.href.replace(/#.*/,'')
+                            });
+                        });
+                    });
+                    </script>
+                    <?php endif; ?>
+                </form>                                          
+            <?php endif; ?>
+            </div>
+            
+            <div class="icl_advanced_feature">
+            <?php if(count($active_languages) > 1): ?>   
+                <table class="widefat">
+                    <thead>
+                        <tr>
+                            <th><?php echo __('Admin language', 'sitepress') ?></th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr>
+                            <td>
+                                <form id="icl_admin_language_options" name="icl_admin_language_options" action="">        
+                                <?php if(is_admin()): ?>
+                                <p>
+                                    <label>
+                                        <?php _e('Default admin language: ', 'sitepress'); ?>
+                                        <?php $default_language = $sitepress->get_language_details($sitepress->get_default_language()); ?>                                        
+                                        <select name="icl_admin_default_language">
+                                        <option value="_default_"><?php printf(__('Default language (currently %s)', 'sitepress'),  $default_language['display_name']); ?></option>
+                                        <?php foreach($active_languages as $al):?>
+                                        <option value="<?php echo $al['code'] ?>"<?php if($sitepress_settings['admin_default_language']==$al['code']) echo ' selected="selected"'?>><?php echo $al['display_name']; if($sitepress->get_admin_language() != $al['code']) echo ' ('. $al['native_name'] .')' ?>&nbsp;</option>
+                                        <?php endforeach; ?>
+                                        </select>
+                                    </label>
+                                </p>
+                                <?php endif; ?>
+                                <p><?php printf(__('Each user can choose the admin language. You can edit your language preferences by visiting your <a href="%s">profile page</a>.','sitepress'),'profile.php#wpml')?></p>
+                                <p>
+                                    <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response_al"></span>
+                                </p>
+                                </form>
+                            </td>
+                        </tr>
+                    </tbody>
+                </table>
+                <br />
+            <?php endif; ?>                            
+            </div>
+            
+            <div class="icl_advanced_feature">
+            <?php if(count($active_languages) > 1): ?>   
+                <table class="widefat">
+                    <thead>
+                        <tr>
+                            <th><?php echo __('More options', 'sitepress') ?></th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        <tr>
+                            <td>
+                                <h4><?php _e('Translation controls', 'sitepress')?></h4>
+                                <form id="icl_lang_more_options" name="icl_lang_more_options" action="">        
+                                <p>
+                                    <label>
+                                        <input type="checkbox" name="icl_translation_controls_on_posts_lists" <?php if(!$sitepress_settings['hide_translation_controls_on_posts_lists']) echo 'checked="checked"' ?> /> <?php _e('Display translation controls on posts and pages lists.','sitepress'); ?>
+                                    </label>
+                                </p>
+                                <p>
+                                    <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response_mo"></span>
+                                </p>
+                                </form>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                                <h4><?php _e('Blog posts to display', 'sitepress')?></h4>
+                                <form id="icl_blog_posts" name="icl_blog_posts" action="">                                        
+                                <p>
+                                    <label>
+                                        <input type="radio" name="icl_untranslated_blog_posts" <?php if(!$sitepress_settings['show_untranslated_blog_posts']) echo 'checked="checked"' ?> value="0" /> <?php _e('Only translated posts.','sitepress'); ?>
+                                    </label>
+                                </p>
+                                <p>
+                                    <label>
+                                        <input type="radio" name="icl_untranslated_blog_posts" <?php if($sitepress_settings['show_untranslated_blog_posts']) echo 'checked="checked"' ?> value="1" /> <?php _e('All posts (display translation if it exists or posts in default language otherwise).','sitepress'); ?>
+                                    </label>
+                                </p>                                
+                                <p>
+                                    <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response_bp"></span>
+                                </p>
+                                </form>
+                            </td>
+                        </tr>
+
+                        <tr>
+                            <td>
+                                <h4><?php _e('Hide languages', 'sitepress')?></h4>
+                                <form id="icl_hide_languages" name="icl_hide_languages" action="">                                        
+                                <p>
+                                    <?php foreach($active_languages as $l): ?>
+                                    <?php if($l['code'] == $default_language['code']) continue; ?>
+                                    <label style="white-space:nowrap">
+                                        <input type="checkbox" name="icl_hidden_languages[]" <?php if(in_array($l['code'],(array)$sitepress_settings['hidden_languages'])) echo 'checked="checked"' ?> value="<?php echo $l['code']?>" /> <?php echo $l['display_name'] ?>
+                                    </label>&nbsp;&nbsp;&nbsp;
+                                    <?php endforeach; ?>
+                                </p>
+                                <p>
+                                    <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response_hl"></span>
+                                </p>
+                                <p id="icl_hidden_languages_status">                     
+                                <?php 
+                                    if(!empty($sitepress_settings['hidden_languages'])){
+                                        
+                                         if(1 == count($sitepress_settings['hidden_languages'])){
+                                             printf(__('%s is currently hidden to visitors.', 'sitepress'), 
+                                                $active_languages[$sitepress_settings['hidden_languages'][0]]['display_name']);
+                                         }else{
+                                             foreach($sitepress_settings['hidden_languages'] as $l){
+                                                 $_hlngs[] = $active_languages[$l]['display_name'];
+                                             }                                 
+                                             $hlangs = join(', ', $_hlngs);
+                                             printf(__('%s are currently hidden to visitors.', 'sitepress'), $hlangs);
+                                         }
+                                         echo ' ';
+                                         printf(__('You can enable its/their display for yourself, in your <a href="%s">profile page</a>.', 'sitepress'),
+                                            'profile.php#wpml');
+                                     }else{
+                                          _e('All languages are currently displayed.', 'sitepress');
+                                     }
+                                ?>
+                                </p>                                
+                                </form>
+                            </td>
+                        </tr>
+                        
+                        <tr>
+                            <td>
+                                <h4><?php _e('Make themes work multilingual', 'sitepress')?></h4>
+                                <form id="icl_adjust_ids" name="icl_adjust_ids" action="">        
+                                <p>
+                                    <label>
+                                        <input type="checkbox" value="1" name="icl_adjust_ids" <?php if($sitepress_settings['auto_adjust_ids']) echo 'checked="checked"' ?> /> 
+                                        <?php _e('Adjust IDs for multilingual functionality', 'sitepress')?>
+                                    </label>
+                                </p>
+                                <p><?php _e('This feature turns themes into multilingual, without having to edit their PHP files.', 'sitepress')?></p>
+                                <p>
+                                    <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response_ai"></span>
+                                </p>
+                                </form>
+                            </td>
+                        </tr>
+                        
+                    </tbody>
+                </table>
+                <br />
+            <?php endif; ?>                            
+            </div>            
+
+        </div>
+    <?php endif; ?>
+    
+    
+    <?php if($sitepress_settings['setup_complete']): ?>  
+    
+    <?php do_action('icl_extra_options_' . $_GET['page']); ?>        
+        
+    <form action="" name="icl_promote_form">
+    <p>
+        <label><input type="checkbox" name="icl_promote" <?php if($sitepress_settings['promote_wpml']) echo 'checked="checked"' ?> value="1" /> <?php printf(__("Tell the world your site is running multilingual with WPML (places a message in your site's footer) - <a href=\"%s\">read more</a>", 'sitepress'),'http://wpml.org/?page_id=4560'); ?></label>
+    </p>
+    </form>
+    <?php endif; ?>
+    
+    <div id="icl_translate_help_collapsed" <?php if(!$sitepress_settings['dont_show_translate_help']) echo 'style="display:none"' ?>>
+    <img src="<?php echo ICL_PLUGIN_URL ?>/res/img/question-green.png" width="16" height="16" />&nbsp;<a href="#"><?php _e('Instructions for translating contents', 'sitepress'); ?> &raquo;</a>
+    </div>    
+    <div id="icl_translate_help" class="icl_yellow_box" <?php if(!$sitepress_settings['setup_complete'] || $sitepress_settings['dont_show_translate_help']) echo 'style="display:none"' ?>>
+    <h3><?php _e('How to translate ', 'sitepress')?></h3>
+    <h4><?php _e('Translating yourself?', 'sitepress')?></h4>
+    <p><?php _e('You can add translations to posts, pages, tags and categories. Each edit page now includes a new languages box. From that box you can add translations to other languages.', 'sitepress'); ?></p>                                                                                                         
+    <h4><?php _e('Need help translating?', 'sitepress')?></h4>    
+    
+    <img align="left" src="<?php echo ICL_PLUGIN_URL ?>/res/img/icon16.png" width="16" height="16" style="margin-right:7px" />
+    
+    <p><?php printf(__('Try WPML&#8217;s <a href="%s">professional translation</a> and get excellent translations at an affordable rate. <a href="%s">Learn more</a>.','sitepress'), 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/content-translation.php', 'http://wpml.org/content-translation/"; target="_blank'); ?></p>
+    <br />
+    <input id="icl_dismiss_translate_help" type="button" class="button secondary" value="<?php _e('Hide this message', 'sitepress');?>" />
+    </div> 
+    <br />   
+       
+    <?php do_action('icl_menu_footer'); ?>
+    
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/menu-footer.php b/wp-content/plugins/sitepress-multilingual-cms/menu/menu-footer.php
new file mode 100644
index 0000000..9d9d5d1
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/menu-footer.php
@@ -0,0 +1,5 @@
+<div class="updated message">
+<h3 style="margin-bottom:0px;"><?php echo __('Need help?', 'sitepress')?></h3>
+<p style="line-height:1.4em;"><?php printf(__("Purchase a <a%s>support subscription</a> and get help directly from WPML's developers. We will help you get the most out of WPML and customize it for your site.", 'sitepress'), 
+    ' href="admin.php?page='.ICL_PLUGIN_FOLDER.'/menu/support.php"'); ?></p>
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/navigation.php b/wp-content/plugins/sitepress-multilingual-cms/menu/navigation.php
new file mode 100644
index 0000000..6faeba8
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/navigation.php
@@ -0,0 +1,138 @@
+<?php     
+    require_once ICL_PLUGIN_PATH . '/sitepress.php'; 
+    $sitepress_settings = $sitepress->get_settings();
+    $cms_navigation_settings = $sitepress_settings['modules']['cms-navigation'];
+?>
+<?php $sitepress->noscript_notice() ?>
+<script type="text/javascript">        
+var icl_ajx_cache_cleared = '<?php echo icl_js_escape(__('The cache has been cleared.','sitepress')); ?>';
+</script>        
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv"><br /></div>
+    <h2><?php echo __('Setup WPML', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    
+    <h3><?php echo __('Navigation', 'sitepress') ?></h3>    
+    
+    <p><?php echo __('Out-of-the-box support for full CMS navigation in your WordPress site including drop down menus, breadcrumbs trail and sidebar navigation.', 'sitepress')?></p>
+
+    
+    <h4><?php echo __('Settings', 'sitepress')?></h4>
+    <form name="icl_navigation_form"  id="icl_navigation_form" action="">
+    <p class="icl_form_errors" style="display:none"></p>
+    <table class="form-table">
+        <tr valign="top">
+            <th scope="row"><label for="icl_navigation_page_order"><?php echo __('Page order', 'sitepress')?></label></th>
+            <td>
+                <select name="icl_navigation_page_order" id="icl_navigation_page_order">
+                <option value="menu_order" <?php if($cms_navigation_settings['page_order']=='menu_order'): ?>selected="selected"<?php endif;?>><?php echo __('Menu order', 'sitepress')?></option>
+                <option value="post_name" <?php if($cms_navigation_settings['page_order']=='post_name'): ?>selected="selected"<?php endif;?>><?php echo __('Alphabetically', 'sitepress')?></option>
+                <option value="post_date" <?php if($cms_navigation_settings['page_order']=='post_date'): ?>selected="selected"<?php endif;?>><?php echo __('Creation time', 'sitepress')?></option>
+                </select>
+            </td>
+        </tr>        
+        <tr valign="top">
+            <th scope="row"><?php echo __('Blog posts menu', 'sitepress')?></th>
+            <td>
+                <p><label for="icl_navigation_show_cat_menu"><input type="checkbox" id="icl_navigation_show_cat_menu" name="icl_navigation_show_cat_menu" value="1" <?php if($cms_navigation_settings['show_cat_menu']): ?>checked="checked"<?php endif ?> /> <?php _e('Show blog posts menu', 'sitepress')?></label></p>
+                
+                <div id="icl_cat_menu_contents" <?php if(!$cms_navigation_settings['show_cat_menu']): ?>style="display:none"<?php endif ?>>
+                    <?php if('page' != get_option('show_on_front') || !get_option('page_for_posts')): ?>
+                    <p>
+                    <label for="icl_navigation_cat_menu_title" <?php if(!$cms_navigation_settings['show_cat_menu']): ?>style="display:none"<?php endif;?>>
+                    <?php echo __('Categories menu title', 'sitepress')?>                
+                    <input type="text" id="icl_navigation_cat_menu_title" name="icl_navigation_cat_menu_title" value="<?php echo $cms_navigation_settings['cat_menu_title']?$cms_navigation_settings['cat_menu_title']:__('News','sitepress'); ?>" /></label>&nbsp;
+                    <label><?php _e('Page order', 'sitepress') ?><input type="text" name="icl_navigation_cat_menu_page_order" value="<?php echo intval($cms_navigation_settings['cat_menu_page_order']); ?>" size="3" /></label></p>                
+                    <?php endif; ?>
+                    <p>
+                    <?php _e('Select what items to display for the blog menu:', 'sitepress') ?>&nbsp;
+                    <label><input type="radio" name="icl_blog_menu_contents" value="categories" <?php if($cms_navigation_settings['cat_menu_contents']=='categories'): ?>checked="checked"<?php endif ?> /><?php _e('Categories', 'sitepress') ?></label>&nbsp;
+                    <label><input type="radio" name="icl_blog_menu_contents" value="posts" <?php if($cms_navigation_settings['cat_menu_contents']=='posts'): ?>checked="checked"<?php endif ?> /><?php _e('Recent posts', 'sitepress') ?></label>&nbsp;
+                    <label><input type="radio" name="icl_blog_menu_contents" value="nothing" <?php if($cms_navigation_settings['cat_menu_contents']=='nothing'): ?>checked="checked"<?php endif ?> /><?php _e('Nothing', 'sitepress') ?></label>
+                    </p>
+                </div>
+            </td>
+        </tr>
+        <tr valign="top">
+            <th scope="row"><?php echo __('Sidebar pages menu', 'sitepress')?></th>
+            <td valign="top">
+                <p style="padding-top:0;margin-top:3px;">
+                <label for="icl_navigation_heading_start"><?php echo __('Heading start', 'sitepress')?> <input type="text" size="6" id="icl_navigation_heading_start" name="icl_navigation_heading_start" value="<?php echo $cms_navigation_settings['heading_start'] ?>" /></label>
+                <label for="icl_navigation_heading_end"><?php echo __('Heading end', 'sitepress')?> <input type="text" size="6" id="icl_navigation_heading_end" name="icl_navigation_heading_end" value="<?php echo $cms_navigation_settings['heading_end'] ?>" /></label>
+                </p>
+            </td>
+        </tr>    
+        
+        <tr valign="top">
+            <th scope="row"><?php echo __('Breadcrumbs separator', 'sitepress')?></th>
+            <td valign="top">
+                <input type="text" name="icl_breadcrumbs_separator" value="<?php echo strip_tags($cms_navigation_settings['breadcrumbs_separator']) ?>" size="6" />
+            </td>
+        </tr>            
+        
+        <?php if(!defined('ICL_DISABLE_CACHE') || !ICL_DISABLE_CACHE):?>    
+        <tr><td colspan="2"><hr /></td></tr>
+        <tr valign="top">
+            <th scope="row"><?php echo __('Caching', 'sitepress')?></th>
+            <td>
+                <p>
+                <label for="icl_navigation_caching"><input type="checkbox" id="icl_navigation_caching" name="icl_navigation_caching" value="1" <?php if($cms_navigation_settings['cache']): ?>checked="checked"<?php endif ?> /> <?php echo __('Cache navigation elements for super fast performance', 'sitepress')?></label>
+                </p>
+                <input id="icl_navigation_caching_clear" class="button" name="icl_navigation_caching_clear" value="<?php echo __('Clear cache now', 'sitepress') ?>" type="button"/>
+                <span id="icl_ajx_response_clear_cache"></span>
+            </td>
+        </tr>     
+        <?php endif; ?>
+        
+    </table>
+    
+    <p class="submit">
+    <input class="button-primary" type="submit" value="<?php echo __('Save Changes', 'sitepress')?>" name="Submit"/>
+    <span class="icl_ajx_response" id="icl_ajx_response_nav"></span>
+    </p>  
+    
+    </form>  
+    
+    
+    <h4><?php echo __('Instructions for adding the navigation to your theme', 'sitepress')?></h4>
+    
+    <table class="widefat" cellspacing="0">
+    <thead>
+        <tr>
+            <th scope="col"><?php echo __('Navigation element', 'sitepress') ?></th>
+            <th scope="col"><?php echo __('Description', 'sitepress') ?></th>
+            <th scope="col"><?php echo __('HTML to add', 'sitepress') ?></th>        
+            <th scope="col"><?php echo __('Where to add', 'sitepress') ?></th>        
+        </tr>        
+    </thead>        
+    <tbody>
+        <tr>
+            <td scope="col" nowrap="nowrap"><?php echo __('Top navigation', 'sitepress') ?></td>          
+            <td scope="col"><?php echo __('A list of the top level pages with drop down menus for second level menus. Can optionally contain the post categories', 'sitepress') ?></td>          
+            <td scope="col" nowrap="nowrap"><code>&lt;?php  do_action('icl_navigation_menu'); ?&gt;</code></td>          
+            <td scope="col">header.php</td>          
+        </tr>
+        <tr>
+            <td scope="col" nowrap="nowrap"><?php echo __('Breadcrumbs trails', 'sitepress') ?></td>          
+            <td scope="col"><?php echo __('Lists the path back to the home page', 'sitepress') ?></td>          
+            <td scope="col" nowrap="nowrap"><code>&lt;?php  do_action('icl_navigation_breadcrumb', ['separator']); ?&gt;</code></td>          
+            <td scope="col"><?php printf(__('%s or %s, %s, %s, %s and %s', 'sitepress'), 'header.php', 'single.php', 'page.php', 'archive.php', 'tag.php', 'search.php');?></td>          
+        </tr>
+        <tr>
+            <td scope="col" nowrap="nowrap"><?php echo __('Sidebar navigation', 'sitepress'); ?> <sup>*</sup></td>          
+            <td scope="col"><?php echo __('Local navigation tree with page siblings, parent and brothers', 'sitepress') ?></td>          
+            <td scope="col" nowrap="nowrap"><code>&lt;?php  do_action('icl_navigation_sidebar'); ?&gt;</code></td>          
+            <td scope="col">sidebar.php</td>          
+        </tr>        
+    </tbody>        
+    </table>    
+    <p><sup>*</sup> <?php echo __('You can also add the sidebar navigation as a <a href="widgets.php">widget</a>.', 'sitepress')?></p>
+    
+    <p><?php echo __('To customize the appearance of the navigation elements, you will need to override the styling provided in the plugin\'s CSS file.', 'sitepress')?></p>
+    
+    <p><?php printf(__('Visit %s for full CSS customization information.', 'sitepress'), '<a href="http://wpml.org";>wpml.org</a>')?></p>
+    
+    <?php do_action('icl_menu_footer'); ?>
+    
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/overview.php b/wp-content/plugins/sitepress-multilingual-cms/menu/overview.php
new file mode 100644
index 0000000..0b34dcf
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/overview.php
@@ -0,0 +1,187 @@
+<?php 
+if($sitepress_settings['existing_content_language_verified']){
+    $active_languages = $sitepress->get_active_languages();    
+    $default_language = $sitepress->get_default_language();
+    foreach($active_languages as $lang){
+        if($default_language != $lang['code']){$default = '';}else{$default = ' ('.__('default','sitepress').')';}
+        $alanguages_links[] = $lang['display_name'] . $default;
+    }    
+    
+    if(2 <= count($sitepress->get_active_languages())){
+        $strings_need_update = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}icl_strings WHERE status <> 1");            
+    }
+}
+?>
+<?php $sitepress->noscript_notice() ?>
+<div class="wrap">
+    
+        <div id="icon-options-general" class="icon32 icon32_adv"><br /></div>
+        <h2><?php echo __('WPML Overview', 'sitepress') ?></h2>    
+        
+        <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+        
+        <p><?php printf(__('WPML makes it possible to run full multilingual websites with WordPress. You are using <b>WPML %s</b>.', 'sitepress'), ICL_SITEPRESS_VERSION)?></p>
+        
+        <?php do_action('icl_page_overview_top'); ?>
+        
+        <h3><?php _e('Multilingual', 'sitepress') ?></h3>
+        <table class="widefat">
+            <thead>
+                <tr>
+                    <th width="15%"><?php _e('Section', 'sitepress') ?></th>
+                    <th><?php _e('Description', 'sitepress') ?></th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr>
+                    <td><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/languages.php"><?php _e('Languages', 'sitepress')?></a></td>
+                    <td>                        
+                        <?php if(!$sitepress_settings['existing_content_language_verified']): ?>          
+                        <p><b><?php _e('Your site\'s languages are not set up yet.', 'sitepress'); ?></b></p>              
+                        <?php else: ?>
+                        <p>
+                            <?php _e('Currently configured languages:', 'sitepress')?> 
+                            <b><?php echo join(', ', (array)$alanguages_links)?></b>
+                        </p>
+                        <?php endif; ?>
+                        <p>
+                            <a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/languages.php' ?>"><?php echo __('Configure languages', 'sitepress') ?></a>
+                        </p>
+                    </td>
+                </tr>  
+
+                <?php if(2 <= count($sitepress->get_active_languages())) :?>
+                
+                <tr>
+                    <td><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/theme-localization.php"><?php _e('Theme and plugins localization', 'sitepress')?></a></td>
+                    <td>
+                        <p>
+                            <?php 
+                            echo __('Current configuration', 'sitepress');
+                            echo '<br /><strong>';
+                            switch($sitepress_settings['theme_localization_type']){
+                                case '1': echo __('Translate the theme by WPML', 'sitepress'); break;
+                                case '2': echo __('Using a .mo file in the theme directory', 'sitepress'); break;
+                                default: echo __('No localization', 'sitepress'); 
+                            }
+                            echo '</strong>';
+                            ?>
+                        </p>                                                                              
+                        <p><a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/theme-localization.php' ?>"><?php echo __('Manage theme and plugins localization', 'sitepress'); ?></a></p>                     
+                    </td>
+                </tr>                            
+                
+                <tr>
+                    <td><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/string-translation.php"><?php _e('String translation', 'sitepress')?></a></td>
+                    <td>
+                        <p><?php echo __('String translation allows you to enter translation for texts such as the site\'s title, tagline, widgets and other text not contained in posts and pages.', 'sitepress')?></p>
+                        <?php if($strings_need_update==1): ?>          
+                        <p><b><?php printf(__('There is <a href="%s"><b>1</b> string</a> that needs to be updated or translated. ', 'sitepress'), 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/string-translation.php&amp;status=0')?></b></p>                                      
+                        <?php elseif($strings_need_update): ?>          
+                        <p><b><?php printf(__('There are <a href="%s"><b>%s</b> strings</a> that need to be updated or translated. ', 'sitepress'), 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/string-translation.php&amp;status=0' ,$strings_need_update)?></b></p>              
+                        <?php else: ?>
+                        <p>
+                            <?php echo __('All strings are up to date.', 'sitepress'); ?>
+                        </p>
+                        <?php endif; ?>
+                        <p>
+                        <a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/string-translation.php' ?>"><?php echo __('Translate strings', 'sitepress') ?></a>
+                        </p>                                            
+                    </td>
+                </tr>
+                
+                <tr>
+                    <td><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/translation-synchronization.php"><?php _e('Translation synchronization', 'sitepress')?></a></td>
+                    <td><?php _e('Controls how to synchronize between contents in different languages.','sitepress') ?></td>
+                </tr>
+                
+                <tr>
+                    <td><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/comments-translation.php"><?php _e('Comments translation', 'sitepress')?></a></td>
+                    <td>
+                        <?php _e('WPML can translate comments that visitors leave you in languages that you don\'t speak and translate back your replies.','sitepress') ?>
+                        <?php if(!$sitepress->icl_account_configured() || !$sitepress->get_icl_translation_enabled()): ?>
+                        <br />
+                        <?php printf(__('To translate your replies, you need to enable <a href="%s">professional translation</a>.','sitepress'),'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/content-translation.php')?>
+                        <?php endif; ?>
+                    </td>
+                </tr>
+
+                <tr>
+                    <td><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/content-translation.php"><?php _e('Professional translation', 'sitepress')?></a></td>
+                    <td>
+                        <p><b><?php _e('ICanLocalize can translate your site\'s contents professionally.', 'sitepress'); ?></b></p>
+                        <p><?php _e('WPML will send the documents that need translation to ICanLocalize and then create the translated posts and pages.','sitepress'); ?></p>
+                        
+                        <p><a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/content-translation.php' ?>"><?php echo __('Manage professional translation', 'sitepress') ?></a>
+                        </p>
+                    </td>
+                </tr>
+                
+                <?php endif; //if(2 <= count($sitepress->get_active_languages())) ?>
+                
+            </tbody>
+        </table>
+        
+        <br />
+        <h3><?php _e('CMS navigation', 'sitepress') ?></h3>
+        <table class="widefat">
+            <thead>
+                <tr>
+                    <th width="15%"><?php _e('Section', 'sitepress') ?></th>
+                    <th><?php _e('Description', 'sitepress') ?></th>
+                </tr>
+            </thead>
+            <tbody>
+                <tr>
+                    <td>
+                        <?php if($sitepress_settings['modules']['cms-navigation']['enabled']):?><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/navigation.php"><?php endif;?>
+                        <?php _e('Navigation', 'sitepress')?>
+                        <?php if($sitepress_settings['modules']['cms-navigation']['enabled']):?></a><?php endif;?>
+                    </td>
+                    <td>
+                        <p>
+                            <?php echo __('WPML provides advanced menus and navigation to go with your WordPress website, including drop-down menus, breadcrumbs and sidebar navigation.', 'sitepress')?>
+                        </p>
+                        <?php if(!$sitepress_settings['modules']['cms-navigation']['enabled']):?>
+                        <p><b><?php echo __('CMS Navigation is disabled.','sitepress') ?></b></p>
+                        <p><a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/overview.php&amp;enable-cms-navigation=1' ?>"><?php echo __('Enable CMS navigation', 'sitepress') ?></a></p>
+                        <?php else: ?>
+                        <p><b><?php echo __('CMS Navigation is enabled.','sitepress') ?></b></p>
+                        <p>
+                            <a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/navigation.php' ?>"><?php echo __('Configure navigation', 'sitepress') ?></a>
+                            <a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/overview.php&amp;enable-cms-navigation=0' ?>"><?php echo __('Disable CMS navigation', 'sitepress') ?></a>
+                        </p>        
+                        <?php endif; ?>            
+                    </td>
+                </tr>            
+                <tr>
+                    <td>
+                        <?php if($sitepress_settings['modules']['absolute-links']['enabled']):?><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH)?>/menu/absolute-links.php"><?php endif; ?>
+                        <?php _e('Sticky links', 'sitepress')?>
+                        <?php if($sitepress_settings['modules']['absolute-links']['enabled']):?></a><?php endif; ?>
+                    </td>
+                    <td>
+                        <p><?php echo __('With Sticky Links, WPML can automatically ensure that all links on posts and pages are up-to-date, should their URL change.', 'sitepress'); ?></p>
+                    
+                        <?php if($sitepress_settings['modules']['absolute-links']['enabled']):?>
+                        <p><b><?php echo __('Sticky links are enabled.','sitepress') ?></b></p>
+                        <p>
+                            <a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/absolute-links.php' ?>"><?php echo __('Configure sticky links', 'sitepress') ?></a>
+                            <a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/overview.php&amp;icl_enable_alp=0' ?>"><?php echo __('Disable sticky links', 'sitepress') ?></a>
+                        </p>                    
+                        
+                        <?php else: ?>
+                        <p><b><?php echo __('Sticky links are disabled.','sitepress') ?></b></p>
+                        <p><a class="button secondary" href="<?php echo 'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/overview.php&amp;icl_enable_alp=1' ?>"><?php echo __('Enable sticky links', 'sitepress') ?></a></p>
+                        <?php endif; ?>
+                    </td>
+                </tr>                            
+            </tbody>
+        </table>
+        
+        <br />
+        <p><?php echo(sprintf(__('For advanced access or to completely uninstall WPML and remove all language information, use the <a href="%s">troubleshooting</a> page.','sitepress'),'admin.php?page='.basename(ICL_PLUGIN_PATH).'/menu/troubleshooting.php')); ?></p>
+        
+        <?php do_action('icl_menu_footer'); ?>
+    
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/post-menu.php b/wp-content/plugins/sitepress-multilingual-cms/menu/post-menu.php
new file mode 100644
index 0000000..9643c75
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/post-menu.php
@@ -0,0 +1,288 @@
+<?php $this->noscript_notice() ?>
+<p style="float:left;">
+<?php printf(__('Language of this %s', 'sitepress'), strtolower($wp_post_types[$post->post_type]->singular_label)); ?>&nbsp;
+<select name="icl_post_language" id="icl_post_language">
+<?php foreach($active_languages as $lang):?>
+<?php if(isset($translations[$lang['code']]->element_id) && $translations[$lang['code']]->element_id != $post->ID) continue ?>
+<option value="<?php echo $lang['code'] ?>" <?php if($selected_language==$lang['code']): ?>selected="selected"<?php endif;?>><?php echo $lang['display_name'] ?>&nbsp;</option>
+<?php endforeach; ?>
+</select> 
+
+<input type="hidden" name="icl_trid" value="<?php echo $trid ?>" />
+
+<?php /*<input type="hidden" name="icl_is_page" value="<?php echo $is_page ?>" /> */?>
+
+</p>
+
+<div id="translation_of_wrap">
+    <?php if($selected_language != $default_language || (isset($_GET['lang']) && $_GET['lang']!=$default_language)): ?>
+        <div style="clear:both;font-size:1px">&nbsp;</div>
+        
+        <p style="float:left;">
+        <?php echo __('This is a translation of', 'sitepress') ?>&nbsp;
+        <select name="icl_translation_of" id="icl_translation_of"<?php if($_GET['action'] != 'edit' && $trid) echo ' disabled="disabled"';?>>
+            <?php if($source_language == null || $source_language == $default_language): ?>
+                <?php if($trid): ?>
+                    <option value="none"><?php echo __('--None--', 'sitepress') ?></option>                    
+                    <?php
+                        //get source
+                        $src_language_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$trid} AND language_code='{$default_language}'");                        
+                        if(!$src_language_id) {
+                            // select the first id found for this trid
+                            $src_language_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$trid}");
+                        }                                                      
+                        if($src_language_id && $src_language_id != $post->ID) {
+                            $src_language_title = $wpdb->get_var("SELECT post_title FROM {$wpdb->prefix}posts WHERE ID = {$src_language_id}");                            
+                        }
+                    ?>
+                    <?php if($src_language_title && !isset($_GET['icl_ajx'])): ?>
+                        <option value="<?php echo $src_language_id ?>" selected="selected"><?php echo $src_language_title ?>&nbsp;</option>
+                    <?php endif; ?>
+                <?php else: ?>
+                    <option value="none" selected="selected"><?php echo __('--None--', 'sitepress') ?></option>
+                <?php endif; ?>
+                <?php foreach($untranslated as $translation_of_id => $translation_of_title):?>
+                    <?php if ($translation_of_id != $src_language_id): ?>
+                        <option value="<?php echo $translation_of_id ?>"><?php echo $translation_of_title ?>&nbsp;</option>
+                    <?php endif; ?>
+                <?php endforeach; ?>
+            <?php else: ?>
+                <?php if($trid): ?>
+                    <?php
+                        // add the source language
+                        $src_language_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$trid} AND language_code='{$source_language}'");
+                        if($src_language_id) {
+                            $src_language_title = $wpdb->get_var("SELECT post_title FROM {$wpdb->prefix}posts WHERE ID = {$src_language_id}");
+                        }
+                    ?>
+                    <?php if($src_language_title): ?>
+                        <option value="<?php echo $src_language_id ?>" selected="selected"><?php echo $src_language_title ?></option>
+                    <?php endif; ?>
+                <?php else: ?>
+                    <option value="none" selected="selected"><?php echo __('--None--', 'sitepress') ?></option>
+                <?php endif; ?>
+            <?php endif; ?>
+        </select>
+
+        </p>
+    <?php endif; ?>
+</div><!--//translation_of_wrap-->
+
+<div style="clear:both;font-size:1px">&nbsp;</div>
+
+<?php if($_GET['action'] == 'edit' && $trid): ?>       
+<?php 
+    $translations_count = count($translations) - 1;
+    $language_count = count($active_languages) - 1;        
+    
+    // get languages with translators
+    $languages_translated = $languages_not_translated = array();
+    foreach((array)$this->settings['icl_lang_status'] as $k=>$language_pair){
+        if(!is_numeric($k)) continue;
+        if($language_pair['from'] == $selected_language && !empty($language_pair['translators'])){
+            $languages_translated[] = $language_pair['to'];
+            $lang_rates[$language_pair['to']] = $language_pair['max_rate'];
+        }
+    }
+    $languages_not_translated = array_diff(array_keys($active_languages), array_merge(array($selected_language), $languages_translated));
+    
+    // previous translations
+    foreach($languages_translated as $l){
+        $language_names[] = $active_languages[$l]['english_name'];    
+    }    
+    if(!empty($language_names)){
+        $previous_rid = icl_get_request_ids_for_post($post->ID, $selected_language, apply_filters('icl_server_languages_map', $language_names));
+    }
+    if(!empty($previous_rid)){
+        foreach($previous_rid as $serverlang => $pr){
+            if(!empty($pr)){
+                $_target_lang = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE english_name='".$wpdb->escape(apply_filters('icl_server_languages_map', $serverlang, true))."'");
+                $status = $wpdb->get_var("SELECT status FROM {$wpdb->prefix}icl_core_status WHERE rid={$pr}");
+                $was_translated = $wpdb->get_var("
+                            SELECT cr.status 
+                            FROM {$wpdb->prefix}icl_content_status cs 
+                                JOIN {$wpdb->prefix}icl_core_status cr ON cr.rid = cs.rid 
+                            WHERE 
+                                
+                                cr.origin ='{$selected_language}'
+                                AND target = '{$_target_lang}'
+                                AND cs.nid = {$post->ID} 
+                                AND cr.status = ".CMS_TARGET_LANGUAGE_DONE."
+                            LIMIT 1");
+                if($was_translated){
+                    $langs_done[apply_filters('icl_server_languages_map', $serverlang, true)] = 1;
+                }         
+                if(!is_null($status) && $status != CMS_TARGET_LANGUAGE_DONE){
+                    // translation is still in progress for one or more languages.
+                    $langs_in_progress[apply_filters('icl_server_languages_map', $serverlang, true)] = 1;
+                }
+                
+                // needs update ?
+                if($wpdb->get_var("SELECT n.md5<>c.md5 FROM {$wpdb->prefix}icl_node n JOIN {$wpdb->prefix}icl_content_status c ON n.nid = c.nid WHERE n.nid={$post->ID} AND c.rid={$pr}")){
+                    $langs_need_update[apply_filters('icl_server_languages_map', $serverlang, true)] = 1;
+                }
+            }
+        }        
+    }
+    ?>
+    <div class="icl_cyan_box">
+    <strong><?php _e('Professional translation', 'sitepress'); ?></strong>    
+    <div id="icl_pt_controls" <?php if($this->settings['hide_professional_translation_controls']):?>style="display:none;"<?php endif; ?>>
+    <?php 
+        if(!empty($languages_translated)){ 
+            echo '<ul>';
+            foreach($languages_translated as $lang){
+                if(isset($langs_in_progress[$active_languages[$lang]['english_name']]) || 
+                    ($langs_done[$active_languages[$lang]['english_name']] && !isset($langs_need_update[$active_languages[$lang]['english_name']]))){
+                    $disabled = ' disabled="disabled"';
+                }else{
+                    $disabled = '';
+                }
+                echo '<li><label>';
+                echo '<input type="hidden" id="icl_pt_rate_'.$lang.'" value="'.$lang_rates[$lang].'" />';
+                echo '<input type="checkbox" id="icl_pt_to_'.$lang.'" value="'.$active_languages[$lang]['english_name'].'"'.$disabled.'/>&nbsp;';
+                if(isset($langs_done[$active_languages[$lang]['english_name']])){
+                    printf(__('Update %s translation', 'sitepress'), $active_languages[$lang]['display_name']);
+                }else{
+                    printf(__('Translate to %s', 'sitepress'), $active_languages[$lang]['display_name']);
+                }
+                echo '</label></li>';
+            }    
+            echo '</ul>';
+        }
+        if(!empty($languages_not_translated)){ 
+            echo '<ul>';
+            foreach($languages_not_translated as $lang){
+                echo '<li>'.$this->create_icl_popup_link("@select-translators;{$selected_language};{$lang}@", 
+                    array(
+                        'ar'=>1, 
+                        'title'=>__('Select translators', 'sitepress'),
+                        'unload_cb' => 'icl_pt_reload_translation_box'
+                    )
+                ); // <a> included
+                printf(__('Get %s translators', 'sitepress'), $active_languages[$lang]['display_name']);
+                echo '</a></li>';
+            }    
+            echo '</ul>';            
+        }
+        
+        $note = trim(get_post_meta($post->ID, '_icl_translator_note', true));
+    ?>
+    <div id="icl_post_add_notes">
+        <h4><a href="#"><?php _e('Note for the translators', 'sitepress')?></a></h4>
+        <div id="icl_post_note">
+            <textarea id="icl_pt_tn_note" name="icl_tn_note" rows="5"><?php echo $note ?></textarea> 
+            <table width="100%"><tr>
+            <td><input id="icl_tn_clear" type="button" class="button" value="<?php _e('Clear', 'sitepress')?>" <?php if(!$note): ?>disabled="disabled"<?php endif; ?> /></td>            <td align="right"><input id="icl_tn_save"  type="button" class="button-primary" value="<?php _e('Close', 'sitepress')?>" /></td>
+            </tr></table>
+            <input id="icl_tn_cancel_confirm" type="hidden" value="<?php _e('Your changes to the note for the translators are not saved.', 'sitepress') ?>" />
+        </div>
+        <div id="icl_tn_not_saved"><?php _e('Note not saved yet', 'sitepress'); ?></div>
+    </div>    
+    
+    <div style="text-align: right;margin:0 5px 5px 0;"><?php _e('Cost:', 'sitepress')?>&nbsp;<span id="icl_pt_cost_estimate">0.00</span> USD</div>
+    
+    <input type="hidden" id="icl_pt_wc" value="<?php echo icl_estimate_word_count($post, $selected_language) + icl_estimate_custom_field_word_count($post->ID, $selected_language) ?>" />
+    <input type="hidden" id="icl_pt_post_id" value="<?php echo $post->ID ?>" />
+    <input type="hidden" id="icl_pt_post_type" value="<?php echo $post->post_type ?>" />
+    <input type="button" disabled="disabled" id="icl_pt_send" class="button-primary alignright" value="<?php echo esc_html(__('Send to translation', 'sitepress')) ?>"/>
+    </div>
+    <a id="icl_pt_hide" href="#" style="position:relative;top:12px;<?php if($this->settings['hide_professional_translation_controls']):?>display:none;<?php endif; ?>"><?php _e('hide', 'sitepress') ?></a>
+    <a id="icl_pt_show" href="#" style="float:right;<?php if(!$this->settings['hide_professional_translation_controls']):?>display:none;<?php endif; ?>"><?php _e('show', 'sitepress') ?></a>
+    <div class="clear" style="font-size: 0px">&nbsp;</div>
+    
+    <div id="icl_pt_error" class="icl_error_text" style="display: none;margin-top: 4px;"><?php _e('Failed sending to translation.', 'sitepress') ?></div>    
+    <?php if(isset($_GET['icl_message']) && $_GET['icl_message']=='success'):?>
+    <div id="icl_pt_success" class="icl_valid_text" style="margin-top: 8px;"><?php _e('Sent to translation.', 'sitepress') ?></div>    
+    <?php endif; ?>
+    </div>    
+    
+    <?php do_action('icl_post_languages_options_before', $post->ID);?>
+
+    <div id="icl_translate_options">
+    <?php
+        // count number of translated and un-translated pages.
+        $translations_found = 0;
+        $untranslated_found = 0;
+        foreach($active_languages as $lang) {
+            if($selected_language==$lang['code']) continue;
+            if(isset($translations[$lang['code']]->element_id)) {
+                $translations_found += 1;
+            } else {
+                $untranslated_found += 1;
+            }
+        }
+    ?>
+    
+    <?php if($untranslated_found > 0): ?>    
+        <?php if($this->get_icl_translation_enabled()):?>
+            <p style="clear:both;"><b><?php _e('or, translate manually:', 'sitepress'); ?> </b>
+        <?php else: ?>
+            <p style="clear:both;"><b><?php _e('Translate yourself', 'sitepress'); ?></b>
+        <?php endif; ?>
+        <table>
+        <?php foreach($active_languages as $lang): if($selected_language==$lang['code']) continue; ?>
+        <tr>
+            <?php if(!isset($translations[$lang['code']]->element_id)):?>
+                <td><?php echo $lang['display_name'] ?></td>
+                <?php
+                    $add_link = get_option('siteurl') . "/wp-admin/post-new.php?post_type={$post->post_type}&trid=" . $trid . "&lang=" . $lang['code'] . "&source_lang=" . $selected_language;
+                ?>
+                <td><a href="<?php echo $add_link?>"><?php echo __('add','sitepress') ?></a></td>
+            <?php endif; ?>        
+        </tr>
+        <?php endforeach; ?>
+        </table>
+        </p>
+    <?php endif; ?>
+    <?php if($translations_found > 0): ?>    
+        <p style="clear:both;">
+            <b><?php _e('Translations', 'sitepress') ?></b> 
+            (<a class="icl_toggle_show_translations" href="#" <?php if(!$this->settings['show_translations_flag']):?>style="display:none;"<?php endif;?>><?php _e('hide','sitepress')?></a><a class="icl_toggle_show_translations" href="#" <?php if($this->settings['show_translations_flag']):?>style="display:none;"<?php endif;?>><?php _e('show','sitepress')?></a>)                
+        <table width="97%" cellspacing="1" id="icl_translations_table" <?php if(!$this->settings['show_translations_flag']):?>style="display:none;"<?php endif;?>>        
+        <?php foreach($active_languages as $lang): if($selected_language==$lang['code']) continue; ?>
+        <tr>
+            <?php if(isset($translations[$lang['code']]->element_id)):?>
+                <td><?php echo $lang['display_name'] ?></td>
+                <td align="right" width="20%"><?php echo isset($translations[$lang['code']]->post_title)?'<a href="'.get_edit_post_link($translations[$lang['code']]->element_id).'" title="'.__('Edit','sitepress').'">'.apply_filters('the_title', __('edit','sitepress')).'</a>':__('n/a','sitepress') ?></td>
+                
+            <?php endif; ?>        
+        </tr>
+        <?php endforeach; ?>
+        </table>
+        
+        <?php if($this->get_icl_translation_enabled()):?>
+            <p style="clear:both;"><b><?php echo __('ICanlocalize translation status:', 'sitepress') ?></b> (<a href="javascript:;" 
+            onclick="jQuery('#icl_translations_status').toggle();jQuery('#noupdate_but').toggle();if(jQuery(this).html()=='<?php echo __('hide','sitepress')?>') jQuery(this).html('<?php echo __('show','sitepress')?>'); else jQuery(this).html('<?php echo __('hide','sitepress')?>')"><?php echo __('show','sitepress')?></a>)</p>
+
+            <?php icl_display_post_translation_status($post->ID, &$post_translation_statuses, true); ?>
+            <table width="100%" id="icl_translations_status" style="display:none;">
+            
+            <?php foreach($active_languages as $lang): if($selected_language==$lang['code']) continue; ?>
+            <tr>
+                <?php if(isset($translations[$lang['code']]->element_id)):?>
+                    <td><?php echo $lang['display_name'] ?></td>
+                    <td class="icl_translation_status_msg">
+                    <?php echo isset($post_translation_statuses[$lang['code']]) ? $post_translation_statuses[$lang['code']] : __('Not translated','sitepress'); ?>
+                    </td>
+                    
+                <?php endif; ?>        
+            </tr>
+            <?php endforeach; ?>
+            </table>
+        <?php endif; ?>
+        
+        
+        
+    <?php endif; ?>
+    
+    <br clear="all" style="line-height:1px;" />
+    </div>
+<?php endif; ?>
+
+<?php if($this->get_icl_translation_enabled() 
+        && !$wpdb->get_var("SELECT source_language_code FROM {$wpdb->prefix}icl_translations WHERE element_type='post' AND element_id={$post->ID}") 
+        && !isset($_GET['source_lang'])):?>
+<?php endif; ?>
+
+<?php do_action('icl_post_languages_options_after') ?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/string-translation-translate-options.php b/wp-content/plugins/sitepress-multilingual-cms/menu/string-translation-translate-options.php
new file mode 100644
index 0000000..e8cde22
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/string-translation-translate-options.php
@@ -0,0 +1,44 @@
+<?php 
+    $troptions = icl_st_scan_options_strings();
+?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv"><br /></div>
+    <h2><?php echo __('String translation', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+
+    <?php if(!empty($troptions)): ?>
+    <div id="icl_st_option_writes">
+    <p><?php _e('This table shows all the admin texts that WPML  found.', 'sitepress'); ?></p>
+    <p><?php printf(__('The fields with <span%s>cyan</span> background are text fields and the fields with <span%s>gray</span> background are numeric.', 'sitepress'),' class="icl_st_string"',' class="icl_st_numeric"'); ?></p>
+    <p><?php printf(__("Choose the fields you'd like to translate and click on the 'Apply' button. Then, use WPML's <a%s>String translation</a> to translate them.", 'sitepress'),' href="admin.php?page='.ICL_PLUGIN_FOLDER.'/menu/string-translation.php&context=admin_options_'.get_option('template').'"'); ?></p>    
+    
+    <p>
+        <input type="button" class="button" id="icl_st_ow_export" value="<?php _e('Export selected strings as PHP code to be added to the theme code', 'sitepress'); ?>" />
+        <input type="button" class="button-primary" id="icl_st_ow_export_close" value="<?php _e('Close', 'sitepress')?>" />
+        <img class="ajax_loader" src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" style="display:none" width="16" height="16" />
+    </p>
+    <p id="icl_st_ow_export_out"></p>
+    
+    <form name="icl_st_option_writes_form" id="icl_st_option_write_form">    
+        
+    <?php foreach($troptions as $option_name=>$option_value): ?>
+    <?php echo icl_st_render_option_writes($option_name, $option_value); ?>
+    <br clear="all" />
+    <?php endforeach; ?>    
+    <span id="icl_st_options_write_success" class="hidden updated message fade"><?php printf(__('The selected strings can now be translated using the <a%s>string translation</a> screen', 'sitepress'), ' href="admin.php?page='.ICL_PLUGIN_FOLDER.'/menu/string-translation.php&context=admin_options_'.get_option('template').'"');?></span>
+    <span id="icl_st_options_write_confirm" class="hidden"><?php _e('You have removed some of the texts that are translated already. The translations will be lost.','sitepress')?></span>
+    <p class="submit">
+        <input type="submit" value="<?php _e('Apply', 'sitepress');?>" />
+        <span class="icl_ajx_response" id="icl_ajx_response"></span>
+    </p>
+    
+    
+    
+    </form>
+    </div>
+    <?php else: ?>
+    <div align="center"><?php _e('No options found. Make sure you saved your theme options at least once. <br />Some themes only add these to the wp_options table after the user explicitly saves over the theme defaults', 'sitepress') ?></div>
+    <?php endif; ?>
+    
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/string-translation.php b/wp-content/plugins/sitepress-multilingual-cms/menu/string-translation.php
new file mode 100644
index 0000000..6e5a212
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/string-translation.php
@@ -0,0 +1,599 @@
+<?php 
+if((!isset($sitepress_settings['existing_content_language_verified']) || !$sitepress_settings['existing_content_language_verified']) /*|| 2 > count($sitepress->get_active_languages())*/){
+    return;
+}
+
+if(isset($_GET['trop']) && $_GET['trop'] > 0){
+    include dirname(__FILE__) . '/string-translation-translate-options.php';
+    return;
+}
+
+$status_filter = isset($_GET['status']) ? intval($_GET['status']) : false;
+$context_filter = isset($_GET['context']) ? $_GET['context'] : false;
+$search_filter = isset($_GET['search']) ? $_GET['search'] : false;
+$exact_match = isset($_GET['em']) ? $_GET['em'] == 1 : false;
+
+$icl_string_translations = icl_get_string_translations();
+if(!empty($icl_string_translations)){
+    $icl_strings_in_page = icl_get_strigs_tracked_in_pages($icl_string_translations);
+}
+$active_languages = $sitepress->get_active_languages();            
+$icl_contexts = icl_st_get_contexts($status_filter);
+
+/*
+if($status_filter != ICL_STRING_TRANSLATION_COMPLETE){
+    $icl_contexts_translated = icl_st_get_contexts(ICL_STRING_TRANSLATION_COMPLETE);
+}else{
+    $icl_contexts_translated = $icl_contexts;
+}
+*/
+$icl_st_translation_enabled = $sitepress->icl_account_configured() && $sitepress->get_icl_translation_enabled();
+
+$available_contexts = array();
+if(!empty($icl_contexts)){
+    foreach($icl_contexts as $c){
+        if($c) $available_contexts[] = $c->context;
+    }                                                
+}
+if(is_array($sitepress_settings['st']['theme_localization_domains'])){
+    foreach($sitepress_settings['st']['theme_localization_domains'] as $c){
+        if($c) $available_contexts[] = 'theme ' . $c;
+    }
+}
+$available_contexts = array_unique($available_contexts);
+if(!$sitepress_settings['st']['strings_language']){
+    $iclsettings['st']['strings_language'] = $sitepress_settings['st']['strings_language'] = $sitepress->get_default_language();
+    $sitepress->save_settings($iclsettings);
+}
+?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv"><br /></div>
+    <h2><?php echo __('String translation', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    
+    <?php if(isset($icl_st_po_strings) && !empty($icl_st_po_strings)): ?>
+    
+        <p><?php printf(__('These are the strings that we found in your .po file. Please carefully review them. Then, click on the \'add\' or \'cancel\' buttons at the <a href="%s">bottom of this screen</a>. You can exclude individual strings by clearing the check boxes next to them.', 'sitepress'), '#add_po_strings_confirm'); ?></p>        
+        <form method="post" action="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH) ?>/menu/string-translation.php">
+        <?php if(isset($_POST['icl_st_po_translations'])): ?>
+        <input type="hidden" name="icl_st_po_language" value="<?php echo $_POST['icl_st_po_language'] ?>" />
+        <?php endif; ?>
+        <input type="hidden" name="icl_st_domain_name" value="<?php echo $_POST['icl_st_i_context_new']?$_POST['icl_st_i_context_new']:$_POST['icl_st_i_context'] ?>" />
+        
+        <table id="icl_po_strings" class="widefat" cellspacing="0">
+            <thead>
+                <tr>
+                    <th scope="col" class="manage-column column-cb check-column"><input type="checkbox" checked="checked" name="" /></th>
+                    <th><?php echo __('String', 'sitepress') ?></th>
+                </tr>
+            </thead>
+            <tfoot>
+                <tr>
+                    <th scope="col" class="manage-column column-cb check-column"><input type="checkbox" checked="checked" name="" /></th>
+                    <th><?php echo __('String', 'sitepress') ?></th>
+                </tr>
+            </tfoot>        
+            <tbody>
+                <?php $k = -1; foreach($icl_st_po_strings as $str): $k++; ?>
+                    <tr>
+                        <td><input class="icl_st_row_cb" type="checkbox" name="icl_strings_selected[]" 
+                            <?php if($str['exists'] || !isset($_POST['icl_st_po_translations'])): ?>checked="checked"<?php endif;?> value="<?php echo $k ?>" /></td>
+                        <td>
+                            <input type="text" name="icl_strings[]" value="<?php echo htmlspecialchars($str['string']) ?>" readonly="readonly" style="width:100%;" size="100" />
+                            <?php if(isset($_POST['icl_st_po_translations'])):?>
+                            <input type="text" name="icl_translations[]" value="<?php echo htmlspecialchars($str['translation']) ?>" readonly="readonly" style="width:100%;<?php if($str['fuzzy']):?>;background-color:#ffecec<?php endif; ?>" size="100" />
+                            <input type="hidden" name="icl_fuzzy[]" value="<?php echo $str['fuzzy'] ?>" />
+                            <?php endif; ?>
+                        </td>
+                    </tr>
+                <?php endforeach; ?>
+            </tbody>
+        </table>            
+        <a name="add_po_strings_confirm"></a>        
+        <p><input class="button" type="button" value="<?php echo __('Cancel', 'sitepress'); ?>" onclick="location.href='admin.php?page=<?php echo $_GET['page'] ?>'" />
+        &nbsp; <input class="button-primary" type="submit" name="icl_st_save_strings" value="<?php echo __('Add selected strings', 'sitepress'); ?>" />
+        </p>
+        </form>
+        
+    <?php elseif(isset($icl_st_preview_strings) && !empty($icl_st_preview_strings)): ?>
+        <h3><?php echo __('Preview strings','sitepress') ?></h3>
+        <form name="icl_st_do_send_strings" id="icl_st_do_send_strings" method="post" action="">
+        <input type="hidden" name="strings" value="<?php echo $_POST['strings'] ?>" />
+        <input type="hidden" name="languages" value="<?php echo $_POST['langs'] ?>" />
+        <table id="icl_preview_strings" class="widefat" cellspacing="0">
+            <thead>
+                <tr>                    
+                    <th><?php echo __('String', 'sitepress') ?></th>
+                    <th scope="col" style="text-align:right"><?php echo __('Word count', 'sitepress') ?></th>
+                    <th scope="col" style="text-align:right"><?php _e('Cost', 'sitepress'); ?></th>
+                </tr>
+            </thead>
+            <tbody>
+                <?php 
+                    $total_cost = $total_wc = $total_rate = 0; 
+                    $languages_to = explode(",",$_POST['langs']);
+                    $total_langs = count($languages_to);         
+                    foreach($_POST['icl_tr_rate'] as $k=>$v){
+                        if(in_array($k, $languages_to)){
+                            $total_rate += $v;
+                        }
+                    }                               
+                ?>
+                <?php foreach($icl_st_preview_strings as $string): ?>
+                    <?php 
+                        $wc = count(explode(' ',$string->value)); $total_wc += $wc;
+                        $cost = $wc * $total_rate;
+                        $total_cost += $cost;
+                    ?>
+                    <tr>                        
+                        <td><?php echo htmlspecialchars($string->value) ?></td>
+                        <td align="right"><?php echo $wc ?></td>
+                        <td align="right"><?php echo '$'; echo money_format($cost, 2); ?></td>
+                    </tr>
+                <?php endforeach; ?>
+            </tbody>
+            <tfoot>
+                <tr>
+                    <th><?php echo __('Total', 'sitepress'); ?></th>
+                    <th style="text-align:right"><?php echo $total_wc; ?></th>
+                    <th style="text-align:right"><?php echo '$'; echo money_format($total_cost,2); ?></th>
+                </tr>
+            </tfoot>                    
+        </table>    
+        <p>
+            <input class="button" type="button" value="<?php echo __('Cancel', 'sitepress'); ?>" onclick="history.back()" />&nbsp; 
+            <input class="button-primary" type="submit" value="<?php echo __('Send to translation', 'sitepress'); ?>" />
+            &nbsp;<span id="icl_st_send_progress" class="icl_ajx_response" style="display:none;"><?php echo __('Sending translation requests. Please wait!', 'sitepress') ?>&nbsp;<img src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" alt="loading" /></span>
+        </p>
+        </form>        
+    <?php else: ?>
+    
+        <p style="line-height:220%;">
+        <?php echo __('Select which strings to display:', 'sitepress')?>
+        <select name="icl_st_filter_status">
+            <option value="" <?php if($status_filter === false ):?>selected="selected"<?php endif;?>><?php echo __('All strings', 'sitepress') ?></option>        
+            <option value="<?php echo ICL_STRING_TRANSLATION_COMPLETE ?>" <?php if($status_filter === ICL_STRING_TRANSLATION_COMPLETE):?>selected="selected"<?php endif;?>><?php echo $icl_st_string_translation_statuses[ICL_STRING_TRANSLATION_COMPLETE] ?></option>
+            <option value="<?php echo ICL_STRING_TRANSLATION_NOT_TRANSLATED ?>" <?php if($status_filter === ICL_STRING_TRANSLATION_NOT_TRANSLATED):?>selected="selected"<?php endif;?>><?php echo __('Translation needed', 'sitepress') ?></option>
+        </select>
+        
+        <?php if(!empty($icl_contexts)): ?>
+        &nbsp;&nbsp;
+        <span style="white-space:nowrap">
+        <?php echo __('Select strings within context:', 'sitepress')?>
+        <select name="icl_st_filter_context">
+            <option value="" <?php if($context_filter === false ):?>selected="selected"<?php endif;?>><?php echo __('All contexts', 'sitepress') ?></option>
+            <?php foreach($icl_contexts as $v):?>
+            <option value="<?php echo htmlspecialchars($v->context)?>" <?php if($context_filter == $v->context ):?>selected="selected"<?php endif;?>><?php echo $v->context . ' ('.$v->c.')'; ?></option>
+            <?php endforeach; ?>
+        </select>    
+        </span>
+        <?php endif; ?>
+        
+        &nbsp;&nbsp;
+        <span style="white-space:nowrap">
+        <label>
+        <?php echo __('Search for:', 'sitepress')?>
+        <input type="text" id="icl_st_filter_search" value="<?php echo $search_filter ?>" />
+        </label>
+        
+        <label>
+        <input type="checkbox" id="icl_st_filter_search_em" value="1" <?php if($exact_match):?>checked="checked"<?php endif;?> />
+        <?php echo __('Exact match', 'sitepress')?>
+        </label>
+        
+        <input class="button" type="button" value="<?php _e('Search', 'sitepress')?>" id="icl_st_filter_search_sb" />
+        </span>
+        
+        <?php if($search_filter): ?>
+        <span style="white-space:nowrap">
+        <?php printf(__('Showing only strings that contain %s', 'sitepress'), '<i>' . htmlspecialchars($search_filter). '</i>') ; ?>
+        <input class="button" type="button" value="<?php _e('Exit search', 'sitepress')?>" id="icl_st_filter_search_remove" />
+        </span>
+        <?php endif; ?>
+        
+        </p>
+    
+        <table id="icl_string_translations" class="widefat" cellspacing="0">
+            <thead>
+                <tr>
+                    <th scope="col" class="manage-column column-cb check-column"><input type="checkbox" /></th>
+                    <th scope="col"><?php echo __('Context', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('Name', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('View', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('String', 'sitepress') ?></th>        
+                    <th scope="col"><?php echo __('Status', 'sitepress') ?></th>
+                </tr>        
+            </thead>        
+            <tfoot>
+                <tr>
+                    <th scope="col" class="manage-column column-cb check-column"><input type="checkbox" /></th>
+                    <th scope="col"><?php echo __('Context', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('Name', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('View', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('String', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('Status', 'sitepress') ?></th>        
+                </tr>        
+            </tfoot>                
+            <tbody>
+                <?php if(empty($icl_string_translations)):?> 
+                <tr>
+                    <td colspan="6" align="center"><?php echo __('No strings found', 'sitepress')?></td>
+                </tr>
+                <?php else: ?>
+                <?php foreach($icl_string_translations as $string_id=>$icl_string): ?> 
+                <tr valign="top">
+                    <td><input class="icl_st_row_cb" type="checkbox" value="<?php echo $string_id ?>" /></td>
+                    <td><?php echo htmlspecialchars($icl_string['context']); ?></td>
+                    <td><?php echo htmlspecialchars(_icl_st_hide_random($icl_string['name'])); ?></td>
+                    <td nowrap="nowrap">
+                        <?php if($icl_strings_in_page[ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_SOURCE][$string_id]): ?>
+                            <a class="thickbox" title="<?php _e('view in source', 'sitepress') ?>"
+                                href="admin.php?page=sitepress-multilingual-cms%2Fmenu%2Fstring-translation.php&amp;icl_action=view_string_in_source&amp;string_id=<?php 
+                                echo $string_id ?>&amp;width=810&amp;height=600"><img src="<?php echo ICL_PLUGIN_URL ?>/res/img/view-in-source.png" width="16" height="16"
+                                alt="<?php _e('view in page', 'sitepress') ?>" /></a>
+                        <?php endif; ?>
+                        <?php if($icl_strings_in_page[ICL_STRING_TRANSLATION_STRING_TRACKING_TYPE_PAGE][$string_id]): ?>
+                            <a class="thickbox" title="<?php _e('view in page', 'sitepress') ?>"
+                            href="admin.php?page=sitepress-multilingual-cms%2Fmenu%2Fstring-translation.php&icl_action=view_string_in_page&string_id=<?php 
+                            echo $string_id ?>&width=810&height=600"><img src="<?php echo ICL_PLUGIN_URL ?>/res/img/view-in-page.png" width="16" height="16" 
+                            alt="<?php _e('view in page', 'sitepress') ?>" /></a>                        
+                        <?php endif; ?>
+                    </td> 
+                    <td width="70%">                                        
+                        <div class="icl-st-original" style="float:left;">                    
+                        <?php echo htmlspecialchars($icl_string['value']); ?>                    
+                        </div>                    
+                        <div style="float:right;">
+                            <a href="#icl-st-toggle-translations"><?php echo __('translations','sitepress') ?></a>
+                        </div>
+                        <br clear="all" />
+                        <div class="icl-st-inline">          
+                            <?php foreach($active_languages as $lang): if($lang['code'] == $sitepress_settings['st']['strings_language']) continue;  ?>
+                            <form class="icl_st_form" name="icl_st_form_<?php echo $lang['code'] . '_' . $string_id ?>" action="">
+                            <input type="hidden" name="icl_st_language" value="<?php echo $lang['code'] ?>" />                        
+                            <input type="hidden" name="icl_st_string_id" value="<?php echo $string_id ?>" />                        
+                            <table class="icl-st-table">
+                                <?php                                
+                                    if(isset($icl_string['translations'][$lang['code']]) && $icl_string['translations'][$lang['code']]['status'] == ICL_STRING_TRANSLATION_COMPLETE){
+                                        $tr_complete_checked = 'checked="checked"';
+                                    }else{
+                                        $tr_complete_checked = '';
+                                    }
+                                ?>
+                                <tr>
+                                    <td style="border:none">
+                                        <?php echo $lang['display_name'] ?>                                        
+                                        <br />
+                                        <img class="icl_ajx_loader" src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" style="float:left;display:none;position:absolute;margin:5px" alt="" />
+                                        <textarea rows="<?php echo ceil(strlen($icl_string['value'])/80) ?>" cols="40" name="icl_st_translation" style="width:100%" <?php if(isset($icl_string['translations'][$lang['code']])): ?>id="icl_st_ta_<?php echo $icl_string['translations'][$lang['code']]['id'] ?>"<?php endif;?>><?php 
+                                            if(isset($icl_string['translations'][$lang['code']])) echo $icl_string['translations'][$lang['code']]['value']; else echo $icl_string['value']; 
+                                            ?></textarea>                                        
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td align="right" style="border:none">                                    
+                                        <?php if(preg_match('#<([^>]*)>#im',$icl_string['value'])):?>
+                                        <div style="text-align:left;display:none" class="icl_html_preview"></div>
+                                        <a href="#" class="alignleft icl_htmlpreview_link">HTML preview</a>
+                                        <?php endif; ?>                                    
+                                        <label><input type="checkbox" name="icl_st_translation_complete" value="1" <?php echo $tr_complete_checked ?> <?php if(isset($icl_string['translations'][$lang['code']])): ?>id="icl_st_cb_<?php echo $icl_string['translations'][$lang['code']]['id'] ?>"<?php endif;?> /> <?php echo __('Translation is complete','sitepress')?></label>&nbsp;
+                                        <input type="submit" class="button-secondary action" value="<?php echo __('Save', 'sitepress')?>" />
+                                    </td>
+                                </tr>
+                                </table>
+                                </form>
+                                <?php endforeach;?>
+                        </div>
+                    </td>
+                    <td nowrap="nowrap" id="icl_st_string_status_<?php echo $string_id ?>">
+                    <?php
+                        $icl_status = icl_translation_get_string_translation_status($string_id);
+                        if ($icl_status != "") {
+                            $icl_status = '<br /><span class="meta_comment">' . __('ICanLocalize ', 'sitepress').$icl_status . '</span>';
+                        }
+                        echo $icl_st_string_translation_statuses[$icl_string['status']].$icl_status;
+                    ?>    
+                    </td>
+                </tr>            
+                <?php endforeach;?>
+                <?php endif; ?>
+            </tbody>
+        </table>      
+                    
+        <?php if($wp_query->found_posts > 10): ?>
+            <div class="tablenav" style="width:70%;float:right;">            
+            <?php    
+            $page_links = paginate_links( array(
+                'base' => add_query_arg('paged', '%#%' ),
+                'format' => '',
+                'prev_text' => '&laquo;',
+                'next_text' => '&raquo;',
+                'total' => $wp_query->max_num_pages,
+                'current' => $_GET['paged'],
+                'add_args' => isset($icl_translation_filter)?$icl_translation_filter:array() 
+            ));         
+            ?>
+            <?php if(isset($_GET['show_results']) && $_GET['show_results']=='all'): ?>
+            <div class="tablenav-pages">                
+            <a href="admin.php?page=<?php echo $_GET['page'] ?><?php if(isset($_GET['context'])) echo '&amp;context='.$_GET['context'];?><?php if(isset($_GET['status'])) echo '&status='.$_GET['status'];?>"><?php printf(__('Display %d results per page', 'sitepress'), $sitepress_settings['st']['strings_per_page']); ?></a>
+            </div>
+            <?php endif; ?>            
+
+            <div class="tablenav-pages"> 
+                <?php if ( $page_links ): ?>               
+                <?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s', 'sitepress' ) . '</span>%s',   
+                    number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
+                    number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
+                    number_format_i18n( $wp_query->found_posts ),
+                    $page_links
+                    ); echo $page_links_text; 
+                ?>                                         
+                <?php endif; ?>
+                <?php if(!isset($_GET['show_results'])): ?>
+                <?php echo __('Strings per page:', 'sitepress')?>
+                <select name="icl_st_per_page" onchange="location.href='admin.php?page=<?php echo $_GET['page']?>&amp;strings_per_page='+this.value">
+                    <option value="10"<?php if($sitepress_settings['st']['strings_per_page']==10) echo ' selected="selected"'; ?>>10</option>
+                    <option value="20"<?php if($sitepress_settings['st']['strings_per_page']==20) echo ' selected="selected"'; ?>>20</option>
+                    <option value="50"<?php if($sitepress_settings['st']['strings_per_page']==50) echo ' selected="selected"'; ?>>50</option>
+                    <option value="100"<?php if($sitepress_settings['st']['strings_per_page']==100) echo ' selected="selected"'; ?>>100</option>
+                </select>
+                &nbsp;
+                <a href="admin.php?page=<?php echo $_GET['page'] ?>&amp;show_results=all<?php if(isset($_GET['context'])) echo '&amp;context='.$_GET['context'];?><?php if(isset($_GET['status'])) echo '&amp;status='.$_GET['status'];?>"><?php echo __('Display all results', 'sitepress'); ?></a>
+                <?php endif; ?>
+            </div>
+            
+            </div>
+        <?php endif; ?>    
+    
+        <span class="subsubsub">
+            <input type="button" class="button-secondary" id="icl_st_delete_selected" value="<?php echo __('Delete selected strings', 'sitepress') ?>" disabled="disabled" />
+            <span style="display:none"><?php echo __("Are you sure you want to delete these strings?\nTheir translations will be deleted too.",'sitepress') ?></span>
+        </span>
+        
+        <br clear="all" />    
+        
+        <h4><?php _e('Translation by ICanLocalize', 'sitepress') ?></h4>
+        <p><?php _e('You can send all the untranslated strings for translation by ICanLocalize.', 'sitepress') ?></p>
+        <form method="post" id="icl_st_review_strings" name="icl_st_review_strings" action="">
+        <input type="hidden" name="icl_st_action" value="preview" />
+        <input type="hidden" name="strings" value="" />
+        <input type="hidden" name="langs" value="" />            
+        <input type="hidden" name="icl-tr-from" value="<?php echo $sitepress->get_current_language()?>" />
+        <ul id="icl-tr-opt">
+            <?php
+                $icl_lang_status = $sitepress_settings['icl_lang_status'];
+                if (isset($icl_lang_status)){
+                    foreach($icl_lang_status as $lang){
+                        if($lang['from'] == $sitepress->get_current_language()) {
+                            $target_status[$lang['to']] = $lang['have_translators'];
+                            $target_rate[$lang['to']] = $lang['max_rate'];
+                        }
+                    }
+                }
+            ?>
+            <?php $_one_lang_enabled = false; ?>
+            <?php foreach($active_languages as $lang): if($sitepress_settings['st']['strings_language']==$lang['code']) continue; ?>
+                <?php 
+                    if($target_status[$lang['code']]){
+                        $disabled =  ''; 
+                        $checked='checked="checked"';
+                    }else{
+                        $disabled =  ' disabled="disabled"'; 
+                        $checked='';
+                    }
+                ?>
+                <li><label>
+                    <input type="checkbox" name="icl-tr-to-<?php echo $lang['code']?>" value="<?php echo $lang['english_name']?>" <?php echo $checked ?> <?php echo $disabled ?> />
+                        &nbsp;<?php printf(__('Translate to %s %s','sitepress'), $lang['display_name'], 
+                            $sitepress->get_language_status_text($sitepress->get_current_language(), $lang['code'], 'icl_pt_reload_translation_options')); ?>
+                    <input type="hidden" name="icl_tr_rate[<?php echo $lang['english_name']?>]" value="<?php echo $target_rate[$lang['code']] ?>" />
+                </label></li>
+            <?php endforeach; ?>    
+        </ul>  
+
+        <span class="subsubsub">                
+            <input type="submit" class="button-secondary" id="icl_st_send_selected" value="<?php echo __('Send selected strings to ICanLocalize', 'sitepress') ?>" disabled="disabled" />                    
+            <input type="button" class="button-primary" id="icl_st_send_need_translation" value="<?php echo __('Send all strings that need update to ICanLocalize', 'sitepress') ?>" <?php if(!$_one_lang_enabled):?>disabled="disabled"<?php endif;?> />                                     
+        </span><br />
+        <span id="icl_st_send_progress" class="icl_ajx_response" style="display:none;float:left;"><?php echo __('Sending translation requests. Please wait!', 'sitepress') ?>&nbsp;<img src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" alt="loading" /></span>
+                    
+        <?php if(isset($sitepress_settings['icl_balance'])): ?>
+        <br clear="all" />
+        <p>
+            <?php echo sprintf(__('Your balance with ICanLocalize is %s. Visit your %sICanLocalize finance%s page to deposit additional funds.', 'sitepress'),
+                                  '$'.$sitepress_settings['icl_balance'],
+                                  $sitepress->create_icl_popup_link(ICL_API_ENDPOINT.ICL_FINANCE_LINK, array('title'=>'ICanLocalize')),
+                                  '</a>',
+                                  'sitepress')?>
+        </p>
+        <br />
+        <?php endif; ?>
+        </form>    
+    
+        <br style="clear:both;" />
+        <div id="dashboard-widgets-wrap">
+            <div id="dashboard-widgets" class="metabox-holder">
+            
+                <div class="postbox-container" style="width: 49%;">
+                    <div id="normal-sortables-stsel" class="meta-box-sortables ui-sortable">
+                        <div id="dashboard_wpml_stsel_1" class="postbox">
+                            <div class="handlediv" title="<?php echo __('Click to toggle', 'sitepress'); ?>">
+                                <br/>
+                            </div>
+                            <h3 class="hndle">
+                                <span><?php echo __('Track where string appear on the site', 'sitepress')?></span>
+                            </h3>         
+                            <div class="inside">
+                                <p class="sub"><?php echo __("WPML can keep track of where strings are used on the public pages. Activating this feature will enable the 'view in page' functionality and make translation easier.", 'sitepress')?></p>
+                                <form id="icl_st_more_options" name="icl_st_more_options" action="">
+                                    <p class="icl_form_errors" style="display:none"></p>
+                                    <ul>
+                                        <li>
+                                           	<input type="hidden" name="icl_st[track_strings]" value="0" />
+                                            <label><input type="checkbox" id="icl_st_track_strings" name="icl_st[track_strings]" value="1" <?php 
+                                            if($sitepress_settings['st']['track_strings']): ?>checked="checked"<?php endif ?> /> 
+                                        <?php _e('Track where strings appear on the site', 'sitepress'); ?></label>
+                                        </li>
+                                        <li>
+                                            <label>
+                                                <?php _e('Highlight color for strings', 'sitepress'); ?>
+                                                <?php $hl_color = $sitepress_settings['st']['hl_color']?$sitepress_settings['st']['hl_color']:'#FFFF00'; ?>
+                                                <input type="text" size="7" id="icl_st_hl_color" name="icl_st[hl_color]" value="<?php echo $hl_color ?>" 
+                                                    style="background-color:<?php echo $hl_color ?>" />
+                                            </label>
+                                            <img src="<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_color_picker.png" id="icl_st_hl_picker" 
+                                                alt="" border="0" style="vertical-align:bottom;cursor:pointer;" class="pick-show" 
+                                                onclick="cp.show('icl_st_hl_color');return false;" />
+                                        </li>
+                                    </ul>
+                                    <p>
+                                    <input class="button-secondary" type="submit" name="iclt_st_save" value="<?php _e('Apply', 'sitepress')?>" />
+                                    <span class="icl_ajx_response" id="icl_ajx_response2" style="display:inline"></span>
+                                    </p>
+                                </form>
+                                                               
+                            </div>           
+                        </div>
+                        
+                        
+                        <div id="dashboard_wpml_stsel_2" class="postbox">
+                            <div class="handlediv" title="<?php echo __('Click to toggle', 'sitepress'); ?>">
+                                <br/>
+                            </div>
+                            <h3 class="hndle">
+                                <span><?php echo __('Translate general settings texts', 'sitepress')?></span>
+                            </h3>         
+                            <div class="inside">
+                                <p class="sub"><?php echo __('WPML can translate texts entered in different admin screens. Select which texts to translate.', 'sitepress')?></p>
+                                <form id="icl_st_sw_form" name="icl_st_sw_form" method="post" action="">
+                                    <p class="icl_form_errors" style="display:none"></p>
+                                    <ul>
+                                        <li>
+                                            <label>
+                                                <?php echo __('Strings Language', 'sitepress'); ?>                                                
+                                                <select name="icl_st_sw[strings_language]"> 
+                                                <?php foreach($sitepress->get_languages($sitepress->get_admin_language()) as $l): ?>
+                                                <option value="<?php echo $l['code'] ?>" <?php 
+                                                    if($l['code'] == $sitepress_settings['st']['strings_language']): ?>selected="selected"<?php endif; ?>><?php echo $l['display_name'] ?></option>
+>                                                <?php endforeach; ?>
+                                                </select>
+                                            </label>
+                                        </li>
+                                        <li><label><input type="checkbox" name="icl_st_sw[blog_title]" value="1" <?php if($sitepress_settings['st']['sw']['blog_title']): ?>checked="checked"<?php endif ?> /> 
+                                            <?php echo __('Blog Title', 'sitepress'); ?></label></li>
+                                        <li><label><input type="checkbox" name="icl_st_sw[tagline]" value="1" <?php if($sitepress_settings['st']['sw']['tagline']): ?>checked="checked"<?php endif ?> /> 
+                                            <?php echo __('Tagline', 'sitepress'); ?></label></li>
+                                        <li><label><input type="checkbox" name="icl_st_sw[widget_titles]" value="1" <?php if($sitepress_settings['st']['sw']['widget_titles']): ?>checked="checked"<?php endif ?> /> 
+                                            <?php echo __('Widget titles', 'sitepress'); ?></label></li>
+                                        <li><label><input type="checkbox" name="icl_st_sw[text_widgets]" value="1" <?php if($sitepress_settings['st']['sw']['text_widgets']): ?>checked="checked"<?php endif ?> /> 
+                                            <?php echo __('Content for text-widgets', 'sitepress'); ?></label></li>
+                                    </ul>
+                                    <p>
+                                    <input class="button-secondary" type="submit" name="iclt_st_sw_save" value="<?php echo __('Save options and rescan strings', 'sitepress')?>" />
+                                    <span class="icl_ajx_response" style="display:inline">&nbsp;<?php if(isset($_GET['updated']) && $_GET['updated']=='true') echo __('Settings saved', 'sitepress') ?></span>
+                                    </p>
+                                </form> 
+                                                               
+                            </div>           
+                        </div>                        
+                        
+                    </div>
+                </div>
+                
+                <div class="postbox-container" style="width: 49%;">
+                    <div id="normal-sortables-poie" class="meta-box-sortables ui-sortable">
+                        <div id="dashboard_wpml_st_poie" class="postbox">
+                            <div class="handlediv" title="<?php echo __('Click to toggle', 'sitepress'); ?>">
+                                <br/>
+                            </div>
+                            <h3 class="hndle">
+                                <span><?php echo __('Import / export .po', 'sitepress')?></span>
+                            </h3>         
+                            <div class="inside">
+                                <h5><?php echo __('Import', 'sitepress')?></h5>                         
+                                <form id="icl_st_po_form" action="" name="icl_st_po_form" method="post" enctype="multipart/form-data">
+                                    <p class="sub">
+                                         <label for="icl_po_file"><?php echo __('.po file:', 'sitepress')?></label>
+                                        <input id="icl_po_file" class="button primary" type="file" name="icl_po_file" />  
+                                    </p>
+                                    <p class="sub" style="line-height:2.3em">
+                                        <input type="checkbox" name="icl_st_po_translations" id="icl_st_po_translations" />
+                                        <label for="icl_st_po_translations"><?php echo __('Also create translations according to the .po file', 'sitepress')?></label>
+                                        <select name="icl_st_po_language" id="icl_st_po_language" style="display:none">
+                                        <?php foreach($active_languages as $al): if($al['code']==$sitepress_settings['st']['strings_language']) continue; ?>
+                                        <option value="<?php echo $al['code'] ?>"><?php echo $al['display_name'] ?></option>
+                                        <?php endforeach; ?>
+                                        </select>
+                                    </p>           
+                                    <p class="sub" style="line-height:2.3em"    >
+                                        <?php echo __('Select what the strings are for:', 'sitepress');?>
+                                        <?php if(!empty($available_contexts)): ?>
+                                        
+                                        &nbsp;&nbsp;
+                                        <span>                                        
+                                        <select name="icl_st_i_context">
+                                            <option value="">-------</option>
+                                            <?php foreach($available_contexts as $v):?>
+                                            <option value="<?php echo htmlspecialchars($v)?>" <?php if($context_filter == $v ):?>selected="selected"<?php endif;?>><?php echo $v; ?></option>
+                                            <?php endforeach; ?>
+                                        </select>
+                                        <a href="#" onclick="var __nxt = jQuery(this).parent().next(); jQuery(this).prev().val(''); jQuery(this).parent().fadeOut('fast',function(){__nxt.fadeIn('fast')});return false;"><?php echo __('new','sitepress')?></a>
+                                        </span>
+                                        <?php endif; ?>
+                                        <span <?php if(!empty($available_contexts)):?>style="display:none"<?php endif ?>>                                        
+                                        <input type="text" name="icl_st_i_context_new" />
+                                        <?php if(!empty($available_contexts)):?>
+                                        <a href="#" onclick="var __prv = jQuery(this).parent().prev(); jQuery(this).prev().val(''); jQuery(this).parent().fadeOut('fast',function(){__prv.fadeIn('fast')});return false;"><?php echo __('select from existing','sitepress')?></a>
+                                        <?php endif ?>
+                                        </span>                                        
+                                    </p>  
+                                    
+                                    <p>
+                                    <input class="button" name="icl_po_upload" id="icl_po_upload" type="submit" value="<?php echo __('Submit', 'sitepress')?>" />        
+                                    <span id="icl_st_err_domain" class="icl_error_text" style="display:none"><?php echo __('Please enter a context!', 'sitepress')?></span>
+                                    <span id="icl_st_err_po" class="icl_error_text" style="display:none"><?php echo __('Please select the .po file to upload!', 'sitepress')?></span>
+                                    </p>
+                                    
+                                </form>       
+                                <?php if(!empty($icl_contexts)):?>
+                                <h5><?php echo __('Export strings into .po/.pot file', 'sitepress')?></h5>                         
+                                <form method="post" action="">
+                                <p>
+                                    <?php echo __('Select context:', 'sitepress')?>
+                                    <select name="icl_st_e_context" id="icl_st_e_context">
+                                        <option value="" <?php if($context_filter === false ):?>selected="selected"<?php endif;?>><?php echo __('All contexts', 'sitepress') ?></option>
+                                        <?php foreach($icl_contexts as $v):?>
+                                        <option value="<?php echo htmlspecialchars($v->context)?>" <?php if($context_filter == $v->context ):?>selected="selected"<?php endif;?>><?php echo $v->context . ' ('.$v->c.')'; ?></option>
+                                        <?php endforeach; ?>
+                                    </select>   
+                               </p>
+                               <p style="line-height:2.3em">     
+                                    <input type="checkbox" name="icl_st_pe_translations" id="icl_st_pe_translations" checked="checked" value="1" onchange="if(jQuery(this).attr('checked'))jQuery('#icl_st_e_language').fadeIn('fast'); else jQuery('#icl_st_e_language').fadeOut('fast')" />
+                                    <label for="icl_st_pe_translations"><?php echo __('Also include translations', 'sitepress')?></label>                                
+                                    <select name="icl_st_e_language" id="icl_st_e_language">
+                                    <?php foreach($active_languages as $al): if($al['code']==$sitepress_settings['st']['strings_language']) continue; ?>
+                                    <option value="<?php echo $al['code'] ?>"><?php echo $al['display_name'] ?></option>
+                                    <?php endforeach; ?>
+                                    </select>                                     
+                                </p>  
+                                <p><input type="submit" class="button-secondary" name="icl_st_pie_e" value="<?php echo __('Submit', 'sitepress')?>" /></p>                                                                      
+                                <?php endif ?>
+                                </form>
+                            </div>           
+                        </div>
+                    </div>
+                </div>
+                
+            </div>
+        </div>
+        
+        <br clear="all" /><br />
+    <?php endif; ?>
+    
+     
+    <a href="admin.php?page=<?php echo ICL_PLUGIN_FOLDER ?>/menu/string-translation.php&amp;trop=1"><?php _e('Translate texts in admin screens &raquo;', 'sitepress'); ?></a> 
+    
+    <?php do_action('icl_menu_footer'); ?>
+    
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/support.php b/wp-content/plugins/sitepress-multilingual-cms/menu/support.php
new file mode 100644
index 0000000..906ebbb
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/support.php
@@ -0,0 +1,6 @@
+
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv" style="background: transparent url(<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_adv.png) no-repeat;"><br /></div>
+    <h2><?php _e('Support', 'sitepress') ?></h2>
+<?php do_action('icl_support_admin_page'); ?>
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/tag-menu.php b/wp-content/plugins/sitepress-multilingual-cms/menu/tag-menu.php
new file mode 100644
index 0000000..a9cd77d
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/tag-menu.php
@@ -0,0 +1,28 @@
+<?php $this->noscript_notice() ?>
+<?php
+    global $sitepress;
+    $sitepress->add_language_selector_to_page($active_languages,
+                                              $selected_language,
+                                              $translations,
+                                              $element_id,
+                                              'tag');
+    $sitepress->add_translation_of_selector_to_page($trid,
+                                                 $selected_language,
+                                                 $default_language,
+                                                 $source_language,
+                                                 $untranslated_ids,
+                                                 $element_id,
+                                                 'tag');
+    $sitepress->add_translate_options($trid,
+                                   $active_languages,
+                                   $selected_language,
+                                   $translations,
+                                   'tag');
+    
+?>
+
+</div>
+</div>
+</div>
+</div>
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/taxonomy-menu.php b/wp-content/plugins/sitepress-multilingual-cms/menu/taxonomy-menu.php
new file mode 100644
index 0000000..3ebffba
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/taxonomy-menu.php
@@ -0,0 +1,28 @@
+<?php $this->noscript_notice() ?>
+<?php
+    global $sitepress;
+    $sitepress->add_language_selector_to_page($active_languages,
+                                              $selected_language,
+                                              $translations,
+                                              $element_id,
+                                              $icl_element_type);
+    $sitepress->add_translation_of_selector_to_page($trid,
+                                                 $selected_language,
+                                                 $default_language,
+                                                 $source_language,
+                                                 $untranslated_ids,
+                                                 $element_id,
+                                                 $icl_element_type);
+    $sitepress->add_translate_options($trid,
+                                   $active_languages,
+                                   $selected_language,
+                                   $translations,
+                                   $icl_element_type);
+    
+?>
+
+</div>
+</div>
+</div>
+</div>
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/theme-localization.php b/wp-content/plugins/sitepress-multilingual-cms/menu/theme-localization.php
new file mode 100644
index 0000000..083c606
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/theme-localization.php
@@ -0,0 +1,309 @@
+<?php
+if((!isset($sitepress_settings['existing_content_language_verified']) || !$sitepress_settings['existing_content_language_verified']) || 2 > count($sitepress->get_active_languages())){
+    return;
+}
+$active_languages = $sitepress->get_active_languages();              
+$locales = $sitepress->get_locale_file_names();
+$theme_localization_stats = get_theme_localization_stats();
+$plugin_localization_stats = get_plugin_localization_stats();
+?>
+
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv"><br /></div>
+    <h2><?php _e('Theme and plugins localization', 'sitepress') ?></h2>    
+
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    
+    <h3><?php _e('Select how to localize the theme','sitepress'); ?></h3>
+    <p><?php _e("If your theme's texts are wrapped in gettext calls, WPML can help you display it multilingual.",'sitepress'); ?></p>
+    <form id="icl_theme_localization_type" method="post" action="">
+    <input type="hidden" name="icl_ajx_action" value="icl_save_theme_localization_type" />
+    <ul>
+        <li><label><input type="radio" name="icl_theme_localization_type" value="0" <?php if($sitepress_settings['theme_localization_type']==0):?>checked="checked"<?php endif; ?> /> <?php _e("No localization.<br /><i>The theme's texts will not be localized.</i>", 'sitepress') ?></label></li>
+        <li><label><input type="radio" name="icl_theme_localization_type" value="1" <?php if($sitepress_settings['theme_localization_type']==1):?>checked="checked"<?php endif; ?> /> <?php _e("Translate the theme by WPML.<br /><i>WPML will add the theme's texts to the string translation page, where you can enter translations.</i>", 'sitepress') ?></label></li>
+        <li><label><input type="radio" name="icl_theme_localization_type" value="2" <?php if($sitepress_settings['theme_localization_type']==2):?>checked="checked"<?php endif; ?> /> <?php _e("Using a .mo file in the theme directory.<br /><i>Include the theme's .mo files in the theme's folder and WPML will load the right file for each language.</i>", 'sitepress') ?></label></li>
+    </ul>
+    <p>
+        <input class="button" name="save" value="<?php echo __('Save','sitepress') ?>" type="submit" />        
+    </p>
+    <img src="<?php echo ICL_PLUGIN_URL ?>/res/img/question-green.png" width="29" height="29" alt="need help" align="left" /><p style="margin-top:14px;">&nbsp;<a href="http://wpml.org/?page_id=2717";><?php _e('Theme localization instructions', 'sitepress')?> &raquo;</a></p>
+    </form>
+    
+    <?php if($sitepress_settings['theme_localization_type'] > 0):?>
+    <br />
+    <div id="icl_tl">
+    <h3><?php _e('Language locale settings', 'sitepress') ?></h3>
+    <p><?php _e('Select the locale to use for each language. The locale for the default language is set in your wp_config.php file.', 'sitepress') ?></p>
+    <form id="icl_theme_localization" name="icl_theme_localization" method="post" action="">
+    <input type="hidden" name="icl_post_action" value="save_theme_localization" />    
+    <div id="icl_theme_localization_wrap"><div id="icl_theme_localization_subwrap">    
+    <table id="icl_theme_localization_table" class="widefat" cellspacing="0">
+    <thead>
+    <tr>
+    <th scope="col"><?php echo __('Language', 'sitepress') ?></th>
+    <th scope="col"><?php echo __('Code', 'sitepress') ?></th>
+    <th scope="col"><?php echo __('Locale file name', 'sitepress') ?></th>        
+    <th scope="col"><?php printf(__('MO file in %s', 'sitepress'), LANGDIR) ?></th>        
+    <?php if($sitepress_settings['theme_localization_type']==2):?>
+    <th scope="col"><?php printf(__('MO file in %s', 'sitepress'), '/'.basename(WP_CONTENT_DIR).'/themes/' . get_option('template')) ?></th>        
+    <?php endif; ?>
+    </tr>        
+    </thead>        
+    <tfoot>
+    <tr>
+    <th scope="col"><?php echo __('Language', 'sitepress') ?></th>
+    <th scope="col"><?php echo __('Code', 'sitepress') ?></th>
+    <th scope="col"><?php echo __('Locale file name', 'sitepress') ?></th>        
+    <th scope="col"><?php printf(__('MO file in %s', 'sitepress'), LANGDIR) ?></th>        
+    <?php if($sitepress_settings['theme_localization_type']==2):?>
+    <th scope="col"><?php printf(__('MO file in %s', 'sitepress'), '/'.basename(WP_CONTENT_DIR).'/themes/' . get_option('template')) ?></th>        
+    <?php endif; ?>
+    </tr>        
+    </tfoot>
+    <tbody>
+    <?php foreach($active_languages as $lang): ?>
+    <tr>
+    <td scope="col"><?php echo $lang['display_name'] ?></td>
+    <td scope="col"><?php echo $lang['code'] ?></td>
+    <td scope="col">
+        <input type="text" size="10" name="locale_file_name_<?php echo $lang['code']?>" value="<?php echo $locales[$lang['code']]?>" />.mo
+    </td> 
+    <td>
+        <?php if(@is_readable(ABSPATH . LANGDIR . '/' . $locales[$lang['code']] . '.mo')): ?>
+        <span class="icl_valid_text"><?php echo __('File exists.', 'sitepress') ?></span>                
+		<?php elseif($lang['code'] != 'en' ): ?>
+        <span class="icl_error_text"><?php echo __('File not found!', 'sitepress') ?></span>
+        <?php endif; ?>
+    </td>
+    <?php if($sitepress_settings['theme_localization_type']==2):?>       
+    <td>
+        <?php if(@is_readable(TEMPLATEPATH . '/' . $locales[$lang['code']] . '.mo')): ?>
+        <span class="icl_valid_text"><?php echo __('File exists.', 'sitepress') ?></span>                
+        <?php elseif($lang['code'] != 'en' ): ?>
+        <span class="icl_error_text"><?php echo __('File not found!', 'sitepress') ?></span>
+        <?php endif; ?>        
+    </td>              
+    <?php endif; ?> 
+    </tr>
+    <?php endforeach; ?>                                                          
+    </tbody>        
+    </table>
+    <?php if($sitepress_settings['theme_localization_type']==2):?>       
+    <p>
+        <?php echo __('Enter the theme\'s textdomain value:', 'sitepress')?>
+        <input type="text" name="icl_domain_name" value="<?php echo $sitepress_settings['gettext_theme_domain_name'] ?>" />
+        <?php if(!$sitepress_settings['gettext_theme_domain_name']): ?>
+        <span class="icl_error_text"><?php echo __('Theme localization is not enabled because you didn\'t enter a text-domain.', 'sitepress'); ?></span>
+        <?php endif ?>
+    </p>
+    <?php endif; ?>
+    </div>
+    </div>
+    <p>
+        <input class="button" name="save" value="<?php echo __('Save','sitepress') ?>" type="submit" />
+        <span class="icl_ajx_response" id="icl_ajx_response_fn"></span>
+    </p>
+    </form>
+    <br /><br />
+    </div> 
+    <?php endif; ?>
+    
+    <?php if($sitepress_settings['theme_localization_type'] == 1):?>
+        
+        <div class="updated fade">
+            <p><i><?php _e('Re-scanning the plugins or the themes will reset the strings tracked in the code or the HTML source', 'sitepress') ?></i></p>
+        </div>
+        
+        <h3><?php _e('Strings in the theme', 'sitepress'); ?></h3>
+        <div id="icl_strings_in_theme_wrap">
+        
+        <?php if($theme_localization_stats): ?>
+        <p><?php _e('The following strings were found in your theme.', 'sitepress'); ?></p>
+        <table id="icl_strings_in_theme" class="widefat" cellspacing="0">
+            <thead>
+                <tr>
+                    <th scope="col"><?php echo __('Domain', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('Translation status', 'sitepress') ?></th>
+                    <th scope="col" style="text-align:right"><?php echo __('Count', 'sitepress') ?></th>
+                    <th scope="col">&nbsp;</th>
+                </tr>
+            </thead>  
+            <tbody>
+                <?php foreach($sitepress_settings['st']['theme_localization_domains'] as $tl_domain): ?>
+                <?php 
+                    $_tmpcomp = $theme_localization_stats[$tl_domain ? 'theme ' . $tl_domain : 'theme']['complete'];
+                    $_tmpinco = $theme_localization_stats[$tl_domain ? 'theme ' . $tl_domain : 'theme']['incomplete'];
+                ?>
+                <tr>
+                    <td rowspan="3"><?php echo $tl_domain ? $tl_domain : '<i>' . __('no domain','sitepress') . '</i>'; ?></td>
+                    <td><?php echo __('Fully translated', 'sitepress') ?></td>
+                    <td align="right"><?php echo $_tmpcomp; ?></td>
+                    <td rowspan="3" align="right" style="padding-top:10px;">
+                        <a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH) ?>/menu/string-translation.php&amp;context=<?php echo $tl_domain ? 'theme%20' . $tl_domain : 'theme' ?>" class="button-secondary"><?php echo __("View all the theme's texts",'sitepress')?></a>
+                        <?php if($_tmpinco): ?>
+                        <a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH) ?>/menu/string-translation.php&amp;context=<?php echo $tl_domain ? 'theme%20' . $tl_domain : 'theme' ?>&amp;status=0" class="button-primary"><?php echo __("View strings that need translation",'sitepress')?></a>
+                        <?php endif; ?>
+                    </td>
+                </tr>
+                <tr>
+                    <td><?php echo __('Not translated or needs update', 'sitepress') ?></td>
+                    <td align="right"><?php echo $_tmpinco ?></td>
+                </tr>
+                <tr style="background-color:#f9f9f9;">
+                    <td><strong><?php echo __('Total', 'sitepress') ?></strong></td>
+                    <td align="right"><strong><?php echo $_tmpcomp + $_tmpinco; if(1 < count($sitepress_settings['st']['theme_localization_domains'])) { if(!isset($_tmpgt)) $_tmpgt = 0; $_tmpgt += $_tmpcomp + $_tmpinco; } ?></strong></td>
+                </tr>            
+                <?php endforeach  ?>
+            </tbody>
+            <?php if(1 < count($sitepress_settings['st']['theme_localization_domains'])): ?>
+                <tfoot>
+                    <tr>                
+                        <th scope="col"><?php echo __('Total', 'sitepress') ?></th>
+                        <th scope="col">&nbsp;</th>
+                        <th scope="col" style="text-align:right"><?php echo $_tmpgt ?></th>
+                        <th scope="col">&nbsp;</th>
+                    </tr>
+                </tfoot>                              
+            <?php endif; ?>
+        </table>
+        <?php else: ?>
+        <p><?php echo __("To translate your theme's texts, click on the button below. WPML will scan your theme for texts and let you enter translations.", 'sitepress') ?></p>
+        <?php endif; ?>
+        
+        </div>
+                
+        <p>
+        <label>
+        <input type="checkbox" id="icl_load_mo_themes" value="1" checked="checked" />            
+        <?php _e('Load translations if found in the .mo files. (it will not override existing translations)', 'sitepress')?></label> 
+        </p>
+                
+        <p>
+        <input id="icl_tl_rescan" type="button" class="button-primary" value="<?php echo __("Scan the theme for strings",'sitepress')?>" />
+        <img class="icl_ajx_loader" src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" style="display:none;" alt="" />
+        </p>        
+        <div id="icl_tl_scan_stats"></div>  
+        
+        <br />
+        
+        <h3><?php _e('Strings in the plugins', 'sitepress'); ?></h3>
+        <?php 
+        $plugins = get_plugins();
+        $active_plugins = get_option('active_plugins'); 
+        $mu_plugins = wp_get_mu_plugins();
+        foreach($mu_plugins as $p){
+            $pfile = basename($p);
+            $plugins[$pfile] = array('Name' => 'MU :: ' . $pfile);
+            $mu_plugins_base[$pfile] = true;
+        }
+        $wpmu_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );
+        ?>
+        <form id="icl_tl_rescan_p" action="">
+            <div id="icl_strings_in_plugins_wrap">
+                <table id="icl_strings_in_plugins" class="widefat" cellspacing="0">
+                    <thead>
+                        <tr>
+                            <th scope="col" class="column-cb check-column"><input type="checkbox" /></th>
+                            <th scope="col"><?php echo __('Plugin', 'sitepress') ?></th>
+                            <th scope="col"><?php echo __('Active', 'sitepress') ?></th>
+                            <th scope="col"><?php echo __('Translation status', 'sitepress') ?><div style="float:right"><?php echo __('Count', 'sitepress') ?></div></th>
+                            <th scope="col">&nbsp;</th>
+                            <th scope="col">&nbsp;</th>
+                        </tr>
+                    </thead>  
+                    <tfoot>
+                        <tr>
+                            <th scope="col" class="column-cb check-column"><input type="checkbox" /></th>
+                            <th scope="col"><?php echo __('Plugin', 'sitepress') ?></th>
+                            <th scope="col"><?php echo __('Active', 'sitepress') ?></th>
+                            <th scope="col"><?php echo __('Translation status', 'sitepress') ?><div style="float:right"><?php echo __('Count', 'sitepress') ?></div></th>
+                            <th scope="col">&nbsp;</th>
+                            <th scope="col">&nbsp;</th>
+                        </tr>
+                    </tfoot>                              
+                    <tbody>
+                        <?php foreach($plugins as $file=>$plugin): ?>
+                        <?php   
+                            $plugin_id = (false !== strpos($file, '/')) ? dirname($file) : $file;
+                            $plugin_id = 'plugin ' . $plugin_id;
+                            if(isset($plugin_localization_stats[$plugin_id]['complete'])){
+                                $_tmpcomp = $plugin_localization_stats[$plugin_id]['complete'];
+                                $_tmpinco = $plugin_localization_stats[$plugin_id]['incomplete'];
+                                $_tmptotal = $_tmpcomp + $_tmpinco;
+                                $_tmplink = true;
+                            }else{
+                                $_tmpcomp = $_tmpinco = $_tmptotal =  __('n/a', 'sitepress');
+                                $_tmplink = false;
+                            }
+                            $is_mu_plugin = false;
+                            if(in_array($file, $active_plugins)){
+                                $plugin_active_status = __('Yes', 'sitepress');    
+                            }elseif(isset($wpmu_sitewide_plugins[$file])){
+                                $plugin_active_status = __('Network', 'sitepress');    
+                            }elseif(isset($mu_plugins_base[$file])){
+                                $plugin_active_status = __('MU', 'sitepress');    
+                                $is_mu_plugin = true;
+                            }else{
+                                $plugin_active_status = __('No', 'sitepress');    
+                            } 
+                            
+                            
+                        ?>
+                        <tr>
+                            <td><input type="checkbox" value="<?php echo $file ?>" name="<?php if($is_mu_plugin):?>mu-plugin[]<?php else:?>plugin[]<?php endif; ?>" /></td>
+                            <td><?php echo $plugin['Name'] ?></td>
+                            <td align="center"><?php echo $plugin_active_status ?></td>
+                            <td>
+                                <table width="100%" cellspacing="0">
+                                    <tr>
+                                        <td><?php echo __('Fully translated', 'sitepress') ?></td>                    
+                                        <td align="right"><?php echo $_tmpcomp ?></td>
+                                    </tr>
+                                    <tr>
+                                        <td><?php echo __('Not translated or needs update', 'sitepress') ?></td>
+                                        <td align="right"><?php echo $_tmpinco  ?></td>
+                                    </tr>
+                                    <tr>
+                                        <td style="border:none"><strong><?php echo __('Total', 'sitepress') ?></strong></td>
+                                        <td style="border:none" align="right"><strong><?php echo $_tmptotal; ?></strong></td>
+                                    </tr>            
+                                </table>
+                            </td>
+                            <td align="right" style="padding-top:10px;">
+                                <?php if($_tmplink): ?>
+                                    <p><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH) ?>/menu/string-translation.php&amp;context=<?php echo $plugin_id ?>" class="button-secondary"><?php echo __("View all the plugin's texts",'sitepress')?></a></p>
+                                    <?php if($_tmpinco): ?>
+                                    <p><a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH) ?>/menu/string-translation.php&amp;context=<?php echo $plugin_id ?>&amp;status=0" class="button-primary"><?php echo __("View strings that need translation",'sitepress')?></a></p>
+                                    <?php endif; ?>
+                                <?php else: ?>
+                                    <p><i><?php _e('Select and use the button below to scan for strings', 'sitepress')?></i></p>
+                                <?php endif; ?>
+                            </td>                     
+                        </tr>
+                        <?php endforeach  ?>
+                    </tbody>
+                </table>        
+            </div>    
+            
+            <p>
+            <label>
+            <input type="checkbox" name="icl_load_mo" value="1" checked="checked" />            
+            <?php _e('Load translations if found in the .mo files. (it will not override existing translations)', 'sitepress')?></label> 
+            </p>
+            <p>
+            <input type="submit" class="button-primary" value="<?php echo __("Scan the selected plugins for strings",'sitepress')?>" />
+            <img class="icl_ajx_loader_p" src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" style="display:none;" alt="" />
+            </p>
+        
+        
+        </form>
+        
+        <div id="icl_tl_scan_stats_p"></div>  
+        
+        
+    <?php endif; ?>
+    
+    
+    <?php do_action('icl_menu_footer'); ?>
+               
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/translation-synchronization.php b/wp-content/plugins/sitepress-multilingual-cms/menu/translation-synchronization.php
new file mode 100644
index 0000000..e1211ec
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/translation-synchronization.php
@@ -0,0 +1,252 @@
+<?php
+    require_once ICL_PLUGIN_PATH . '/inc/plugins-texts-functions.php';     
+    $sitepress_settings = $sitepress->get_settings();     
+    $icl_plugins_texts = icl_pt_get_texts();
+    //icl_get_posts_translatable_fields();
+    
+    if(isset($_POST['icl_pt_file_upload'])){            
+        $csv_file_upload_error = icl_pt_handle_upload();    
+    }
+    
+    $notice = '';
+    
+    $cposts = array();
+    $icl_post_types = $sitepress->get_translatable_documents(true);    
+    
+    foreach($icl_post_types as $k=>$v){
+        if(!in_array($k, array('post','page'))){
+            $cposts[$k] = $v;        
+        }
+    }
+    
+    foreach($cposts as $k=>$cpost){
+        if(!isset($sitepress_settings['custom_posts_sync_option'][$k])){
+            $cposts_sync_not_set[] = $cpost->labels->name;
+        }    
+    }    
+    if(!empty($cposts_sync_not_set)){
+        $notice = '<div class="updated below-h2"><p>';
+        $notice .= sprintf(__("You haven't set your synchronization preferences for these custom posts: %s. Default value was selected.", 'sitepress'), 
+            '<i>'.join('</i>, <i>', $cposts_sync_not_set) . '</i>');
+        $notice .= '</p></div>';
+    }
+    
+    global $wp_taxonomies;
+    $ctaxonomies = array_diff(array_keys((array)$wp_taxonomies), array('post_tag','category', 'nav_menu', 'link_category'));    
+    foreach($ctaxonomies as $ctax){
+        if(!isset($sitepress_settings['taxonomies_sync_option'][$ctax])){
+            $tax_sync_not_set[] = $wp_taxonomies[$ctax]->label;
+        }    
+    }
+    if(!empty($tax_sync_not_set)){
+        $notice .= '<div class="updated below-h2"><p>';
+        $notice .= sprintf(__("You haven't set your synchronization preferences for these taxonomies: %s. Default value was selected.", 'sitepress'), 
+            '<i>'.join('</i>, <i>', $tax_sync_not_set) . '</i>');
+        $notice .= '</p></div>';
+    }
+?>
+<?php $sitepress->noscript_notice() ?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv"><br /></div>
+    <h2><?php echo __('Translation synchronization', 'sitepress') ?></h2>    
+    <?php if(isset($notice)) echo $notice ?>
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    <div id="icl_plugin_texts_wrapper" class="metabox-holder">
+    <div class="postbox-container">
+        <div id="normal-sortables" class="meta-box-sortables ui-sortable">
+            <div id="dashboard_wpml_plugin_texts" class="postbox">
+                <div class="handlediv" title="<?php echo __('Click to toggle', 'sitepress'); ?>">
+                    <br/>
+                </div>
+                <h3 class="hndle">
+                    <span><?php echo __('Plugins texts translation', 'sitepress')?></span>
+                </h3>                    
+                <div class="inside">
+            
+                    <p><?php echo __('Select what other texts (besides title and body) you want to include in the translation.', 'sitepress') ?></p>
+                    <form name="icl_plugins_texts" action="">
+                    <table class="widefat" cellspacing="0">
+                    <thead>
+                    <tr>
+                    <th scope="col"><?php echo __('Enable translation', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('Plugin', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('List of fields we translate', 'sitepress') ?></th>        
+                    </tr>        
+                    </thead>        
+                    <tfoot>
+                    <tr>
+                    <th scope="col"><?php echo __('Enable translation', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('Plugin', 'sitepress') ?></th>
+                    <th scope="col"><?php echo __('List of fields we translate', 'sitepress') ?></th>        
+                    </tr>        
+                    </tfoot>                
+                    <tbody>        
+                    <?php foreach($icl_plugins_texts as $ipt): ?>
+                    <tr>
+                    <td scope="col"><input type="checkbox" name="icl_plugins_texts_enabled[]" value="<?php echo $ipt['plugin_name'] ?>" <?php if(!$ipt['active']): ?>disabled="disabled"<?php endif;?> <?php if($ipt['enabled']): ?>checked="checked"<?php endif;?>/></td>
+                    <td scope="col"><?php echo $ipt['plugin_name_short'] ?></td>
+                    <td scope="col"><?php echo $ipt['fields_list'] ?></td>
+                    </tr>
+                    <?php endforeach; ?>                                                                  
+                    </tbody>        
+                    </table>   
+                    <br />
+                    <p class="submit">
+                        <input class="button" name="create account" value="<?php echo __('Save', 'sitepress') ?>" type="submit" />
+                        <span class="icl_ajx_response" id="icl_ajx_response3"></span>    
+                    </p>        
+                    </form>
+                    <br />
+                    
+                    <form method="post" action="admin.php?page=<?php echo $_GET['page'] ?>#icl_plugins_texts" enctype="multipart/form-data">
+                    <?php if(isset($csv_file_upload_error) && $csv_file_upload_error): ?>
+                    <p class="icl_form_errors"><?php echo $csv_file_upload_error ?></p>            
+                    <?php endif; ?>            
+                    <!--<input type="hidden" name="icl_ajx_action" value="icl_plugins_texts" />-->
+                    <input type="hidden" name="icl_pt_file_upload" value="<?php echo $_SERVER['REQUEST_URI'] ?>" />
+                    <p><?php echo __('If your plugin does not appear in this table, you can upload a CSV file that describes its texts.', 'sitepress') ?> <a href="http://wpml.org/?page_id=2065";><?php echo __('Read more', 'sitepress') ?></a></p>
+                    <p>
+                        <?php echo __('CSV plugin description', 'sitepress') ?>
+                        <input class="button" type="file" name="plugins_texts_csv" />             
+                        <input class="button" id="icl_pt_upload" type="submit" value="<?php echo __('Submit', 'sitepress')?>" />                            
+                        <?php if(isset($csv_file_upload_error) && empty($csv_file_upload_error)):?>&nbsp;<span class="icl_ajx_response" style="display:inline">CSV file uploaded</span><?php endif;?>    
+                    </p>
+                    </form>            
+                 </div>
+            </div>
+        </div>
+    </div>
+    </div>
+    
+    <form id="icl_page_sync_options" name="icl_page_sync_options" action="">        
+    <table class="widefat">
+        <thead>
+            <tr>
+                <th colspan="2"><?php _e('Posts and pages synchronization', 'sitepress');?></th>
+            </tr>
+        </thead>
+        <tbody>
+            <tr>
+                <td>
+                    <br />                    
+                    <p>
+                        <label><input type="checkbox" id="icl_sync_page_ordering" name="icl_sync_page_ordering" <?php if($sitepress_settings['sync_page_ordering']): ?>checked="checked"<?php endif; ?> value="1" />
+                        <?php echo __('Synchronize page order for translations.', 'sitepress') ?></label>                        
+                    </p>
+                    <p>
+                        <label><input type="checkbox" id="icl_sync_page_parent" name="icl_sync_page_parent" <?php if($sitepress_settings['sync_page_parent']): ?>checked="checked"<?php endif; ?> value="1" />
+                        <?php echo __('Set page parent for translation according to page parent of the original language.', 'sitepress') ?></label>                        
+                    </p>
+                    <p>
+                        <label><input type="checkbox" name="icl_sync_page_template" <?php if($sitepress_settings['sync_page_template']): ?>checked="checked"<?php endif; ?> value="1" />
+                        <?php echo __('Synchronize page template.', 'sitepress') ?></label>                        
+                    </p>                    
+                    <p>
+                        <label><input type="checkbox" name="icl_sync_comment_status" <?php if($sitepress_settings['sync_comment_status']): ?>checked="checked"<?php endif; ?> value="1" />
+                        <?php echo __('Synchronize comment status.', 'sitepress') ?></label>                        
+                    </p>                    
+                    <p>
+                        <label><input type="checkbox" name="icl_sync_ping_status" <?php if($sitepress_settings['sync_ping_status']): ?>checked="checked"<?php endif; ?> value="1" />
+                        <?php echo __('Synchronize ping status.', 'sitepress') ?></label>                        
+                    </p>                                        
+                    <p>
+                        <label><input type="checkbox" name="icl_sync_sticky_flag" <?php if($sitepress_settings['sync_sticky_flag']): ?>checked="checked"<?php endif; ?> value="1" />
+                        <?php echo __('Synchronize sticky flag.', 'sitepress') ?></label>                        
+                    </p>                                                            
+                    <p>
+                        <label><input type="checkbox" name="icl_sync_private_flag" <?php if($sitepress_settings['sync_private_flag']): ?>checked="checked"<?php endif; ?> value="1" />
+                        <?php echo __('Synchronize private flag.', 'sitepress') ?></label>                        
+                    </p>                                                                                
+                    <p>
+                        <input class="button" name="save" value="<?php echo __('Save','sitepress') ?>" type="submit" />
+                        <span class="icl_ajx_response" id="icl_ajx_response_mo"></span>
+                    </p>                    
+                </td>
+                <td>
+                    <br />                    
+                    <p>
+                        <label><input type="checkbox" name="icl_sync_delete" <?php if($sitepress_settings['sync_delete']): ?>checked="checked"<?php endif; ?> value="1" />
+                        <?php echo __('When deleting a post, delete translations as well.', 'sitepress') ?></label>                        
+                    </p>                                                                                
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    </form>                
+    <br />
+    <?php if(!empty($cposts)): ?>    
+    <form id="icl_custom_posts_sync_options" name="icl_custom_posts_sync_options" action="">        
+    <table class="widefat">
+        <thead>
+            <tr>
+                <th width="60%"><?php _e('Custom posts', 'sitepress');?></th>
+                <th>&nbsp;</th>
+            </tr>
+        </thead>
+        <tbody>
+            <?php foreach($cposts as $k=>$cpost): ?>
+            <tr>
+                <td><?php echo $cpost->labels->name; ?></td>
+                <td>
+                    <label><input type="radio" name="icl_sync_custom_posts[<?php echo $k ?>]" value="1" <?php
+                        if($sitepress_settings['custom_posts_sync_option'][$k]==1) echo ' checked="checked"'
+                    ?> />&nbsp;<?php _e('Translate', 'sitepress') ?></label>&nbsp;
+                    <label><input type="radio" name="icl_sync_custom_posts[<?php echo $k ?>]" value="0" <?php
+                        if($sitepress_settings['custom_posts_sync_option'][$k]==0) echo ' checked="checked"'
+                    ?> />&nbsp;<?php _e('Do nothing', 'sitepress') ?></label>
+                </td>
+            </tr>
+            <?php endforeach; ?>
+            <tr>
+                <td colspan="2">
+                <p>
+                    <input type="submit" class="button" value="<?php _e('Save', 'sitepress') ?>" />
+                    <span class="icl_ajx_response" id="icl_ajx_response_cp"></span>
+                </p>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    </form>    
+    
+    <?php endif; ?>     
+    <?php if(!empty($ctaxonomies)): ?>
+    <form id="icl_custom_tax_sync_options" name="icl_custom_tax_sync_options" action="">        
+    <table class="widefat">
+        <thead>
+            <tr>
+                <th width="60%"><?php _e('Custom taxonomies', 'sitepress');?></th>
+                <th>&nbsp;</th>
+            </tr>
+        </thead>
+        <tbody>
+            <?php foreach($ctaxonomies as $ctax): ?>
+            <tr>
+                <td><?php echo $wp_taxonomies[$ctax]->label; ?></td>
+                <td>
+                    <label><input type="radio" name="icl_sync_tax[<?php echo $ctax ?>]" value="1" <?php
+                        if($sitepress_settings['taxonomies_sync_option'][$ctax]==1) echo ' checked="checked"'
+                    ?> />&nbsp;<?php _e('Translate', 'sitepress') ?></label>&nbsp;
+                    <label><input type="radio" name="icl_sync_tax[<?php echo $ctax ?>]" value="0" <?php
+                        if($sitepress_settings['taxonomies_sync_option'][$ctax]==0) echo ' checked="checked"'
+                    ?> />&nbsp;<?php _e('Do nothing', 'sitepress') ?></label>
+                </td>
+            </tr>
+            <?php endforeach; ?>
+            <tr>
+                <td colspan="2">
+                <p>
+                    <input type="submit" class="button" value="<?php _e('Save', 'sitepress') ?>" />
+                    <span class="icl_ajx_response" id="icl_ajx_response_ct"></span>
+                </p>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    </form>    
+    
+    <?php endif; ?> 
+    <br clear="all" />
+     
+    <?php do_action('icl_menu_footer'); ?>       
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/troubleshooting.php b/wp-content/plugins/sitepress-multilingual-cms/menu/troubleshooting.php
new file mode 100644
index 0000000..4baca94
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/troubleshooting.php
@@ -0,0 +1,145 @@
+<?php 
+$icl_tables = array(
+    $wpdb->prefix . 'icl_languages',
+    $wpdb->prefix . 'icl_languages_translations',
+    $wpdb->prefix . 'icl_translations',
+    $wpdb->prefix . 'icl_locale_map',
+    $wpdb->prefix . 'icl_flags',
+    $wpdb->prefix . 'icl_content_status',
+    $wpdb->prefix . 'icl_core_status',
+    $wpdb->prefix . 'icl_node',
+    $wpdb->prefix . 'icl_plugins_texts',
+    $wpdb->prefix . 'icl_strings',
+    $wpdb->prefix . 'icl_string_translations',
+    $wpdb->prefix . 'icl_string_status',
+    $wpdb->prefix . 'icl_string_positions',
+    $wpdb->prefix . 'icl_cms_nav_cache',
+    $wpdb->prefix . 'icl_message_status',
+    $wpdb->prefix . 'icl_reminders',    
+);
+
+if( (isset($_POST['icl_reset_allnonce']) && $_POST['icl_reset_allnonce']==wp_create_nonce('icl_reset_all'))){
+    if($_POST['icl-reset-all']=='on'){
+        foreach($icl_tables as $icl_table){
+            mysql_query("DROP TABLE " . $icl_table);
+        }
+        delete_option('icl_sitepress_settings');
+        delete_option('icl_sitepress_version');
+        delete_option('_icl_cache');
+        delete_option('WPLANG');                
+        deactivate_plugins(basename(ICL_PLUGIN_PATH) . '/sitepress.php');
+        $ra = get_option('recently_activated');
+        $ra[basename(ICL_PLUGIN_PATH) . '/sitepress.php'] = time();
+        update_option('recently_activated', $ra);        
+        echo '<script type="text/javascript">location.href=\''.admin_url('plugins.php?deactivate=true').'\'</script>';
+    }
+}                                    
+
+
+?>
+<div class="wrap">
+    <div id="icon-options-general" class="icon32 icon32_adv" style="background: transparent url(<?php echo ICL_PLUGIN_URL; ?>/res/img/icon_adv.png) no-repeat;"><br /></div>
+    <h2><?php echo __('Troubleshooting', 'sitepress') ?></h2>    
+    
+    <?php include ICL_PLUGIN_PATH . '/menu/basic_advanced_switch.php' ?>
+    
+    <?php
+    foreach($icl_tables as $icl_table){
+        echo '<a href="#'.$icl_table.'_anch">'.$icl_table.'</a> | ';
+    }
+    echo '<a href="#wpml-settings">'.__('WPML Settings', 'sitepress').'</a>';
+    
+    foreach($icl_tables as $icl_table){
+        echo '<h3  id="'.$icl_table.'_anch" onclick="jQuery(\'#'.$icl_table.'\').toggle(); jQuery(\'#'.$icl_table.'_arrow_up\').toggle(); jQuery(\'#'.$icl_table.'_arrow_dn\').toggle();" style="cursor:pointer">'.$icl_table.'&nbsp;&nbsp;<span id="'.$icl_table.'_arrow_up" style="display:none">&uarr;</span><span id="'.$icl_table.'_arrow_dn">&darr;</span></h3>';        
+        if(strtolower($wpdb->get_var("SHOW TABLES LIKE '{$icl_table}'")) != strtolower($icl_table)){
+            echo '<p class="error">'.__('Not found!', 'sitepress').'</p>';
+        }else{
+            $results = $wpdb->get_results("DESCRIBE {$icl_table}", ARRAY_A);
+            $keys = array_keys($results[0]);
+            ?>
+            <table class="widefat">
+                <thead>
+                    <tr>
+                    <?php foreach($keys as $k): ?><th width="<?php echo floor(100/count($keys)) ?>%"><?php echo $k ?></th><?php endforeach; ?>
+                    </tr>
+                </thead>
+                <tbody>
+                    <?php foreach($results as $r):?>
+                    <tr>
+                        <?php foreach($keys as $k): ?><td><?php echo $r[$k] ?></td><?php endforeach; ?>
+                    </tr>
+                    <?php endforeach; ?>
+                </tbody>
+            <tbody>
+            </table>
+            <?php
+            echo '<span id="'.$icl_table.'" style="display:none">';    
+            $results = $wpdb->get_results("SELECT * FROM {$icl_table}", ARRAY_A);
+            echo '<textarea style="font-size:10px;width:100%" wrap="off" rows="8" readonly="readonly">';
+            $inc = 0;
+            foreach((array)$results as $res){
+                if($inc==0){
+                    $columns = array_keys($res);
+                    $columns = array_map('__custom_csv_escape', $columns);
+                    echo implode(",", $columns) . PHP_EOL;;
+                }
+                $inc++;
+                $res = array_map('__custom_csv_escape', $res);
+                echo implode(",", $res) . PHP_EOL;
+            }
+            echo '</textarea>';
+            echo '</span>';        
+        }        
+        
+    }
+    
+    function __custom_csv_escape($s){
+        $s = "&#34;". str_replace('"','&#34;',addslashes($s)) . "&#34;";
+        return $s;
+    }                         
+    echo '<br /><hr /><h3 id="wpml-settings"> ' . __('WPML settings', 'sitepress') . '</h3>';
+    echo '<textarea style="font-size:10px;width:100%" wrap="off" rows="16" readonly="readonly">';
+    ob_start();
+    print_r($sitepress->get_settings());
+    $ob = ob_get_contents();
+    ob_end_clean();
+    echo htmlspecialchars($ob);
+    echo '</textarea>';
+    
+    ?> 
+    
+    <script type="text/javascript">
+    jQuery(document).ready(function(){
+        jQuery('#icl_torubleshooting_more_options').submit(iclSaveForm);
+    })
+    </script>
+    <h3><?php _e('More options', 'sitepress')?></h3>
+    <form name="icl_torubleshooting_more_options" id="icl_torubleshooting_more_options" action="">
+    <label><input type="checkbox" name="troubleshooting_options[raise_mysql_errors]" value="1" <?php 
+        if($sitepress_settings['troubleshooting_options']['raise_mysql_errors']): ?>checked="checked"<?php endif; ?>/>&nbsp;<?php 
+        _e('Raise mysql errors on XML-RPC calls', 'sitepress')?></label>
+    <p>
+        <input class="button" name="save" value="<?php echo __('Apply','sitepress') ?>" type="submit" />
+        <span class="icl_ajx_response" id="icl_ajx_response"></span>
+    </p>    
+    </form>
+       
+    <h3><?php _e('Database dump', 'sitepress')?></h3>
+    <a class="button" href="admin.php?page=<?php echo ICL_PLUGIN_FOLDER ?>/menu/troubleshooting.php&amp;icl_action=dbdump"><?php _e('Download', 'sitepress') ?></a>
+    <?php
+    
+    echo '<br /><hr /><h3 id="wpml-settings"> ' . __('Reset', 'sitepress') . '</h3>';
+    echo '<form method="post" onsubmit="return confirm(\''.__('Are you sure you want to reset all languages data? This operation cannot be reversed.', 'sitepress').'\')">';
+    wp_nonce_field('icl_reset_all','icl_reset_allnonce');
+    echo '<p class="error" style="padding:6px;">' . __("All translations you have sent to ICanLocalize will be lost if you reset WPML's data. They cannot be recovered later.", 'sitepress') 
+        . '</p>';
+    echo '<label><input type="checkbox" name="icl-reset-all" onchange="if(this.checked) jQuery(\'#reset-all-but\').removeAttr(\'disabled\'); else  jQuery(\'#reset-all-but\').attr(\'disabled\',\'disabled\');" /> ' . __('I am about to reset all language data.', 'sitepress') . '</label><br /><br />';
+    echo '<input id="reset-all-but" type="submit" disabled="disabled" class="button-primary" value="'.__('Reset all language data and deactivate WPML', 'sitepress').'" />';    
+    echo '</form>';
+    
+    
+    
+    ?>
+    <?php do_action('icl_menu_footer'); ?>
+</div>
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/menu/upgrade_notice.php b/wp-content/plugins/sitepress-multilingual-cms/menu/upgrade_notice.php
new file mode 100644
index 0000000..4448ff9
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/menu/upgrade_notice.php
@@ -0,0 +1,34 @@
+<?php 
+$upgrade_lines =  array(
+    '1.3.1' => __('translation controls on posts and pages lists', 'sitepress'),
+    '1.3.3' => __('huge speed improvements and the ability to prevent loading WPML\'s CSS and JS files', 'sitepress'),
+    '1.3.4' => __('you can configure the position and contents of the posts page in the top navigation', 'sitepress'),
+    '1.3.5' => __('many bugs fixed and an easy way to show your love for WPML', 'sitepress'),
+    '1.4.0' => __('simplified operation for basic usage and for getting professional translation', 'sitepress'),
+    '1.5.0' => __('theme compatibility packages, design for language switcher and language fall-back for posts', 'sitepress'),
+    '1.5.1' => __('bugs fixed and new support for Headspace2 SEO plugin', 'sitepress'),
+    '1.6.0' => __('WPML can now translate other plugins', 'sitepress'),
+    '1.7.0' => __('WPML adapts to any WordPress theme', 'sitepress'),
+    '1.7.1' => __('Home-page link automatically adjusts per language', 'sitepress'),
+    '1.7.2' => __('Bug fixes and stability improvements', 'sitepress'),
+    '1.7.3' => __('Added languages editing and translation for admin-texts','sitepress'),
+    '1.7.4' => __('Works with WordPress 3','sitepress'),
+    '1.7.6' => __('Works with WordPress 3','sitepress'),
+    '1.7.7' => __('Supports custom taxonomies and lots of bug fixes for tags and categories','sitepress'),
+    '1.7.8' => __('Supports custom post types','sitepress'),
+    '1.8.0' => __('Supports multilingual menus','sitepress'),
+    '1.8.1' => __('Multilingual menus bug fixes and improved translation interface','sitepress')
+);
+
+$short_v = implode('.', array_slice(explode('.', ICL_SITEPRESS_VERSION), 0, 3));
+if(!isset($upgrade_lines[$short_v])) return;
+
+?>
+<br clear="all" />
+<div id="icl_update_message" class="updated message fade" style="clear:both;margin-top:5px;">
+    <p><?php printf(__('New in WPML %s: <b>%s</b>', 'sitepress'), $short_v, $upgrade_lines[$short_v]); ?></p>
+    <p>
+        <a href="http://wpml.org/?cat=48";><?php _e('Learn more', 'sitepress')?></a>&nbsp;|&nbsp;
+        <a title="<?php _e('Stop showing this message', 'sitepress') ?>" id="icl_dismiss_upgrade_notice" href="#"><?php _e('Dismiss', 'sitepress') ?></a>
+    </p>
+</div>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/absolute-links-plugin.php b/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/absolute-links-plugin.php
new file mode 100644
index 0000000..2020b2e
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/absolute-links-plugin.php
@@ -0,0 +1,884 @@
+<?php 
+/*
+Plugin Name: Absolute Links Plugin
+Plugin URI: http://wpml.org/wordpress-cms-plugins/absolute-links-plugin/
+Description: Doesn't just fix links. Makes sure they can never break. <a href="options-general.php?page=alp">Configure &raquo;</a>.
+Author: ICanLocalize
+Author URI: http://wpml.org
+Version: 1.1.1
+*/
+
+/*
+    This file is part of Absolute Links.
+
+    Absolute Links is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    Absolute Links is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Absolute Links.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+class AbsoluteLinksPlugin{
+    var $settings;
+    var $cur_ver;
+    var $broken_links;
+    var $plugin_url = '';
+    private $custom_post_query_vars = array();
+    private $taxonomies_query_vars = array();
+    
+    
+    function __construct($ext = false){  
+        global $sitepress_settings;
+        $this->settings = get_option('alp_settings');
+        //add_action('admin_menu',array($this,'management_page'));
+        if(isset($_POST['save_alp']) && $_POST['save_alp']){            
+            add_action('init', array($this,'save_settings'));           
+        }
+        
+        if(!$ext){
+            add_action('save_post', array($this,'save_default_urls'));
+            add_action('init', array($this,'ajax_responses'));
+            add_action('admin_head',array($this,'js_scripts'));  
+        
+            add_filter('the_content', array($this,'show_permalinks'));
+        }
+        
+        if($sitepress_settings['modules']['absolute-links']['sticky_links_widgets'] || $sitepress_settings['modules']['absolute-links']['sticky_links_strings']){                               
+            add_filter('widget_text', array($this,'show_permalinks'), 99); // low priority - allow translation to be set        
+        }        
+        
+        if($sitepress_settings['modules']['absolute-links']['sticky_links_widgets']){            
+            add_filter('pre_update_option_widget_text', array($this,'pre_update_option_widget_text'), 5, 2);
+        }
+        
+        $path = dirname(substr(__FILE__, strpos(__FILE__, basename(WP_CONTENT_DIR))));
+        $path = str_replace('\\','/',$path);
+        $this->plugin_url = rtrim(get_option('siteurl'),'/') .'/' . $path;
+
+        if(0 === strpos(ICL_PLUGIN_URL,'https://')){
+            $this->plugin_url = str_replace('http://', 'https://', $this->plugin_url);
+        }        
+        
+        if(defined('ICL_LANGUAGE_CODE')){ // init already fired
+            $this->init_query_vars();    
+        }else{
+            add_action('init', array($this, 'init_query_vars'), 30);    
+        }
+    }
+    
+    function init_query_vars(){
+        global $wp_post_types, $wp_taxonomies;
+        
+        //custom posts query vars
+        foreach($wp_post_types as $k=>$v){
+            if(in_array($k, array('post','page'))){
+                continue;
+            }
+            if($v->query_var){
+                $this->custom_post_query_vars[$k] = $v->query_var;    
+            }            
+        }        
+        //taxonomies query vars
+        foreach($wp_taxonomies as $k=>$v){
+            if(in_array($k, array('category'))){
+                continue;
+            }
+            if($k == 'post_tag' && !$v->query_var){
+                $v->query_var = $tag_base = get_option('tag_base') ? $tag_base : 'tag';
+            }
+            if($v->query_var){
+                $this->taxonomies_query_vars[$k] = $v->query_var;    
+            }            
+        }
+        
+    }
+    
+    function __destruct(){
+        return;
+    }
+    
+    /* MAKE IT PHP 4 COMPATIBLE */
+    function AbsoluteLinksPlugin(){
+     //destructor
+     register_shutdown_function(array(&$this, '__destruct'));
+
+     //constructor
+     $argcv = func_get_args();
+     call_user_func_array(array(&$this, '__construct'), $argcv);
+    }    
+    
+    
+    function save_settings(){
+        $nonce = wp_create_nonce('absolute-links-plugin');
+        if($nonce != $_POST['_wpnonce']) return;        
+    }
+    
+    function ajax_responses(){  
+        if(!isset($_POST['alp_ajx_action'])){
+            return;
+        }
+        global $wpdb, $wp_post_types;
+        $post_types = array_diff(array_keys($wp_post_types), array('revision','attachment','nav_menu_item'));
+        
+        $limit  = 5;
+        
+        switch($_POST['alp_ajx_action']){
+            case 'rescan':
+                $posts_pages = $wpdb->get_col("
+                    SELECT SQL_CALC_FOUND_ROWS p1.ID FROM {$wpdb->posts} p1 WHERE post_type IN ('".join("','", $post_types)."') AND ID NOT IN 
+                    (SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = '_alp_processed')
+                    ORDER BY p1.ID ASC LIMIT $limit
+                ");
+                if($posts_pages){
+                    $found = $wpdb->get_var("SELECT FOUND_ROWS()");                
+                    foreach($posts_pages as $ppid){
+                        $this->process_post($ppid);
+                    }
+                    echo $found >= $limit ? $found - $limit : 0;
+                }else{
+                    echo -1;
+                }                
+                break;
+            case 'rescan_reset':
+                $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key='_alp_processed'");
+                echo mysql_affected_rows();
+                break;
+            case 'use_suggestion':
+                $broken_links = get_post_meta($_POST['post_id'],'_alp_broken_links', true);
+                foreach($broken_links as $k=>$bl){
+                    if($k==$_POST['orig_url']){
+                        $broken = $k;
+                        $repl = $bl['suggestions'][$_POST['sug_id']]['absolute'];
+                        unset($broken_links[$k]);
+                        $c = count($broken_links);
+                        if($c){
+                            update_post_meta($_POST['post_id'],'_alp_broken_links', $broken_links);
+                        }else{
+                            delete_post_meta($_POST['post_id'],'_alp_broken_links');
+                        }
+                        echo $c.'|'.$bl['suggestions'][$_POST['sug_id']]['perma'];
+                        break;
+                    }
+                }
+                $post_content = $wpdb->get_var("SELECT post_content FROM {$wpdb->posts} WHERE ID={$_POST['post_id']}");
+                $post_content = preg_replace('@href="('.$broken.')"@i', 'href="'.$repl.'"', $post_content);
+                $wpdb->update($wpdb->posts, array('post_content'=>$post_content), array('ID'=>$_POST['post_id']));
+                break;
+            case 'alp_revert_urls':
+                $posts_pages = $wpdb->get_results("
+                    SELECT SQL_CALC_FOUND_ROWS p1.ID, p1.post_content FROM {$wpdb->posts} p1
+                    JOIN {$wpdb->postmeta} p2 ON p1.ID = p2.post_id
+                    WHERE p1.post_type IN ('".join("','", $post_types)."') AND p2.meta_key = '_alp_processed'
+                    ORDER BY p1.ID ASC LIMIT $limit
+                ");   
+                if($posts_pages){
+                    $found = $wpdb->get_var("SELECT FOUND_ROWS()");                
+                    foreach($posts_pages as $p){
+                        $cont = $this->show_permalinks($p->post_content);
+                        $wpdb->update($wpdb->posts, array('post_content'=>$cont), array('ID'=>$p->ID));                        
+                        delete_post_meta($p->ID,'_alp_processed');
+                        delete_post_meta($p->ID,'_alp_broken_links');
+                    }
+                    echo $found >= $limit ? $found - $limit : 0;
+                }else{
+                    echo -1;
+                }                                    
+                break;
+        }
+        exit;
+    }    
+    
+    function js_scripts(){
+        ?>
+        <script type="text/javascript">
+            addLoadEvent(function(){                     
+                jQuery('#alp_re_scan_but').click(alp_toogle_scan);                
+                jQuery('#alp_re_scan_but_all').click(alp_reset_scan_flags);
+                jQuery('.alp_use_sug').click(alp_use_suggestion);
+                jQuery('#alp_revert_urls').click(alp_do_revert_urls);
+                
+            });
+            var alp_scan_started = false;
+            var req_timer = 0;
+            function alp_toogle_scan(){                       
+                if(!alp_scan_started){  
+                    alp_send_request(0); 
+                    jQuery('#alp_ajx_ldr_1').fadeIn();
+                    jQuery('#alp_re_scan_but').attr('value','<?php echo icl_js_escape(__('Running', 'sitepress')) ?>');    
+                }else{
+                    jQuery('#alp_re_scan_but').attr('value','<?php echo icl_js_escape(__('Scan', 'sitepress')); ?>');    
+                    window.clearTimeout(req_timer);
+                    jQuery('#alp_ajx_ldr_1').fadeOut();
+                    location.reload();
+                }
+                alp_scan_started = !alp_scan_started;
+                return false;
+            }
+            
+            function alp_send_request(offset){
+                jQuery.ajax({
+                    type: "POST",
+                    url: "<?php echo htmlentities($_SERVER['REQUEST_URI']) ?>",
+                    data: "alp_ajx_action=rescan&amp;offset="+offset,
+                    success: function(msg){                        
+                        if(-1==msg || msg==0){
+                            left = '0';
+                            alp_toogle_scan();
+                        }else{
+                            left=msg;
+                        }
+                        
+                        if(left=='0'){
+                            jQuery('#alp_re_scan_but').attr('disabled','disabled');    
+                        }
+                        
+                        jQuery('#alp_re_scan_toscan').html(left);
+                        if(alp_scan_started){
+                            req_timer = window.setTimeout(alp_send_request,3000,offset);
+                        }
+                    }                                                            
+                });
+            }
+            
+            function alp_reset_scan_flags(){
+                if(alp_scan_started) return;
+                alp_scan_started = false;
+                jQuery('#alp_re_scan_but').removeAttr('disabled');    
+                jQuery.ajax({
+                    type: "POST",
+                    url: "<?php echo htmlentities($_SERVER['REQUEST_URI']) ?>",
+                    data: "alp_ajx_action=rescan_reset",
+                    success: function(msg){    
+                        if(msg){
+                            alp_toogle_scan()
+                        }
+                    }                                                            
+                });
+            }
+            function alp_use_suggestion(){
+                jqthis = jQuery(this);
+                jqthis.parent().parent().css('background-color','#eee');                
+                spl = jqthis.attr('id').split('_');
+                sug_id = spl[3];
+                post_id = spl[4];
+                orig_url = jQuery('#alp_bl_'+spl[5]).html();
+                jQuery.ajax({
+                    type: "POST",
+                    url: "<?php echo htmlentities($_SERVER['REQUEST_URI']) ?>",
+                    data: "alp_ajx_action=use_suggestion&amp;sug_id="+sug_id+"&amp;post_id="+post_id+"&amp;orig_url="+orig_url,
+                    success: function(msg){                                                    
+                        spl = msg.split('|');
+                        jqthis.parent().html('<?php echo icl_js_escape(__('fixed', 'sitepress')); ?> - ' + spl[1]);
+                    },
+                    error: function (msg){
+                        alert('Something went wrong');
+                        jqthis.parent().parent().css('background-color','#fff');
+                    }                                                            
+                });
+                                
+            }
+            
+            var req_rev_timer = '';
+            function alp_do_revert_urls(){
+                jQuery('#alp_revert_urls').attr('disabled','disabled');
+                jQuery('#alp_revert_urls').attr('value','<?php echo icl_js_escape(__('Running', 'sitepress')); ?>');
+                jQuery.ajax({
+                    type: "POST",
+                    url: "<?php echo htmlentities($_SERVER['REQUEST_URI']) ?>",
+                    data: "alp_ajx_action=alp_revert_urls",
+                    success: function(msg){                                                    
+                        if(-1==msg || msg==0){
+                            jQuery('#alp_ajx_ldr_2').fadeOut();
+                            jQuery('#alp_rev_items_left').html('');
+                            window.clearTimeout(req_rev_timer);
+                            jQuery('#alp_revert_urls').removeAttr('disabled');                            
+                            jQuery('#alp_revert_urls').attr('value','<?php echo icl_js_escape(__('Start', 'sitepress')); ?>');                            
+                            location.reload();
+                        }else{
+                            jQuery('#alp_rev_items_left').html(msg + ' <?php echo icl_js_escape(__('items left', 'sitepress')); ?>');
+                            req_rev_timer = window.setTimeout(alp_do_revert_urls,3000);
+                            jQuery('#alp_ajx_ldr_2').fadeIn();
+                        }                            
+                    },
+                    error: function (msg){
+                        //alert('Something went wrong');
+                    }                                                            
+                });
+            }
+            
+        </script>
+        <?php
+    }
+    
+    function management_page(){
+        add_options_page(__('Absolute Links','sitepress'),__('Absolute Links', 'sitepress'),'10', 'alp' , array($this,'management_page_content'));
+    }
+    
+    function management_page_content(){
+        global $wpdb;
+        
+        $this->get_broken_links();
+        $total_posts_pages = $wpdb->get_var("
+            SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type IN ('page','post') AND ID NOT IN 
+            (SELECT post_id FROM {$wpdb->postmeta} WHERE meta_key = '_alp_processed')
+        ");
+        
+        $total_posts_pages_processed = (int) $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE meta_key = '_alp_processed'");   
+        
+        include dirname(__FILE__).'/management-page.php';
+        
+    }
+    
+    
+    function _process_generic_text($text){
+        global $wpdb;
+        global $wp_rewrite, $sitepress, $sitepress_settings;
+        if(!isset($wp_rewrite)){
+            require_once ABSPATH . WPINC . '/rewrite.php'; 
+            $wp_rewrite = new WP_Rewrite();
+        }
+        
+        $rewrite = $wp_rewrite->wp_rewrite_rules();
+        
+        $home_url = $sitepress->language_url($sitepress->get_default_language());
+        $int1 = preg_match_all('@<a([^>]*)href="(('.rtrim($home_url,'/').')?/([^"^>]+))"([^>]*)>@i',$text,$alp_matches1);        
+        $int2 = preg_match_all('@<a([^>]*)href=\'(('.rtrim($home_url,'/').')?/([^\'^>]+))\'([^>]*)>@i',$text,$alp_matches2);        
+        for($i = 0; $i < 6; $i++){
+            $alp_matches[$i] = array_merge((array)$alp_matches1[$i], (array)$alp_matches2[$i]); 
+        }
+        
+        if($int1 || $int2){   
+            $url_parts = parse_url(rtrim(get_option('home'),'/').'/');                                                    
+            foreach($alp_matches[4] as $k=>$m){
+                if(0===strpos($m, basename(WP_CONTENT_DIR))) continue;
+                
+                if($sitepress_settings['language_negotiation_type']==1){
+                        $m_orig = $m;
+                        $exp = explode('/', $m, 2);                
+                        $lang = $exp[0];
+                        if($wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code='{$lang}'")){
+                            $m = $exp[1];    
+                        }else{
+                            $m = $m_orig;
+                            unset($m_orig);
+                            $lang = false;
+                        }                        
+                }elseif($sitepress_settings['language_negotiation_type']==2){
+                    //
+                }
+                
+                $pathinfo = '';
+                $req_uri = '/' . $m;                                
+                $req_uri_array = explode('?', $req_uri);
+                $req_uri = $req_uri_array[0];
+                // separate anchor
+                $req_uri_array = explode('#', $req_uri);
+                $req_uri = $req_uri_array[0];
+                $anchor = $req_uri_array[1];
+                $self = '/index.php';
+                $home_path = parse_url(get_option('home'));
+                if ( isset($home_path['path']) )
+                    $home_path = $home_path['path'];
+                else
+                    $home_path = '';
+                $home_path = trim($home_path, '/');
+                
+                $req_uri = str_replace($pathinfo, '', rawurldecode($req_uri));
+                $req_uri = trim($req_uri, '/');
+                $req_uri = preg_replace("|^$home_path|", '', $req_uri);
+                $req_uri = trim($req_uri, '/');
+                $pathinfo = trim($pathinfo, '/');
+                $pathinfo = preg_replace("|^$home_path|", '', $pathinfo);
+                $pathinfo = trim($pathinfo, '/');
+                $self = trim($self, '/');
+                $self = preg_replace("|^$home_path|", '', $self);
+                $self = trim($self, '/');
+                
+                if ( ! empty($pathinfo) && !preg_match('|^.*' . $wp_rewrite->index . '$|', $pathinfo) ) {
+                    $request = $pathinfo;
+                } else {
+                    // If the request uri is the index, blank it out so that we don't try to match it against a rule.
+                    if ( $req_uri == $wp_rewrite->index )
+                        $req_uri = '';
+                    $request = $req_uri;
+                }
+
+                $this_request = $request;
+                
+                $request_match = $request;                
+                
+                foreach ( (array) $rewrite as $match => $query) {
+
+                    // If the requesting file is the anchor of the match, prepend it
+                    // to the path info.
+                    if ((! empty($req_uri)) && (strpos($match, $req_uri) === 0) && ($req_uri != $request)) {
+                        $request_match = $req_uri . '/' . $request;
+                    }
+                    
+                    if (preg_match("!^$match!", $request_match, $matches) ||
+                        preg_match("!^$match!", urldecode($request_match), $matches)) {
+                        // Got a match.
+                        $matched_rule = $match;
+
+                        // Trim the query of everything up to the '?'.
+                        $query = preg_replace("!^.+\?!", '', $query);
+                        
+                        // Substitute the substring matches into the query.
+                        eval("@\$query = \"" . addslashes($query) . "\";");
+
+                        $matched_query = $query;
+
+                        // Parse the query.
+                        parse_str($query, $perma_query_vars);
+                        
+                        break;
+                    }
+                }                
+                
+                
+                $post_name = $category_name = $tax_name = false;
+                if(isset($perma_query_vars['pagename'])){
+                    $post_name = basename($perma_query_vars['pagename']); 
+                    $post_type = 'page';
+                }elseif(isset($perma_query_vars['name'])){
+                    $post_name = $perma_query_vars['name']; 
+                    $post_type = 'post';
+                }elseif(isset($perma_query_vars['category_name'])){
+                    $category_name = $perma_query_vars['category_name']; 
+                }else{
+                    foreach($this->custom_post_query_vars as $k=>$v){
+                        if(isset($perma_query_vars[$v])){
+                            $post_name = $perma_query_vars[$v];
+                            $post_type = $k;
+                            $post_qv   = $v;
+                            break;
+                        }
+                    }
+                    foreach($this->taxonomies_query_vars as $k=>$v){
+                        if(isset($perma_query_vars[$v])){
+                            $tax_name = $perma_query_vars[$v];
+                            $tax_type = $v;
+                            break;
+                        }
+                    }                    
+                }
+                
+                if($post_name){                    
+                    $name = $wpdb->escape($post_name);
+                    //$post_type = isset($perma_query_vars['pagename']) ? 'page' : 'post';
+                    $p = $wpdb->get_row("SELECT ID, post_type FROM {$wpdb->posts} WHERE post_name='{$name}' AND post_type ='{$post_type}'");
+                    if($p){
+                        if($post_type=='page'){
+                            $qvid = 'page_id';
+                        }else{
+                            $qvid = 'p';
+                        }
+                        
+                        if($sitepress_settings['language_negotiation_type']==1 && $lang){
+                            $langprefix = '/' . $lang;
+                        }else{
+                            $langprefix = '';
+                        }
+                        $perm_url = '('.rtrim($home_url,'/') . ')?' . $langprefix .'/'.$m;
+                        $regk = '@href=[\'"]('.$perm_url.')[\'"] i'; 
+                        if ($anchor){
+                            $anchor = "#".$anchor;
+                        } else {
+                            $anchor = "";
+                        }
+                        // check if this is an offsite url
+                        if($p->post_type=='page' && $offsite_url = get_post_meta($p->ID, '_cms_nav_offsite_url', true)){
+                            $regv = 'href="'.$offsite_url.$anchor.'"';
+                        }else{
+                            $regv = 'href="' . '/' . ltrim($url_parts['path'],'/') . '?' . $qvid . '=' . $p->ID.$anchor.'"';
+                        }
+                        $def_url[$regk] = $regv;
+                    }
+                }elseif($category_name){
+                    $name = $wpdb->escape($category_name);                    
+                    $c = $wpdb->get_row("SELECT term_id FROM {$wpdb->terms} WHERE slug='{$name}'");                    
+                    if($c){
+                        $perm_url = '('.rtrim($home_url,'/') . ')?' . $langprefix .'/'.$m;
+                        $regk = '@href=[\'"]('.$perm_url.')[\'"] i';
+                        $url_parts = parse_url(rtrim(get_option('home'),'/').'/');
+                        $regv = 'href="' . '/' . ltrim($url_parts['path'],'/') . '?cat_ID=' . $c->term_id.'"';
+                        $def_url[$regk] = $regv;                        
+                    }                       
+                }elseif($tax_name){
+                    
+                    if($sitepress_settings['language_negotiation_type']==1 && $lang){
+                        $langprefix = '/' . $lang;
+                    }else{
+                        $langprefix = '';
+                    }
+                    
+                    $perm_url = '('.rtrim($home_url,'/') . ')?' . $langprefix .'/'.$m;
+                    $regk = '@href=["\']('.$perm_url.')["\'] i'; 
+                    if ($anchor){
+                        $anchor = "#".$anchor;
+                    } else {
+                        $anchor = "";
+                    }
+                    
+                    $regv = 'href="' . '/' . ltrim($url_parts['path'],'/') . '?' . $tax_type . '=' . $tax_name.$anchor.'"';
+                    $def_url[$regk] = $regv;
+                    
+                }
+            }
+            
+              
+            if($def_url){
+                $text = preg_replace(array_keys($def_url),array_values($def_url),$text);
+                
+            }
+                  
+            $tx_qvs = $this->taxonomies_query_vars ? '|' . join('|',$this->taxonomies_query_vars) : '';                            $post_qvs = $this->taxonomies_query_vars ? '|' . join('|',$this->custom_posts_query_vars) : '';    
+            $int = preg_match_all('@href=[\'"]('.rtrim(get_option('home'),'/').'/?\?(p|page_id'.$tx_qvs.$post_qvs.')=([0-9a-z-]+)(#.+)?)[\'"] i',$text,$matches2);          
+            if($int){
+                $url_parts = parse_url(rtrim(get_option('home'),'/').'/');
+                $text = preg_replace('@href=[\'"]('. rtrim(get_option('home'),'/') .'/?\?(p|page_id'.$tx_qvs.$post_qvs.')=([0-9a-z-]+)(#.+)?)[\'"] i', 'href="'.'/' . ltrim($url_parts['path'],'/').'?$2=$3$4"', $text);
+            }
+            
+        }          
+        
+        return $text;
+    }
+    
+    function process_string($st_id, $translation=true){
+        global $wpdb;
+        if($st_id){
+            if($translation){
+                $string_value = $wpdb->get_var("SELECT value FROM {$wpdb->prefix}icl_string_translations WHERE id=" . $st_id);
+            }else{
+                $string_value = $wpdb->get_var("SELECT value FROM {$wpdb->prefix}icl_strings WHERE id=" . $st_id);
+            }
+            $string_value_up = $this->_process_generic_text($string_value);
+            
+            if($string_value_up != $string_value){
+                if($translation){
+                    $wpdb->update($wpdb->prefix . 'icl_string_translations', array('value'=>$string_value_up), array('id'=>$st_id));
+                }else{
+                    $wpdb->update($wpdb->prefix . 'icl_strings', array('value'=>$string_value_up), array('id'=>$st_id));
+                }
+            }
+        }
+    }
+    
+    function pre_update_option_widget_text($new_value, $old_value){
+        global $wpdb;
+        if(is_array($new_value)){ 
+            foreach($new_value as $k=>$w){
+                if(isset($w['text'])){
+                    $new_value[$k]['text'] = $this->_process_generic_text($w['text']);
+                }
+            }
+            if($new_value !== $old_value){
+                $wpdb->update($wpdb->options, array('option_value'=>$new_value), array('option_name'=>'widget_text'));
+            }            
+        }
+        return $new_value;
+    }
+
+    function save_default_urls($post_id){
+        if(!isset($_POST['autosave'])){
+            $this->process_post($post_id);
+        }       
+    }    
+    
+    function process_post($post_id){
+        global $wpdb, $wp_rewrite, $sitepress;
+        if(!isset($wp_rewrite)){
+            require_once ABSPATH . WPINC . '/rewrite.php'; 
+            $wp_rewrite = new WP_Rewrite();
+        }
+        
+        $rewrite = $wp_rewrite->wp_rewrite_rules();
+        
+        delete_post_meta($post_id,'_alp_broken_links');
+
+        $post = $wpdb->get_row("SELECT * FROM {$wpdb->posts} WHERE ID={$post_id}"); 
+        $home_url = $sitepress->language_url($_POST['icl_post_language']);
+        $int1  = preg_match_all('@<a([^>]*)href="(('.rtrim($home_url,'/').')?/([^"^>^#]+))"([^>]*)>@i',$post->post_content,$alp_matches1);        
+        $int2 = preg_match_all('@<a([^>]*)href=\'(('.rtrim($home_url,'/').')?/([^\'^>^#]+))\'([^>]*)>@i',$post->post_content,$alp_matches2);        
+        for($i = 0; $i < 6; $i++){
+            $alp_matches[$i] = array_merge((array)$alp_matches1[$i], (array)$alp_matches2[$i]); 
+        }        
+        $sitepress_settings = $sitepress->get_settings();
+        
+        if($int1 || $int2){   
+            $url_parts = parse_url(rtrim(get_option('home'),'/').'/');                                                    
+            foreach($alp_matches[4] as $k=>$m){
+                if(0===strpos($m, basename(WP_CONTENT_DIR))) continue;
+                
+                if($sitepress_settings['language_negotiation_type']==1){
+                        $m_orig = $m;
+                        $exp = explode('/', $m, 2);                
+                        $lang = $exp[0];
+                        if($wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code='{$lang}'")){
+                            $m = $exp[1];    
+                        }else{
+                            $m = $m_orig;
+                            unset($m_orig);
+                            $lang = false;
+                        }                        
+                }elseif($sitepress_settings['language_negotiation_type']==2){
+                    //
+                }
+
+                $pathinfo = '';
+                $req_uri = '/' . $m;                                                                
+                $req_uri_array = explode('?', $req_uri);
+                $req_uri = $req_uri_array[0];
+                // separate anchor
+                $req_uri_array = explode('#', $req_uri);                
+                $req_uri = $req_uri_array[0];
+                $anchor = $req_uri_array[1];                
+                $self = '/index.php';
+                $home_path = parse_url(get_option('home'));
+                if ( isset($home_path['path']) )
+                    $home_path = $home_path['path'];
+                else
+                    $home_path = '';
+                $home_path = trim($home_path, '/');
+                
+                $req_uri = str_replace($pathinfo, '', rawurldecode($req_uri));
+                $req_uri = trim($req_uri, '/');
+                $req_uri = preg_replace("|^$home_path|", '', $req_uri);
+                $req_uri = trim($req_uri, '/');
+                $pathinfo = trim($pathinfo, '/');
+                $pathinfo = preg_replace("|^$home_path|", '', $pathinfo);
+                $pathinfo = trim($pathinfo, '/');
+                $self = trim($self, '/');
+                $self = preg_replace("|^$home_path|", '', $self);
+                $self = trim($self, '/');
+                
+                if ( ! empty($pathinfo) && !preg_match('|^.*' . $wp_rewrite->index . '$|', $pathinfo) ) {
+                    $request = $pathinfo;
+                } else {
+                    // If the request uri is the index, blank it out so that we don't try to match it against a rule.
+                    if ( $req_uri == $wp_rewrite->index )
+                        $req_uri = '';
+                    $request = $req_uri;
+                }
+
+                $this_request = $request;
+                
+                $request_match = $request;
+                
+                foreach ( (array) $rewrite as $match => $query) {
+
+                    // If the requesting file is the anchor of the match, prepend it
+                    // to the path info.
+                    if ((! empty($req_uri)) && (strpos($match, $req_uri) === 0) && ($req_uri != $request)) {
+                        $request_match = $req_uri . '/' . $request;
+                    }
+                    
+                    if (preg_match("!^$match!", $request_match, $matches) ||
+                        preg_match("!^$match!", urldecode($request_match), $matches)) {
+                        // Got a match.
+                        $matched_rule = $match;
+
+                        // Trim the query of everything up to the '?'.
+                        $query = preg_replace("!^.+\?!", '', $query);
+                        
+                        // Substitute the substring matches into the query.
+                        eval("@\$query = \"" . addslashes($query) . "\";");
+
+                        $matched_query = $query;
+
+                        // Parse the query.
+                        parse_str($query, $perma_query_vars);
+                        
+                        break;
+                    }
+                }  
+                
+                
+                $post_name = $category_name = $tax_name = false;
+                if(isset($perma_query_vars['pagename'])){
+                    $post_name = basename($perma_query_vars['pagename']); 
+                    $post_type = 'page';
+                }elseif(isset($perma_query_vars['name'])){
+                    $post_name = $perma_query_vars['name']; 
+                    $post_type = 'post';
+                }elseif(isset($perma_query_vars['category_name'])){
+                    $category_name = $perma_query_vars['category_name']; 
+                }else{
+                    foreach($this->custom_post_query_vars as $k=>$v){
+                        if(isset($perma_query_vars[$v])){
+                            $post_name = $perma_query_vars[$v];
+                            $post_type = $k;
+                            $post_qv   = $v;
+                            break;
+                        }
+                    }
+                    foreach($this->taxonomies_query_vars as $k=>$v){
+                        if(isset($perma_query_vars[$v])){
+                            $tax_name = $perma_query_vars[$v];
+                            $tax_type = $v;
+                            break;
+                        }
+                    }                    
+                }                
+                if($post_name){                    
+                    $name = $wpdb->escape($post_name);
+                    //$post_type = isset($perma_query_vars['pagename']) ? 'page' : 'post';
+                    $p = $wpdb->get_row("SELECT ID, post_type FROM {$wpdb->posts} WHERE post_name='{$name}' AND post_type ='{$post_type}'");
+                    
+                    if($p){
+                        if($post_type=='page'){
+                            $qvid = 'page_id';
+                        }else{
+                            $qvid = 'p';
+                        }
+                        if($sitepress_settings['language_negotiation_type']==1 && $lang){
+                            $langprefix = '/' . $lang;
+                        }else{
+                            $langprefix = '';
+                        }
+                        $perm_url = '('.rtrim($home_url,'/') . ')?' . $langprefix .'/'.$m;
+                        $regk = '@href=["\']('.$perm_url.')["\'] i'; 
+                        if ($anchor){
+                            $anchor = "#".$anchor;
+                        } else {
+                            $anchor = "";
+                        }
+                        // check if this is an offsite url
+                        if($p->post_type=='page' && $offsite_url = get_post_meta($p->ID, '_cms_nav_offsite_url', true)){
+                            $regv = 'href="'.$offsite_url.$anchor.'"';
+                        }else{
+                            $regv = 'href="' . '/' . ltrim($url_parts['path'],'/') . '?' . $qvid . '=' . $p->ID.$anchor.'"';
+                        }
+                        $def_url[$regk] = $regv;
+                    }else{ 
+                        $alp_broken_links[$alp_matches[2][$k]] = array();                            
+                        $p = $wpdb->get_results("SELECT ID, post_type FROM {$wpdb->posts} WHERE post_name LIKE '{$name}%' AND post_type IN('post','page')");
+                        if($p){
+                            foreach($p as $post_suggestion){
+                                if($post_suggestion->post_type=='page'){
+                                    $qvid = 'page_id';
+                                }else{
+                                    $qvid = 'p';
+                                }
+                                $alp_broken_links[$alp_matches[2][$k]]['suggestions'][] = array(
+                                        'absolute'=> '/' . ltrim($url_parts['path'],'/') . '?' . $qvid . '=' . $post_suggestion->ID,
+                                        'perma'=> '/'. ltrim(str_replace(get_option('home'),'',get_permalink($post_suggestion->ID)),'/'),
+                                        );
+                            }
+                        }                        
+                    }
+                }elseif($category_name){
+                    $name = $wpdb->escape($category_name);                    
+                    $c = $wpdb->get_row("SELECT term_id FROM {$wpdb->terms} WHERE slug='{$name}'");                                        
+                    if($c){
+                        /* not used ?? */
+                        if($sitepress_settings['language_negotiation_type']==1 && $lang){ 
+                            $langprefix = '/' . $lang;                                  
+                        }else{
+                            $langprefix = '';
+                        }
+                        /* not used ?? */
+                        $perm_url = '('.rtrim($home_url,'/') . ')?' . $langprefix .'/'.$m;
+                        $regk = '@href=[\'"]('.$perm_url.')[\'"] i';
+                        $url_parts = parse_url(rtrim(get_option('home'),'/').'/');
+                        $regv = 'href="' . '/' . ltrim($url_parts['path'],'/') . '?cat_ID=' . $c->term_id.'"';
+                        $def_url[$regk] = $regv;
+                    }else{
+                        $alp_broken_links[$alp_matches[2][$k]] = array();                             
+                        $c = $wpdb->get_results("SELECT term_id FROM {$wpdb->terms} WHERE slug LIKE '{$name}%'");                        
+                        if($c){
+                            foreach($c as $cat_suggestion){
+                                $alp_broken_links[$alp_matches[2][$k]]['suggestions'][] = array(
+                                        'absolute'=>'?cat_ID=' . $cat_suggestion->term_id,
+                                        'perma'=> '/'. ltrim(str_replace(get_option('home'),'',get_category_link($cat_suggestion->term_id)),'/')
+                                        );
+                            }
+                        }                        
+                    }                        
+                }elseif($tax_name){
+                    
+                    if($sitepress_settings['language_negotiation_type']==1 && $lang){
+                        $langprefix = '/' . $lang;
+                    }else{
+                        $langprefix = '';
+                    }
+                    
+                    $perm_url = '('.rtrim($home_url,'/') . ')?' . $langprefix .'/'.$m;
+                    $regk = '@href=["\']('.$perm_url.')["\'] i'; 
+                    if ($anchor){
+                        $anchor = "#".$anchor;
+                    } else {
+                        $anchor = "";
+                    }
+                    
+                    $regv = 'href="' . '/' . ltrim($url_parts['path'],'/') . '?' . $tax_type . '=' . $tax_name.$anchor.'"';
+                    $def_url[$regk] = $regv;
+                    
+                }
+            }
+            $post_content = $post->post_content;
+            
+            if($def_url){
+                $post_content = preg_replace(array_keys($def_url),array_values($def_url),$post_content);
+                
+            }
+            
+            $tx_qvs = is_array($this->taxonomies_query_vars) && !empty($this->taxonomies_query_vars) ? '|' . join('|',$this->taxonomies_query_vars) : '';                            
+            $post_qvs = is_array($this->custom_posts_query_vars) && !empty($this->custom_posts_query_vars) ? '|' . join('|',$this->custom_posts_query_vars) : '';    
+            $int = preg_match_all('@href=[\'"]('.rtrim(get_option('home'),'/').'/?\?(p|page_id'.$tx_qvs.$post_qvs.')=([0-9a-z-]+)(#.+)?)[\'"] i',$post_content,$matches2);          
+            if($int){
+                $url_parts = parse_url(rtrim(get_option('home'),'/').'/');
+                $post_content = preg_replace('@href=[\'"]('. rtrim(get_option('home'),'/') .'/?\?(p|page_id'.$tx_qvs.$post_qvs.')=([0-9a-z-]+)(#.+)?)[\'"] i', 'href="'.'/' . ltrim($url_parts['path'],'/').'?$2=$3$4"', $post_content);
+            }
+            
+            if($post_content){
+                $wpdb->update($wpdb->posts, array('post_content'=>$post_content), array('ID'=>$post_id));
+            }
+            
+        }                
+        update_post_meta($post_id,'_alp_processed',time());        
+        if($alp_broken_links){
+            update_post_meta($post_id,'_alp_broken_links',$alp_broken_links);                    
+        }
+    }
+    
+    function show_permalinks($cont){
+        if(!isset($GLOBALS['__disable_absolute_links_permalink_filter']) || !$GLOBALS['__disable_absolute_links_permalink_filter']){
+            $home = rtrim(get_option('home'),'/');        
+            $parts = parse_url($home);        
+            $abshome = $parts['scheme'] .'://' . $parts['host'];
+            $path = ltrim($parts['path'],'/');    
+            $tx_qvs = join('|',$this->taxonomies_query_vars);           
+            $cont = preg_replace_callback(
+                '@<a([^>]+)?href="(('.$abshome.')?/'.$path.'/?\?(p|page_id|cat_ID|'.$tx_qvs.')=([0-9a-z-]+))(#?[^"]*)"([^>]+)?>@i',
+                array($this,'show_permalinks_cb'),$cont);                    
+        }
+        return $cont;
+    }
+       
+    function show_permalinks_cb($matches){
+        if($matches[4]=='cat_ID'){
+            $url = get_category_link($matches[5]);
+        }elseif($tax = array_search($matches[4],$this->taxonomies_query_vars)){
+            $url = get_term_link($matches[5], $tax);
+        }else{
+            $url = get_permalink($matches[5]);
+        }  
+        $fragment = $matches[6];
+        return '<a'.$matches[1]. 'href="'. $url . $fragment . '"' . $matches[3] . '>';
+    }
+    
+    function get_broken_links(){
+        global $wpdb;
+        $this->broken_links = $wpdb->get_results("SELECT p2.ID, p2.post_title, p1.meta_value AS links
+            FROM {$wpdb->postmeta} p1 JOIN {$wpdb->posts} p2 ON p1.post_id=p2.ID WHERE p1.meta_key='_alp_broken_links'");
+    }
+}
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/img/ajax-loader.gif b/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/img/ajax-loader.gif
new file mode 100644
index 0000000..f29800a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/img/ajax-loader.gif differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/management-page.php b/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/management-page.php
new file mode 100644
index 0000000..3f56a2f
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/absolute-links/management-page.php
@@ -0,0 +1,55 @@
+<div class="wrap">
+    <p>
+    <span id="alp_re_scan_toscan"><?php echo $total_posts_pages ?></span> <?php echo __('posts and pages not processed', 'sitepress')?>    
+    <input type="submit" name="re_scan" value="<?php echo __('Scan', 'sitepress') ?>" id="alp_re_scan_but" <?php if(!$total_posts_pages):?>disabled="disabled"<?php endif;?> class="button-secondary action" title="<?php echo __('Replace permalinks with sticky links in posts that have not been checked', 'sitepress'); ?>" />
+    <input type="submit" name="re_scan" value="<?php echo __('Scan ALL posts', 'sitepress') ?>" id="alp_re_scan_but_all" class="button-secondary action"
+        title="<?php echo __('Replace permalinks with sticky links in all blog posts', 'sitepress'); ?>" />
+    <img id="alp_ajx_ldr_1" src="<?php echo $this->plugin_url ?>/img/ajax-loader.gif" width="16" height="16" style="display:none" alt="loading" />
+    </p>
+    
+    
+    <h3><?php echo __('Broken Links', 'sitepress'); ?></h3>
+    <table class="widefat" width="100%" border="1">    
+    <thead>
+    <tr>
+        <th scope="col"><?php echo __('Post/page', 'sitepress') ?></th>
+        <th scope="col"><?php echo __('Broken link', 'sitepress') ?></th>
+        <th scope="col"><?php echo __('Suggestions', 'sitepress') ?></th>
+    </tr>
+    </thead>
+    
+    <?php if($this->broken_links): ?>
+        <?php foreach($this->broken_links as $bl):$links = unserialize($bl->links); if(is_string($links)) $links = unserialize($links); ?>    
+        <tr>
+            <td rowspan="<?php echo count($links)+1 ?>" valign="top" style="background-color:#eee">
+                <a title="Edit post" href="<?php echo get_edit_post_link($bl->ID) ?>"><?php echo $bl->post_title?></a>
+            </td>
+        </tr>     
+        <?php if($links) foreach($links as $k=>$l): $incr++; ?>
+        <tr>
+        <td valign="top" id="alp_bl_<?php echo $incr ?>"><?php echo $k ?></td>       
+        <td>
+            <?php if($l['suggestions']): ?>
+            <?php foreach($l['suggestions'] as $key=>$sug): ?>
+            <?php echo $sug['perma'] . '<a class="alp_use_sug" id="alp_use_sug_'.$key.'_'.$bl->ID.'_'.$incr.'" href="javascript:;"> ('.__('use', 'sitepress').')</a>' . '<br/>'; ?>
+            <?php endforeach; ?>
+            <?php else: ?>
+            <?php echo __('No suggestions', 'sitepress'); ?>
+            <?php endif; ?>
+         </td>
+        </tr>       
+        <?php endforeach ;?>
+        <?php endforeach ;?>
+    <?php else: ?>
+        <tr><td colspan="3" align="center"><?php echo __('empty', 'sitepress') ?></td></tr>
+    <?php endif; ?>
+    </table>
+    
+    <p>
+    <?php echo __('Revert sticky urls to permalinks', 'sitepress') ?> <input type="button" id="alp_revert_urls" value="<?php echo __('Start', 'sitepress')?>" class="button-secondary action" <?php if(!$total_posts_pages_processed): ?>disabled="disabled"<?php endif; ?> 
+    title="<?php echo __('Change sticky links back to Wordpress permalinks', 'sitepress'); ?>" /> 
+        <span id="alp_rev_items_left"><?php if($total_posts_pages_processed){ echo $total_posts_pages_processed; echo ' '; echo __('items in queue', 'sitepress'); } ?></span>
+        <img id="alp_ajx_ldr_2" src="<?php echo $this->plugin_url ?>/img/ajax-loader.gif" width="16" height="16" style="display:none" alt="loading" />
+    </p>
+    
+</div>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/cache-plugins-integration/cache-plugins-integration.php b/wp-content/plugins/sitepress-multilingual-cms/modules/cache-plugins-integration/cache-plugins-integration.php
new file mode 100644
index 0000000..ef785b6
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/cache-plugins-integration/cache-plugins-integration.php
@@ -0,0 +1,154 @@
+<?php
+if(is_admin() || defined('XMLRPC_REQUEST')):
+
+    class WPMLCpi{
+        
+        // supported plugins    
+        static $wpml_cpi_plugins = array(
+                'wp-super-cache/wp-cache.php' => 'WP_CPI_WP_Super_Cache'       
+            );
+        private $plugin_cp_class;  // plugin compatibility package class name
+        private $settings;
+        
+        
+        function __construct(){
+            
+            add_action('plugins_loaded', array($this, 'init'), 11);    // lower priority - allow packages to load
+            
+        }
+        
+        function init(){            
+            global $sitepress_settings;
+            
+            $ap = get_option('active_plugins');
+            $i = array_intersect($ap, array_keys(self::$wpml_cpi_plugins));            
+            if(!empty($i)){
+                $this->plugin_cp_class = self::$wpml_cpi_plugins[array_pop($i)];
+                
+                if(class_exists($this->plugin_cp_class) && method_exists($this->plugin_cp_class, 'clear_cache')){
+                    
+                    $this->settings = $sitepress_settings['modules']['caching-plugins-integration'];
+                    $this->validate_settings();
+                    
+                    add_action('icl_page_overview_top', array($this, 'menu'));
+                    wp_enqueue_script('wpml-cpi-scripts', ICL_PLUGIN_URL . '/modules/cache-plugins-integration/scripts.js', array(), ICL_SITEPRESS_VERSION);
+                    
+                    add_action('icl_ajx_custom_call', array($this, 'ajx_calls'), 1, 2);
+                    
+                    add_action('icl_st_add_string_translation', array($this, 'call_cache_clear'));
+                    add_action('icl_st_unregister_string_multi', array($this, 'call_cache_clear'));
+                    add_action('icl_st_unregister_string', array($this, 'call_cache_clear'));
+                    
+                    $ajx_request_exceptions = array(
+                        'ajx_health_checked',
+                        'save_language_pairs',
+                        'toggle_content_translation',
+                        'icl_admin_language_options',
+                        'icl_page_sync_options',
+                        'validate_language_domain',
+                        'get_translator_status',
+                        'get_language_status_text',
+                        'icl_save_theme_localization_type',
+                        'dismiss_help',
+                        'dismiss_page_estimate_hint',
+                        'dismiss_upgrade_notice',
+                        'dismiss_upgrade_notice',
+                        'dismiss_translate_help',
+                        'setup_got_to_step1',
+                        'setup_got_to_step2',
+                        'toggle_show_translations',
+                        'icl_show_reminders',
+                        'icl_show_sidebar',
+                    );
+                    if( !isset($_REQUEST['icl_ajx_action']) || !in_array($_REQUEST['icl_ajx_action'], $ajx_request_exceptions)){
+                        add_action('icl_save_settings', array($this, 'icl_save_settings_cb'), 10, 1);
+                    }                    
+                    
+                    // when a post is sent from the translation server
+                    global $HTTP_RAW_POST_DATA;
+                    $hrow = xml2array($HTTP_RAW_POST_DATA);
+                    if(isset($hrow['methodCall']['methodName']['value']) && $hrow['methodCall']['methodName']['value'] == 'icanlocalize.set_translation_status'){
+                        add_action('save_post', array($this, 'call_cache_clear'));
+                    }
+                    
+                }
+            }
+            
+        }
+        
+        function validate_settings(){
+            $save_settings = false;
+            if(!isset($this->settings['automatic'])){
+                $this->settings['automatic'] = 0;
+                $save_settings = true;
+            }
+            if(!isset($this->settings['dirty_cache'])){
+                $this->settings['dirty_cache'] = 0;
+                $save_settings = true;
+            }        
+            if($save_settings){
+                $this->save_settings();
+            }
+        }
+        
+        function save_settings(){
+            global $sitepress;
+            $iclsettings['modules']['caching-plugins-integration'] = $this->settings;
+            remove_action('icl_save_settings', array($this, 'icl_save_settings_cb'), 10, 1);
+            $sitepress->save_settings($iclsettings);
+            add_action('icl_save_settings', array($this, 'icl_save_settings_cb'), 10, 1);
+        }
+        
+        function ajx_calls($call, $data){
+            if($call == 'wpml_cpi_options'){
+                $this->settings['automatic'] = intval($data['automatic']);   
+                if($this->settings['automatic'] == 1){
+                    $this->settings['dirty_cache'] = 0;
+                }
+                $this->save_settings();
+            }elseif($call == 'wpml_cpi_clear_cache'){                
+                $this->call_cache_clear(true);
+            }
+        }
+        
+        function menu(){
+            echo '<div class="updated message">';
+            echo '<h3>' . sprintf(__('<i>%s</i> integration'), str_replace('_', ' ', substr($this->plugin_cp_class, 7))) . '</h3>';
+            echo '<p>';
+            _e('You are using a caching plugin. When you translate strings, the cache needs to be cleared in order for the translation to display.', 'sitepress');
+            echo '</p>';
+            echo '<ul id="wpml_cpi_options">';
+            if($this->settings['automatic']) { $checked='checked="checked"'; } else { $checked=''; }
+            echo '<li><label><input type="radio" name="wpml_cpi_automatic" value="1" '.$checked.' />&nbsp;' 
+                . __('Automatically clear the cache when strings are translated','sitepress').'</label></li>';
+            if(!$this->settings['automatic']) { $checked='checked="checked"'; } else { $checked=''; }
+            echo '<li><label><input type="radio" name="wpml_cpi_automatic" value="0" '.$checked.' />&nbsp;' 
+                . __('I will clear the cache manually after translating strings','sitepress').'</label></li>';
+            echo '</ul>';
+            if(!$this->settings['automatic'] && $this->settings['dirty_cache']){
+                echo '<p><input id="wpml_cpi_clear_cache" type="button" class="button secondary" value="' . __('Clear cache now','sitepress'). '"/></p>';
+            }
+            echo '</div>';
+        }
+        
+        function icl_save_settings_cb($settings){
+            if(!empty($settings)){
+                $this->call_cache_clear();
+            }            
+        }
+        
+        function call_cache_clear($do_clear = false){
+            if($this->settings['automatic'] || $do_clear){                
+                call_user_func(array($this->plugin_cp_class , 'clear_cache'));
+                $this->settings['dirty_cache'] = 0;
+            }else{
+                $this->settings['dirty_cache'] = 1;                
+            }
+            $this->save_settings();
+        }
+    }
+
+    $wpml_cpi = new WPMLCpi;  
+
+endif;
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/cache-plugins-integration/scripts.js b/wp-content/plugins/sitepress-multilingual-cms/modules/cache-plugins-integration/scripts.js
new file mode 100644
index 0000000..da9564d
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/cache-plugins-integration/scripts.js
@@ -0,0 +1,25 @@
+jQuery(document).ready(function(){
+    jQuery('#wpml_cpi_options :radio').change(function(){
+        var thisr = jQuery(this);
+        jQuery.ajax({
+                type: "POST",
+                url: icl_ajx_url,
+                data: "icl_ajx_action=wpml_cpi_options&automatic=" + thisr.val()
+            });        
+        
+    });
+    
+    jQuery('#wpml_cpi_clear_cache').click(function(){
+        var thisb = jQuery(this);
+        thisb.attr('style', 'background:url('+icl_ajxloaderimg_src+');background-repeat:no-repeat;').attr('disabled','disabled');
+        jQuery.ajax({
+                type:'POST',
+                url:icl_ajx_url,
+                data:'icl_ajx_action=wpml_cpi_clear_cache',
+                success: function(){
+                    thisb.fadeOut();
+                }
+            });        
+        
+    });
+});
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/cms-navigation.php b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/cms-navigation.php
new file mode 100644
index 0000000..aec9a88
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/cms-navigation.php
@@ -0,0 +1,793 @@
+<?php 
+/*
+Plugin Name: CMS Navigation Simple
+Plugin URI: http://wpml.org/wordpress-cms-plugins/cms-navigation-plugin/
+Description: Adds CMS navigation functions to WP posts and pages
+Author: ICanLocalize
+Author URI: http://wpml.org
+Version: 1.4
+*/
+
+/*
+    This file is part of CMS Navigation.
+
+    CMS Navigation is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    CMS Navigation is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with CMS Navigation.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+if(is_admin() && !in_array($pagenow, array('page.php','page-new.php'))) return;
+define('CMS_NAVIGATION_VERSION', 0.3);
+
+if(!defined('PHP_EOL')){
+    define ('PHP_EOL',"\r\n");
+}
+
+define('CMS_NAV_CACHE_EXPIRE', '1 HOUR');
+
+class CMSNavigation{
+    var $settings;
+    function __construct(){
+        $this->CMSNavigation();
+    } 
+      
+    function CMSNavigation(){
+        
+        global $cms_nav_ie_ver, $sitepress;
+        if(!isset($sitepress)){
+            $sitepress = new SitePress();
+            $sitepress->initialize_cache();
+        }
+        
+        $sitepress_settings = $sitepress->get_settings();        
+        $this->settings = $sitepress_settings['modules']['cms-navigation'];
+        
+        $cms_nav_user_agent = $_SERVER['HTTP_USER_AGENT'];
+        if(preg_match('#MSIE ([0-9]+)\.[0-9]#',$cms_nav_user_agent,$matches)){
+            $cms_nav_ie_ver = $matches[1];
+        }
+        
+        add_action('icl_navigation_breadcrumb', array($this, 'cms_navigation_breadcrumb'));
+        add_action('icl_navigation_menu', array($this, 'cms_navigation_menu_nav'));
+        add_action('icl_navigation_sidebar', array($this, 'cms_navigation_page_navigation'));
+        add_action('save_post', array($this, 'cms_navigation_update_post_settings'));
+        add_action('admin_head', array($this, 'cms_navigation_page_edit_options'));                
+        add_action('admin_head', array($this, 'cms_navigation_js'));
+        
+        add_action('init', array($this, 'cms_navigation_css'));
+        
+        add_action('plugins_loaded', array($this, 'sidebar_navigation_widget_init'));
+        
+        add_filter('page_link', array($this, 'rewrite_page_link'), 15, 2);
+        add_action('parse_query', array($this, 'redirect_offsite_urls'));
+        
+        add_filter('permalink_structure_changed', array($this,'clear_cache'));
+        add_filter('update_option_show_on_front', array($this,'clear_cache')); 
+        add_filter('update_option_page_on_front', array($this,'clear_cache')); 
+        add_filter('update_option_page_for_posts', array($this,'clear_cache')); 
+        
+        add_action('delete_post', array($this, 'clear_cache'));
+        add_action('delete_category', array($this, 'clear_cache'));
+        add_action('create_category', array($this, 'clear_cache'));
+        add_action('edited_category', array($this, 'clear_cache'));
+        
+        // not needed - save_post handles this
+        //add_action('trashed_post', array($this,'clear_cache'));        
+        //add_action('untrashed_post', array($this,'clear_cache'));        
+        
+        
+    } 
+    
+    function clear_cache($data){
+        global $sitepress, $wpdb;
+        
+        // clear the cache.
+        $sitepress->icl_cms_nav_offsite_url_cache->clear();
+        @mysql_query("TRUNCATE {$wpdb->prefix}icl_cms_nav_cache");
+        
+        return $data;
+    }
+        
+    function cms_navigation_breadcrumb(){
+        global $post, $sitepress, $current_user, $wpdb, $sitepress_settings, $wp_rewrite;
+        
+        if(func_num_args()){
+            $args = func_get_args();
+            $separator = $args[0];
+        }
+        
+        if(!empty($separator) && $separator != $this->settings['breadcrumbs_separator']){
+            $this->settings['breadcrumbs_separator'] = $separator;
+        }
+        
+        $cache_key = $_SERVER['REQUEST_URI'].'-'.$sitepress->get_current_language();
+        $output = $wpdb->get_var("
+                            SELECT data
+                            FROM {$wpdb->prefix}icl_cms_nav_cache
+                            WHERE cache_key='{$cache_key}'
+                            AND type='nav_breadcrumb'
+                            AND DATE_SUB(NOW(), INTERVAL ".CMS_NAV_CACHE_EXPIRE.") < timestamp");
+                            
+        if (!$output || !$this->settings['cache'] || ICL_DISABLE_CACHE) {
+            
+            // save the menu to a cache
+            ob_start();
+        
+            if(0 === strpos('page', get_option('show_on_front'))){
+                $page_on_front = (int)get_option('page_on_front'); 
+                $page_for_posts  = (int)get_option('page_for_posts');
+            }else{
+                $page_on_front = 0;
+                $page_for_posts  = 0;        
+            }
+            if($page_on_front!=$post->ID){ 
+                if($page_on_front){
+                    //$permalink = get_permalink($page_on_front);
+                    $permalink = $sitepress->language_url();
+                    if($sitepress_settings['language_negotiation_type'] != 3){
+                        $permalink = trailingslashit($permalink);
+                    }                    
+                    ?><a href="<?php echo $permalink ; ?>"><?php echo get_the_title($page_on_front) ?></a><?php 
+                        echo $this->settings['breadcrumbs_separator'];
+                }elseif(!is_home() || (is_home() && !$page_on_front && $page_for_posts)){
+                    ?><a href="<?php echo $sitepress->language_url() ?>"><?php _e('Home') ?></a><?php 
+                        echo $this->settings['breadcrumbs_separator'];
+                }
+            }
+            
+            $post_types = $sitepress->get_translatable_documents(true);
+            unset($post_types['post'],$post_types['page']);
+            if((($pn = get_query_var('pagename')) || (($pn = get_query_var('post_type')) && !get_query_var('p') && !get_query_var($pn))) && isset($post_types[$pn])){
+                echo $post_type_name  = $post_types[$pn]->labels->name;
+            }elseif(($post_type = get_query_var('post_type')) && get_query_var($post_type)){                
+                $custom_post_tax = $post_types[$post_type]->taxonomies[0];                              
+                $terms = wp_get_post_terms($GLOBALS['wp_query']->get_queried_object_id(), $custom_post_tax);
+                
+                $term_parents[] = array('name'=>$terms[0]->name, 'url'=>get_term_link($terms[0], $custom_post_tax));
+                $term_parent = $terms[0]->parent;
+                while($term_parent){
+                    $term = get_term($term_parent, $custom_post_tax);                    
+                    $term_parent = $term->parent;
+                    $term_parents[] = array('name'=>$term->name, 'url'=>get_term_link((int)$term->term_id, $custom_post_tax));
+                }
+                if(!empty($term_parents)){
+                    $term_parents = array_reverse($term_parents);
+                    foreach($term_parents as $term){
+                        echo '<a href="'.$term['url'].'">'.$term['name'].'</a> ' . $this->settings['breadcrumbs_separator']; 
+                    };
+                }
+            }elseif(!is_page() && !is_home() && !is_tax() && $page_for_posts){
+                ?><a href="<?php echo get_permalink($page_for_posts); ?>"><?php echo get_the_title($page_for_posts) ?></a><?php 
+                    echo $this->settings['breadcrumbs_separator'];
+            }
+            
+            if(is_home() && $page_for_posts && !isset($post_type_name)){                
+                echo get_the_title($page_for_posts);
+            }elseif(($post_type = get_query_var('post_type')) && get_query_var($post_type)){                
+                the_post();
+                echo get_the_title();
+                rewind_posts();
+            }elseif(is_page() && $page_on_front!=$post->ID){                        
+                the_post();
+                if(is_array($post->ancestors)){            
+                    $ancestors = array_reverse($post->ancestors);
+                    foreach($ancestors as $anc){
+                        if($page_on_front==$anc) {continue;}
+                        ?>
+                        <a href="<?php echo get_permalink($anc); ?>"><?php echo get_the_title($anc) ?></a><?php 
+                            echo $this->settings['breadcrumbs_separator']; 
+                    }            
+                }    
+                echo get_the_title();
+                rewind_posts();
+            }elseif(is_single()){                
+                the_post();
+                $cat = get_the_category($id);
+                $cat = $cat[0]->cat_ID;                
+                $parents = get_category_parents($cat, TRUE, $this->settings['breadcrumbs_separator']);
+                if(is_string($parents)){
+                    echo $parents;
+                }
+                the_title();   
+                rewind_posts();         
+            }elseif (is_category()) {                
+                $cat = get_term(intval( get_query_var('cat')), 'category', OBJECT, 'display');
+                if($cat->category_parent){
+                    echo get_category_parents($cat->category_parent, TRUE, $this->settings['breadcrumbs_separator']);                 
+                }
+                single_cat_title();
+            }elseif(is_tag()){                
+                echo __('Articles tagged ', 'sitepress') ,'&#8216;'; 
+                single_tag_title();
+                echo '&#8217;';    
+            }elseif (is_tax()){   
+                $term = get_term($GLOBALS['wp_query']->get_queried_object_id(), get_query_var('taxonomy'));                
+                $term_name = $term->name;
+                $term_parent = $term->parent;
+                while($term_parent){
+                    $term = get_term($term_parent, get_query_var('taxonomy'));                    
+                    $term_parent = $term->parent;
+                    $term_parents[] = array('name'=>$term->name, 'url'=>get_term_link((int)$term->term_id, get_query_var('taxonomy')));
+                }
+                if(!empty($term_parents)){
+                    $term_parents = array_reverse($term_parents);
+                    foreach($term_parents as $term){
+                        echo '<a href="'.$term['url'].'">'.$term['name'].'</a> ' . $this->settings['breadcrumbs_separator']; 
+                    };
+                }
+                echo $term_name;
+            }elseif (is_month()){                
+                echo the_time('F, Y');
+            }elseif (is_search()){
+                echo __('Search for: ', 'sitepress'), strip_tags(get_query_var('s'));
+            /*    
+            }elseif (is_404()){
+                echo __('Not found', 'sitepress');
+            */
+            }        
+            $output = ob_get_contents();
+            ob_end_clean();
+            
+            if (!$output){
+                $output = ' ';
+            }
+            $wpdb->query("DELETE FROM
+                         {$wpdb->prefix}icl_cms_nav_cache
+                         WHERE cache_key='{$cache_key}'
+                         AND type='nav_breadcrumb'");            
+            $wpdb->insert($wpdb->prefix.'icl_cms_nav_cache', 
+                array(
+                    'cache_key'=>$cache_key, 
+                    'type'=>'nav_breadcrumb', 
+                    'data'=>$output
+                    )
+                );
+            
+        }
+        echo $output;
+    }    
+    
+    function cms_navigation_menu_nav(){
+        global $sitepress, $sitepress_settings, $wpdb, $post, $cms_nav_ie_ver, $wp_query, $current_user;
+        
+        $show_cat_menu = $this->settings['show_cat_menu']?$this->settings['show_cat_menu']:false;
+        $cat_menu_title = $this->settings['cat_menu_title']?icl_t('WPML', 'Categories Menu', $this->settings['cat_menu_title']):__('News', 'sitepress');
+        
+        $cache_key = $_SERVER['REQUEST_URI'].'-'.$sitepress->get_current_language();
+        if (isset($cms_nav_ie_ver)) {
+            $cache_key .= '-ie-'.$cms_nav_ie_ver;
+        }
+        $output = $wpdb->get_var("
+                            SELECT data
+                            FROM {$wpdb->prefix}icl_cms_nav_cache
+                            WHERE cache_key='{$cache_key}'
+                            AND type='nav_menu'
+                            AND DATE_SUB(NOW(), INTERVAL ".CMS_NAV_CACHE_EXPIRE.") < timestamp");
+        if (!$output || !$this->settings['cache'] || ICL_DISABLE_CACHE) {
+        
+            // save the menu to a cache
+            ob_start();
+            
+            $order = $this->settings['page_order']?$this->settings['page_order']:'menu_order';
+            $show_cat_menu = $this->settings['show_cat_menu']?$this->settings['show_cat_menu']:false;
+            
+            if(0 === strpos('page', get_option('show_on_front'))){
+                $page_on_front = (int)get_option('page_on_front'); 
+                $page_for_posts  = (int)get_option('page_for_posts');
+            }else{
+                $page_on_front = 0;
+                $page_for_posts  = 0;        
+            }
+    
+            // exclude some pages                                                                                                            
+            $excluded_pages = $wpdb->get_col("
+                SELECT post_id 
+                FROM {$wpdb->postmeta} pm LEFT JOIN {$wpdb->prefix}icl_translations tr ON pm.post_id = tr.element_id AND element_type='post_page'
+                WHERE meta_key='_top_nav_excluded' AND meta_value <> '' AND tr.language_code = '{$sitepress->get_current_language()}'
+                ");        
+            $excluded_pages[] = 0; //add this so we don't have an empty array
+            if(!$show_cat_menu && $page_for_posts){
+                $excluded_pages[] = $page_for_posts;    
+            }                                       
+            $excluded_pages = join(',', $excluded_pages);
+            
+            if(!empty($post) && !$post->ancestors){
+                $post->ancestors = array();
+            }   
+            
+            if(current_user_can('read_private_pages')){
+                $private = " OR post_status='private'";
+            }else{
+                $private = "";
+            }
+            
+            if($sitepress_settings['existing_content_language_verified'] && 'all' != $sitepress->get_current_language()){   // user has initialized 
+                $pages = $wpdb->get_col("
+                    SELECT p.ID FROM {$wpdb->posts} p
+                        JOIN {$wpdb->prefix}icl_translations tr ON p.ID = tr.element_id AND element_type='post_page' 
+                    WHERE post_type='page' AND (post_status='publish' {$private})
+                        AND post_parent=0 AND p.ID NOT IN ({$excluded_pages})  AND tr.language_code = '{$sitepress->get_current_language()}'
+                    ORDER BY {$order}");   
+            }else{
+                $pages = $wpdb->get_col("
+                    SELECT p.ID FROM {$wpdb->posts} p                    
+                    WHERE post_type='page' AND (post_status='publish' {$private}) AND post_parent=0 AND p.ID NOT IN ({$excluded_pages})  
+                    ORDER BY {$order}");   
+            }
+            
+            
+            if($show_cat_menu && (0 !== strpos('page', get_option('show_on_front')) || !get_option('page_for_posts'))){
+                if($pages){
+                    $res = $wpdb->get_results("SELECT ID, menu_order FROM {$wpdb->posts} WHERE ID IN (".join(',', $pages).") ORDER BY menu_order");
+                }
+                if($res){
+                    foreach($res as $row){
+                        $orders[$row->ID] = $row->menu_order;
+                    }            
+                }
+                $blog_special_page_inserted = false;
+                foreach($pages as $k=>$p){
+                    if(!$blog_special_page_inserted && (isset($orders[$p]) && $orders[$p] > $this->settings['cat_menu_page_order'])){                    
+                        $incpages[] = 0;
+                        $blog_special_page_inserted = true;
+                    }  
+                    $incpages[] = $p;                  
+                }
+                if(!$blog_special_page_inserted){
+                    $pages[] = 0;
+                }else{
+                    $pages = $incpages;
+                }
+            }
+            
+            if($pages){   
+                ?><div id="menu-wrap"><?php
+                ?><ul id="cms-nav-top-menu"><?php
+                foreach($pages as $p){
+                    $incr++;
+                    if($p===0){
+                        
+                        if($incr==1){
+                            $smain_li_classes[] = 'icl_first';
+                        }elseif($incr==count($pages)){
+                            $smain_li_classes[] = 'icl_last';
+                        }
+                        if((is_category() && $this->settings['cat_menu_contents'] == 'categories') || 
+                            (is_single() && $this->settings['cat_menu_contents'] == 'posts')){
+                            $smain_li_classes[] = 'selected_page';
+                        }                        
+                        
+                        ?><li<?php if(!empty($smain_li_classes)):?> class="<?php echo join(' ' , $smain_li_classes)?>"<?php endif?>><a href="<?php echo $sitepress->language_url(); ?>" class="<?php if($this->settings['cat_menu_contents'] != 'nothing'):?>trigger<?php endif?>"><?php echo $cat_menu_title  ?><?php if(!isset($cms_nav_ie_ver) || $cms_nav_ie_ver > 6): ?></a><?php endif; ?><?php
+                    }else{
+                        $sections = array();
+                        $subpages = $wpdb->get_results("
+                            SELECT p.ID, meta_value AS section
+                            FROM {$wpdb->posts} p LEFT JOIN {$wpdb->postmeta} m ON p.ID=m.post_id AND (meta_key='_cms_nav_section' OR meta_key IS NULL)
+                            WHERE p.post_parent={$p} AND p.post_status='publish' AND p.ID NOT IN ({$excluded_pages}) ORDER BY {$order}");                
+                        foreach((array)$subpages as $s){
+                            $sections[$s->section][] = $s->ID;    
+                        }
+                        ksort($sections);  
+                        if($p==$post->ID || in_array($p,(array)$post->ancestors) || ($p == $page_for_posts && is_home())){
+                            $sel = true;
+                        }else{
+                            $sel = false;
+                        }                        
+                        $page_name_html = apply_filters('icl_nav_page_html', $p, 0);
+                        if($page_name_html==$p){
+                            $page_name_html = get_the_title($p);
+                        }
+                        
+                        
+                        $main_li_classes = array();
+                        if($sel){
+                            $main_li_classes[] = 'selected_page';
+                        }                        
+                        if($incr==1){
+                            $main_li_classes[] = 'icl_first';
+                        }elseif($incr==count($pages)){
+                            $main_li_classes[] = 'icl_last';
+                        }
+                        $has_subages =  $subpages || ($page_for_posts == $p && $this->settings['cat_menu_contents'] != 'nothing');
+                        if($p==$post->ID){
+                            $permalink = '#';
+                        }else{                            
+                            if($p == $page_on_front){
+                                $permalink = $sitepress->language_url();
+                                if($sitepress_settings['language_negotiation_type'] != 3){
+                                    $permalink = trailingslashit($permalink);
+                                }
+                            }else{
+                                $permalink = get_permalink($p);
+                            }
+                        }
+                        ?><li<?php if(!empty($main_li_classes)):?> class="<?php echo join(' ' , $main_li_classes)?>"<?php endif?>><a href="<?php echo $permalink; ?>" class="<?php if($has_subages):?>trigger<?php endif?>"><?php echo $page_name_html ?><?php if(!isset($cms_nav_ie_ver) || $cms_nav_ie_ver > 6): ?></a><?php endif; ?>
+                    <?php } ?>
+                        <?php if((($page_for_posts == $p || (isset($p->blog_page) && $p->blog_page)) && $this->settings['cat_menu_contents'] != 'nothing')): ?>
+                            <?php if(isset($cms_nav_ie_ver) && $cms_nav_ie_ver <= 6): ?><table><tr><td><?php endif; ?>
+                            <ul>
+                            <?php if($this->settings['cat_menu_contents'] == 'categories'): ?>
+                            <?php 
+                                $cat_menu_selected = '';
+                                if(is_single() || is_category() || $wp_query->is_posts_page){
+                                    $cat_menu_selected = ' class="selected_page"';
+                                }
+                                if(is_single() && !is_page()){
+                                    $cats = get_the_category();
+                                    foreach((array)$cats as $cat){ $post_cats[] = $cat->cat_ID;}
+                                }
+                                $categories = get_categories('child_of=0');
+                                foreach($categories as $cat){
+                                    echo '<li';
+                                    if(in_array($cat->cat_ID, (array)$post_cats)){ $post_in_this_cat++; }
+                                    if($wp_query->query_vars['cat']==$cat->cat_ID || $post_in_this_cat==1 ){
+                                        echo ' class="selected_subpage"';
+                                    } 
+                                    echo  '>';
+                                    echo '<a href="'.get_category_link($cat->cat_ID).'">';
+                                    echo apply_filters('single_cat_title', $cat->cat_name);
+                                    echo '</a>';
+                                    echo '</li>';                            
+                                }
+                            ?>
+                            <?php elseif($this->settings['cat_menu_contents'] == 'posts'): ?>
+                                <?php 
+                                    $postbk = $post; // preserve $post                                                                  
+                                    $cmsnavq = new WP_Query();
+                                    $cmsnavq->query('suppress_filters=0');
+                                    if ( $cmsnavq->have_posts() ) : while ( $cmsnavq->have_posts() ) : $cmsnavq->the_post(); 
+                                    ?><li<?php if(get_the_ID()==get_query_var('p')):?> class="selected_subpage"<?php endif?>>
+                                        <a href="<?php the_permalink()?>"><?php the_title()?></a></li><?php
+                                    endwhile; endif;
+                                    $post = $postbk; // restore $post
+                                ?>
+                            <?php endif ; ?>
+                            </ul>
+                            <?php if(isset($cms_nav_ie_ver) && $cms_nav_ie_ver <= 6): ?></td></tr></table><?php endif; ?>
+                        <?php elseif($subpages):?>
+                            <?php if(isset($cms_nav_ie_ver) && $cms_nav_ie_ver <= 6): ?><table><tr><td><?php endif; ?>
+                            <ul>
+                                <?php foreach($sections as $sec_name=>$sec): ?>
+                                    <?php if($sec_name): ?>
+                                    <li class="section icl-top-nav-section-<?php echo sanitize_title_with_dashes($sec_name) ?>"><?php echo $sec_name ?></li>
+                                    <?php endif; ?>
+                                    <?php foreach($sec as $sp):?>                            
+                                    <li<?php if($sp==$post->ID):?> class="selected_subpage"<?php endif?>><?php                            
+                                        $subpage_name_html = apply_filters('icl_nav_page_html', $sp, 1);
+                                        if($subpage_name_html==$sp){
+                                            $subpage_name_html = get_the_title($sp);
+                                        }
+                                        if($sp!=$post->ID):?><a href="<?php echo get_permalink($sp); ?>" <?php if(in_array($sp,(array)$post->ancestors)): ?>class="selected"<?php endif;?>><?php endif?><?php echo $subpage_name_html ?><?php if($sp!=$post->ID):?></a><?php endif                             
+                                    ?></li>
+                                    <?php endforeach; ?>
+                                <?php endforeach; ?>
+                            </ul>
+                            <?php if(isset($cms_nav_ie_ver) && $cms_nav_ie_ver <= 6): ?></td></tr></table><?php endif; ?>
+                        <?php endif; ?>                    
+                        <?php if(isset($cms_nav_ie_ver) && $cms_nav_ie_ver <= 6): ?></a><?php endif; ?>
+                    </li>
+                    <?php   
+                }
+                ?></ul></div><br class="cms-nav-clearit" /><?php
+            }
+            
+            $output = ob_get_contents();
+            ob_end_clean();
+            
+            $wpdb->query("DELETE FROM
+                         {$wpdb->prefix}icl_cms_nav_cache
+                         WHERE cache_key='{$cache_key}'
+                         AND type='nav_menu'");            
+            $wpdb->insert($wpdb->prefix.'icl_cms_nav_cache', 
+                array(
+                    'cache_key'=>$cache_key, 
+                    'type'=>'nav_menu', 
+                    'data'=>$output
+                    )
+                );
+            
+        }
+        
+        echo $output;
+    }    
+    
+    function cms_navigation_page_navigation(){
+        if(!is_page()) return;
+        global $post, $wpdb, $current_user, $sitepress;
+        
+        if($post == null) {
+            return;
+        }
+
+        $cache_key = $_SERVER['REQUEST_URI'].'-'.$sitepress->get_current_language();
+        $output = $wpdb->get_var("
+                            SELECT data
+                            FROM {$wpdb->prefix}icl_cms_nav_cache
+                            WHERE cache_key='{$cache_key}'
+                            AND type='nav_page'
+                            AND DATE_SUB(NOW(), INTERVAL ".CMS_NAV_CACHE_EXPIRE.") < timestamp");
+        if (!$output || !$this->settings['cache'] || ICL_DISABLE_CACHE) {
+        
+            // save the menu to a cache
+            ob_start();
+            
+            
+            $order = $this->settings['page_order']?$this->settings['page_order']:'menu_order';
+            $heading_start = $this->settings['heading_start']?$this->settings['heading_start']:'<h4>';
+            $heading_end = $this->settings['heading_end']?$this->settings['heading_end']:'</h4>';
+                
+            // is home?
+            $is_home = get_post_meta($post->ID,'_cms_nav_minihome',true);        
+            if($is_home || !$post->ancestors){
+                $pid = $post->ID;
+            }else{
+                //get top level page parent or home
+                $parent = $post->ancestors[0];            
+                do{
+                    $uppost = $wpdb->get_row("
+                        SELECT p1.ID, p1.post_parent, p2.meta_value, (p2.meta_value IS NOT NULL && p2.meta_value <> '') AS minihome 
+                        FROM {$wpdb->posts} p1
+                            LEFT JOIN {$wpdb->postmeta} p2 ON p1.ID=p2.post_id AND (meta_key='_cms_nav_minihome' OR meta_key IS NULL)
+                            WHERE post_type='page' AND p1.ID={$parent}
+                    ");
+                    $pid = $uppost->ID;
+                    $parent = $uppost->post_parent;
+                    $minihome = $uppost->minihome;        
+                }while($parent!=0 && !$minihome);
+            } 
+                      
+            echo $heading_start;
+            if($pid!=$post->ID){ 
+                ?><a href="<?php echo get_permalink($pid); ?>"><?php 
+            } 
+            echo get_the_title($pid);
+            if($pid!=$post->ID){
+                ?></a><?php
+            }
+            echo $heading_end;
+            ?>
+            
+            <?php
+    
+            if (empty($pid)) return;
+    
+            $sub = $wpdb->get_results("
+                    SELECT p1.ID, meta_value AS section FROM {$wpdb->posts} p1 
+                    LEFT JOIN {$wpdb->postmeta} p2 ON p1.ID=p2.post_id AND (meta_key='_cms_nav_section' OR meta_key IS NULL)
+                    WHERE post_parent='{$pid}' AND post_status='publish' ORDER BY {$order}"); 
+            if(empty($sub))  return;                   
+            foreach($sub as $s){
+                $sections[$s->section][] = $s->ID;    
+            }
+            ksort($sections);    
+            echo '<ul class="cms-nav-sidebar">';
+            foreach($sections as $sec_name=>$sec){
+                ?>            
+                    <?php if($sec_name): ?>
+                    <li class="cms-nav-sub-section"><?php echo $sec_name ?></li>
+                    <?php endif; ?>
+                    <?php foreach($sec as $s):?>
+                    <li class="<?php if($post->ID==$s):?>selected_page_side <?php endif;?>icl-level-1"><?php
+                        if($post->ID!=$s):?><a href="<?php echo get_permalink($s); ?>"><?php endif?><?php echo get_the_title($s) ?><?php if($post->ID!=$s):?></a><?php endif;                                
+                            if(!get_post_meta($s, '_cms_nav_minihome', 1)){
+                                $this->__cms_navigation_child_pages_recursive($s, $order); 
+                            }                
+                    ?></li>
+                    <?php endforeach;?>            
+                <?php
+            }
+            echo '</ul>';
+
+            $output = ob_get_contents();
+            ob_end_clean();
+            
+            $wpdb->query("DELETE FROM
+                         {$wpdb->prefix}icl_cms_nav_cache
+                         WHERE cache_key='{$cache_key}'
+                         AND type='nav_page'");            
+            $wpdb->insert($wpdb->prefix.'icl_cms_nav_cache', 
+                array(
+                    'cache_key'=>$cache_key, 
+                    'type'=>'nav_page', 
+                    'data'=>$output
+                    )
+                );
+            
+        }
+        
+        echo $output;
+    }
+
+    function __cms_navigation_child_pages_recursive($pid, $order, $level=2){
+        global $wpdb, $post;
+        $subpages = $wpdb->get_results("
+            SELECT p1.ID, p2.meta_value IS NOT NULL AS minihome FROM {$wpdb->posts} p1 
+            LEFT JOIN {$wpdb->postmeta} p2 ON p1.ID=p2.post_id AND (meta_key='_cms_nav_minihome' OR meta_key IS NULL)
+            WHERE post_parent={$pid} AND post_type='page' AND post_status='publish' ORDER BY {$order}");        
+         if($subpages): ?><ul>
+            <?php foreach($subpages as $s): 
+            ?><li class="<?php if($post->ID==$s->ID):?>selected <?php endif;?>icl-level-<?php echo $level ?>"><?php
+                if($post->ID!=$s->ID):?><a href="<?php echo get_permalink($s->ID)?>"><?php endif;?><?php echo get_the_title($s->ID) ?><?php if($post->ID!=$s->ID):?></a><?php endif;
+                if(!$s->minihome) $this->__cms_navigation_child_pages_recursive($s->ID, $order, $level+1); 
+            ?></li>
+            <?php endforeach; ?>
+        </ul>
+        <?php endif; 
+    }    
+    
+    function cms_navigation_update_post_settings($id){
+        global $sitepress, $wpdb;
+        
+        // clear the caches
+        $sitepress->icl_cms_nav_offsite_url_cache->clear();
+        @mysql_query("TRUNCATE {$wpdb->prefix}icl_cms_nav_cache");
+        
+        if($_POST['post_type']!='page' || $_POST['action']=='inline-save'  || $_POST['autosave']) return;
+        $post_id = $_POST['post_ID'];
+        
+        if($_POST['exclude_from_top_nav']){
+            update_post_meta($post_id, '_top_nav_excluded',1);
+        }else{
+            delete_post_meta($post_id, '_top_nav_excluded');
+        }
+        if($_POST['cms_nav_minihome']){
+            update_post_meta($post_id, '_cms_nav_minihome',1);
+        }else{
+            delete_post_meta($post_id, '_cms_nav_minihome');
+        }
+        if($_POST['cms_nav_section_new']){
+            update_post_meta($post_id, '_cms_nav_section', $_POST['cms_nav_section_new']);
+        }else{
+            delete_post_meta($post_id, '_cms_nav_section');
+        }    
+        if(!trim($_POST['cms_nav_section_new'])){
+            if($_POST['cms_nav_section']){
+                update_post_meta($post_id, '_cms_nav_section', $_POST['cms_nav_section']);
+            }else{
+                delete_post_meta($post_id, '_cms_nav_section');
+            }        
+        }
+        if($_POST['_cms_nav_offsite_url']){
+            update_post_meta($post_id, '_cms_nav_offsite_url', $_POST['_cms_nav_offsite_url']);
+        }else{
+            delete_post_meta($post_id, '_cms_nav_offsite_url');
+        }
+        
+    }    
+    
+    function cms_navigation_page_edit_options(){
+        if(function_exists('add_meta_box')){
+            add_meta_box('cmsnavdiv', __('CMS Navigation', 'sitepress'), array($this, 'cms_navigation_meta_box'), 'page', 'normal', 'high');
+        }
+    }
+
+    function cms_navigation_meta_box($post){
+        global $wpdb, $sitepress;
+        //if it's a new post copy some custom fields from the original post
+        if($post->ID == 0 && isset($_GET['trid']) && $_GET['trid']){
+            $copied_custom_fields = array('_top_nav_excluded', '_cms_nav_minihome');
+            foreach($copied_custom_fields as $k=>$v){
+                $copied_custom_fields[$k] = "'".$v."'";                    
+            }
+            $res = $wpdb->get_results("
+                SELECT meta_key, meta_value FROM {$wpdb->prefix}icl_translations tr 
+                JOIN {$wpdb->postmeta} pm ON tr.element_id = pm.post_id
+                WHERE tr.trid={$_GET['trid']} AND (source_language_code IS NULL OR source_language_code='')
+                    AND meta_key IN (".join(',',$copied_custom_fields).")
+            ");
+            foreach($res as $r){
+                $post_custom[$r->meta_key][0] = $r->meta_value;    
+            }
+        }else{
+            // get sections
+            $sections = $wpdb->get_col("SELECT DISTINCT meta_value FROM {$wpdb->postmeta} WHERE meta_key='_cms_nav_section'");
+            $post_custom = get_post_custom($post->ID);    
+            $cms_nav_section = $post_custom['_cms_nav_section'][0];        
+        }        
+        $top_nav_excluded = $post_custom['_top_nav_excluded'][0];
+        $cms_nav_minihome = $post_custom['_cms_nav_minihome'][0];
+        $cms_nav_offsite_url = $post_custom['_cms_nav_offsite_url'][0];
+        if($top_nav_excluded){ $top_nav_excluded = 'checked="checked"'; }
+        if($cms_nav_minihome){ $cms_nav_minihome = 'checked="checked"'; }
+        ?>
+        <p>
+        <label><input type="checkbox" value="1" name="exclude_from_top_nav" <?php echo $top_nav_excluded ?> />&nbsp; <?php echo __('Exclude from the top navigation', 'sitepress') ?></label> &nbsp;
+        <label><input type="checkbox" value="1" name="cms_nav_minihome" <?php echo $cms_nav_minihome ?> />&nbsp; <?php echo __('Mini home (don\'t list child pages for this page)', 'sitepress') ?></label>
+        </p>
+        <p>
+        <?php echo __('Section', 'sitepress')?>
+        <?php if(!empty($sections)): ?>
+            <select name="cms_nav_section">    
+            <option value=''><?php echo __('--none--', 'sitepress') ?></option>
+            <?php foreach($sections as $s):?>
+            <option <?php if($s==$cms_nav_section) echo 'selected="selected"'?>><?php echo $s ?></option>
+            <?php endforeach; ?>        
+            </select>
+        <?php endif; ?>    
+        <input type="text" name="cms_nav_section_new" value="" <?php if(!empty($sections)): ?>style="display:none"<?php endif; ?> />
+        <?php if(!empty($sections)): ?>
+        <a href="javascript:;" id="cms_nav_add_section"><?php echo __('enter new', 'sitepress') ?></a>
+        <?php endif; ?>    
+        </p>
+        <p>
+        <label><?php echo __('Offsite page address', 'sitepress') ?> <input type="text" style="width:100%" name="_cms_nav_offsite_url" value="<?php echo $cms_nav_offsite_url ?>" /></label>
+        </p>
+        <?php
+    }    
+    
+    function cms_navigation_js(){
+        ?>
+        <script type="text/javascript">
+        addLoadEvent(function(){                   
+                    jQuery('#cms_nav_add_section').click(cms_nav_switch_adding_section);    
+        });
+        function cms_nav_switch_adding_section(){
+            if('none'==jQuery("select[name='cms_nav_section']").css('display')){
+                jQuery("select[name='cms_nav_section']").show();
+                jQuery("input[name='cms_nav_section_new']").hide();
+                jQuery("input[name='cms_nav_section_new']").attr('value','');
+                jQuery(this).html('<?php echo icl_js_escape(__('enter new', 'sitepress')); ?>');                                    
+            }else{
+                jQuery("select[name='cms_nav_section']").hide();
+                jQuery("input[name='cms_nav_section_new']").show();            
+                jQuery(this).html('<?php echo icl_js_escape(__('cancel', 'sitepress')); ?>');
+            }
+            
+        }
+        </script>
+        <?php
+    }    
+    
+    function cms_navigation_css(){
+        if(defined('ICL_DONT_LOAD_NAVIGATION_CSS') && ICL_DONT_LOAD_NAVIGATION_CSS){
+            return;
+        }
+        wp_enqueue_style('cms-navigation-style-base', ICL_PLUGIN_URL . '/modules/cms-navigation/css/cms-navigation-base.css', array(), ICL_SITEPRESS_VERSION, 'screen');            
+        wp_enqueue_style('cms-navigation-style', ICL_PLUGIN_URL . '/modules/cms-navigation/css/cms-navigation.css', array(), ICL_SITEPRESS_VERSION, 'screen');            
+    }
+    
+    function sidebar_navigation_widget_init(){
+        function sidebar_navigation_widget($args){
+            extract($args, EXTR_SKIP);
+            echo $before_widget;
+            global $iclCMSNavigation;                
+            $iclCMSNavigation->cms_navigation_page_navigation();
+            echo $after_widget;
+        }
+        register_sidebar_widget(__('Sidebar Navigation', 'sitepress'), 'sidebar_navigation_widget', 'icl_sidebar_navigation');
+    }
+    
+    function rewrite_page_link($url, $page_id){
+        global $sitepress;
+        if ($sitepress->icl_cms_nav_offsite_url_cache->has_key($page_id.'_cms_nav_offsite_url')) {
+            // get from the cache.
+            $offsite_url = $sitepress->icl_cms_nav_offsite_url_cache->get($page_id.'_cms_nav_offsite_url');
+            if($offsite_url){
+                $url = $offsite_url;
+            }
+            return $url;
+        }
+        $offsite_url = get_post_meta($page_id, '_cms_nav_offsite_url', true);
+        $sitepress->icl_cms_nav_offsite_url_cache->set($page_id.'_cms_nav_offsite_url', $offsite_url);
+        if($offsite_url){
+            $url = $offsite_url;
+        }
+        return $url;
+    }
+    
+    function redirect_offsite_urls($q){
+        if($q->is_page && $offsite_url = get_post_meta($q->queried_object_id, '_cms_nav_offsite_url', true)){
+            wp_redirect($offsite_url, 301);
+        }
+    }
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/css/cms-navigation-base.css b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/css/cms-navigation-base.css
new file mode 100644
index 0000000..db1969c
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/css/cms-navigation-base.css
@@ -0,0 +1,96 @@
+#menu-wrap {width:100%; height:30px; position:relative; z-index:100;}
+/* hack to correct IE5.5 faulty box model */
+* html #menu-wrap {width:100%; w\idth:100%}
+/* remove all the bullets, borders and padding from the default list styling */
+#menu-wrap ul {padding:0;margin:0;list-style-type:none;}
+#menu-wrap li, #menu-wrap a, #menu-wrap div {padding:0;margin:0;}
+#menu-wrap ul ul {}
+/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
+#menu-wrap ul li {float:left;position:relative;}
+#menu-wrap ul ul li {width:100%}
+
+/* style the links for the top level */
+#menu-wrap ul a, #menu-wrap ul a:visited {
+    display:block;
+    line-height:30px;
+    padding-left:10px; 
+    padding-right: 20px;
+}
+/* a hack so that IE5.5 faulty box model is corrected */
+* html #menu-wrap a, * html #menu-wrap a:visited {width:10px; w\idth:10px;padding-right:20px;white-space:nowrap}
+
+/* style the second level background */
+#menu-wrap ul ul a, #menu-wrap ul ul a:visited {
+    border: 0px;
+}
+
+#menu-wrap li.section{
+    line-height:25px;
+    padding-left:10px; 
+    padding-right: 11px;    
+}
+
+/* hide the sub levels and give them a positon absolute so that they take up no room */
+#menu-wrap ul ul {visibility:hidden;position:absolute;height:0;top:30px;left:0; width:149px;}
+/* another hack for IE5.5 */
+* html #menu-wrap ul ul {top:30px;t\op:30px;}
+
+/* style the table so that it takes no ppart in the layout - required for IE to work */
+#menu-wrap table {position:absolute; top:0; left:0; border-collapse:collapse;;}
+
+/* style the second level links */
+#menu-wrap ul ul a, #menu-wrap ul ul a:visited {
+    height:auto; line-height:15px; padding:5px 10px; width:150px;
+}
+/* yet another hack for IE5.5 */
+* html #menu-wrap ul ul a, * html #menu-wrap ul ul a:visited {width:150px;w\idth:128px;}
+                                  
+/* make the second level visible when hover on first level list OR link */
+#menu-wrap ul li:hover ul,
+#menu-wrap ul a:hover ul{visibility:visible; }
+
+
+#menu-wrap li.selected_page{    
+    line-height:20px;
+}
+#menu-wrap li.selected_subpage{    
+    line-height:25px;
+    padding-left:10px; 
+    padding-right: 11px;    
+}
+#menu-wrap li.selected_subpage a, #menu-wrap li.selected_subpage a:visited{
+    padding-right:0; 
+    padding-left:0; 
+}
+
+.cms-nav-clearit {
+    clear: both;
+    height: 0;
+    line-height: 0.0;
+    font-size: 0;
+}
+.cms-nav-sub-section{    
+    font-weight:bold;
+    font-size: 110%;
+    list-style-type: none;
+}
+ul li.cms-nav-sub-section:before{
+    content: '' !important;
+}
+
+.cms-nav-sidebar ul, .cms-nav-sidebar li, .cms-nav-sidebar a{
+    padding:0;
+    margin:0;    
+}
+.cms-nav-sidebar{
+    list-style: none;
+    padding:0;
+    margin:0;
+}
+.cms-nav-sidebar li{
+    position: relative;
+    margin:4px 8px 2px 8px;
+}
+.cms-nav-sidebar li.selected_page_side{
+    
+}
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/css/cms-navigation.css b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/css/cms-navigation.css
new file mode 100644
index 0000000..71fbd82
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/css/cms-navigation.css
@@ -0,0 +1,108 @@
+/* style the menu navigation wrap  */
+#menu-wrap {
+    background-color: #eee;
+} 
+
+#menu-wrap ul {
+    background-color: #5798d0;
+}
+
+/* style the links for the top level */
+#menu-wrap ul a, #menu-wrap ul a:visited {
+    text-decoration:none; 
+    color:#000; 
+    border-right:1px solid #fff; 
+}
+/* top level items on hover */
+#menu-wrap ul li:hover a, #menu-wrap ul a:focus, #menu-wrap ul a:active{    
+    background-color: #5798D0;               
+    color:#000; 
+}
+
+/* style the top level hover */
+#menu-wrap a:hover, #menu-wrap ul ul a:hover{
+    color:#000; 
+    background:#5798d0;
+}
+#menu-wrap :hover > a, #menu-wrap ul ul :hover > a {
+    color:#000; 
+    background:#B3D9FF;
+}
+
+
+/* menu sections with children */
+#menu-wrap a.trigger, #menu-wrap a.trigger:hover, #menu-wrap a.trigger:visited {
+    background-image: url(../img/cms-nav-dark-s.gif);
+    background-repeat: no-repeat;
+    background-position: right center;
+}
+
+
+/* style sections from the dropdown menus */
+#menu-wrap li.section{
+    color: #fff;
+    background-color: #4283b7;
+    font-weight: bold;        
+} 
+/* style sections from the dropdown menus */
+
+
+/* style the second level links */
+#menu-wrap ul ul a, #menu-wrap ul ul a:visited {
+    color:#000;;
+}
+
+          
+/* style the second level hover */
+#menu-wrap ul ul a:hover{
+    background:#B3D9FF
+}
+#menu-wrap ul ul :hover > a {
+    background:#B3D9FF
+}
+
+                                  
+/* style selected page in the top menu */                                  
+#menu-wrap li.selected_page{    
+    color: #004D99;
+    background-color: #5798d0;
+}
+
+/* style selected subpage in the top menu */                                  
+#menu-wrap li.selected_subpage{    
+    color: #004D99;
+    background-color: #B3D9FF;
+}
+#menu-wrap li.selected_subpage a, #menu-wrap li.selected_subpage a:visited{
+    background-color: #B3D9FF;
+}
+#menu-wrap ul ul li a.selected{    
+    background-color: #D0D8F0;
+    color: #004D99;
+}
+
+/* style sidebar navigation */
+
+#sidebar-navigation h4{
+    /* style sidebar title */
+}
+#sidebar-navigation .cms-nav-sidebar a, #sidebar-navigation .cms-nav-sidebar a:visited{
+    /* links */
+}
+#sidebar-navigation .cms-nav-sidebar a:hover, #sidebar-navigation .cms-nav-sidebar a:focus, #sidebar-navigation .cms-nav-sidebar a:active{
+    /* links hover */
+}
+
+.cms-nav-sidebar .selected_page_side{
+    /* selected item in side navigation */
+}
+
+.cms-nav-bc a, .cms-nav-bc a:visited{
+    /* trail navigation links */
+}
+.cms-nav-bc a:hover, .cms-nav-bc a:focus, .cms-nav-bc a:active{
+    /* trail navigation links hover */
+}
+.cms-nav-bc{
+    /* trail navigation links hover - not linked */
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/img/cms-nav-dark-s.gif b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/img/cms-nav-dark-s.gif
new file mode 100644
index 0000000..1022225
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/img/cms-nav-dark-s.gif differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/img/cms-nav-grad.jpg b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/img/cms-nav-grad.jpg
new file mode 100644
index 0000000..76051bc
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/modules/cms-navigation/img/cms-nav-grad.jpg differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/constants.inc b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/constants.inc
new file mode 100644
index 0000000..c23e44f
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/constants.inc
@@ -0,0 +1,20 @@
+<?php
+define('CMS_REQUEST_WAITING_FOR_PROJECT_CREATION',1);
+define('CMS_REQUEST_PROJECT_CREATION_REQUESTED',2);
+define('CMS_REQUEST_CREATING_PROJECT',3);
+define('CMS_REQUEST_RELEASED_TO_TRANSLATORS',4);
+define('CMS_REQUEST_TRANSLATED',5);
+define('CMS_REQUEST_DONE',6);
+define('CMS_REQUEST_FAILED',7);
+
+define ( 'CMS_TARGET_LANGUAGE_CREATED', 0);
+define ( 'CMS_TARGET_LANGUAGE_ASSIGNED', 1);
+define ( 'CMS_TARGET_LANGUAGE_TRANSLATED', 2);
+define ( 'CMS_TARGET_LANGUAGE_DONE', 3);
+
+define ( 'ICL_FINANCE_LINK', '/finance');
+
+define('MESSAGE_TRANSLATION_IN_PROGRESS', 3);
+define('MESSAGE_TRANSLATION_COMPLETE', 4);
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/css/style.css b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/css/style.css
new file mode 100644
index 0000000..3dcb5c8
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/css/style.css
@@ -0,0 +1,21 @@
+.icl-tr-details{
+    display: none;
+    padding-top: 5px;
+}
+.icl-tr-details .widefat th{
+    padding-top:2px !important;
+    padding-bottom:2px !important;
+}
+.form-table td, .form-table th{
+    border-bottom:none;
+}
+.icl_progress{
+    height:16px;
+    background-color: #ff9c72;
+    border:1px solid #ff6a2b;
+    float:left;
+    color:#fff;
+    display:none;
+    padding: 0 3px 0 3px;
+    text-align:left;    
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/db-scheme.php b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/db-scheme.php
new file mode 100644
index 0000000..bcdd7da
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/db-scheme.php
@@ -0,0 +1,60 @@
+<?php
+  global $wpdb;
+  
+  if ( method_exists($wpdb, 'has_cap') && $wpdb->has_cap( 'collation' ) ) {
+        if ( ! empty($wpdb->charset) )
+                $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset";
+        if ( ! empty($wpdb->collate) )
+                $charset_collate .= " COLLATE $wpdb->collate";
+  }else{
+    $charset_collate = '';
+  }    
+  
+  $icl_translation_sql = "
+         CREATE TABLE IF NOT EXISTS {$wpdb->prefix}icl_core_status (
+        `id` BIGINT NOT NULL auto_increment,
+        `rid` BIGINT NOT NULL,
+        `module` VARCHAR( 16 ) NOT NULL ,
+        `origin` VARCHAR( 64 ) NOT NULL ,
+        `target` VARCHAR( 64 ) NOT NULL ,
+        `status` SMALLINT NOT NULL,
+        PRIMARY KEY ( `id` ) ,
+        INDEX ( `rid` )
+        ) ENGINE=MyISAM {$charset_collate}
+  ";
+  mysql_query($icl_translation_sql);
+  $icl_translation_sql = "
+        CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}icl_content_status` (
+        `rid` BIGINT NOT NULL ,
+        `nid` BIGINT NOT NULL ,
+        `timestamp` DATETIME NOT NULL ,
+        `md5` VARCHAR( 32 ) NOT NULL ,
+        PRIMARY KEY ( `rid` ) ,
+        INDEX ( `nid` )
+        ) ENGINE=MyISAM {$charset_collate} 
+  ";  
+   mysql_query($icl_translation_sql);
+   
+  $icl_translation_sql = "
+        CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}icl_node` (
+        `nid` BIGINT NOT NULL ,
+        `md5` VARCHAR( 32 ) NOT NULL ,
+        `links_fixed` TINYINT NOT NULL DEFAULT 0,
+        PRIMARY KEY ( `nid` )
+        ) ENGINE=MyISAM {$charset_collate}  
+  ";  
+   mysql_query($icl_translation_sql);
+   
+  $icl_translation_sql = "
+        CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}icl_reminders` (
+        `id` BIGINT NOT NULL ,
+        `message` TEXT NOT NULL ,
+        `url`  TEXT NOT NULL ,
+        `can_delete` TINYINT NOT NULL ,
+        `show` TINYINT NOT NULL ,
+        PRIMARY KEY ( `id` )
+        ) ENGINE=MyISAM {$charset_collate}  
+  ";  
+   mysql_query($icl_translation_sql);
+   
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-ajx-requests.php b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-ajx-requests.php
new file mode 100644
index 0000000..8c6856f
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-ajx-requests.php
@@ -0,0 +1,83 @@
+<?php
+$iclq = new ICanLocalizeQuery($sitepress_settings['site_id'], $sitepress_settings['access_key']);       
+
+switch($_REQUEST['icl_ajx_req']){
+    case 'get_translation_details':
+        $rids = explode("-", $_REQUEST['rid']);
+        sort($rids);
+        ?>
+        <table class="widefat fixed">
+        <thead>
+        <tr>
+            <th scope="col"><?php echo __('Language', 'sitepress') ?></th>
+            <th scope="col"><?php echo __('Status', 'sitepress') ?></th>        
+            <th scope="col"><?php echo __('Translator', 'sitepress') ?></th>        
+        </tr>  
+        </thead>
+        <?php
+        $language_status = array();
+        foreach($rids as $rid) {
+            $details = $iclq->cms_request_translations($rid);
+            $upload = $details['cms_uploads']['cms_upload'];
+            $target_languages = $details['cms_target_languages']['cms_target_language'];
+            if ($target_languages != null){
+                // HACK: If we only have one target language then the $target_languages
+                // array no longer has an array of languages but returns just the target language
+                if(!isset($target_languages[0])){
+                    $target = $target_languages;
+                    $target_languages = array(0 => $target);
+                }                                
+                foreach($target_languages as $l){
+                    $lang_server = $l['attr']['language'];
+                    $lang = apply_filters('icl_server_languages_map', $lang_server, true);
+                    $lang_loc = $wpdb->get_var("
+                        SELECT lt.name FROM {$wpdb->prefix}icl_languages_translations lt 
+                        JOIN {$wpdb->prefix}icl_languages l ON lt.language_code=l.code 
+                        WHERE lt.display_language_code='" . $sitepress->get_default_language(). "' AND lt.name='{$lang}'");
+                    if(!$lang_loc){
+                        $lang_loc = $lang;
+                    }
+                    $language_status[$lang]['lang'] = $lang_loc;
+                    $language_status[$lang]['words'] = sprintf(__('Job size: %s words', 'sitepress'), number_format($l['attr']['word_count']));
+                    $language_status[$lang]['status'] = icl_decode_translation_status_id($l['attr']['status']);
+                    if($l['translator']['attr']['id']){
+                        $language_status[$lang]['translator'] = $sitepress->create_icl_popup_link(ICL_API_ENDPOINT .'/websites/'.$iclq->setting('site_id').'/cms_requests/'.$rid.'/chat?lang='.str_replace(' ','%20',$lang_server), array('title'=>'ICanLocalize')).$l['translator']['attr']['nickname'].'</a>';
+                    } else {
+                        $language_status[$lang]['translator'] = __('None assigned', 'sitepress');
+                    }
+                    $language_status[$lang]['project'] = $sitepress->create_icl_popup_link(ICL_API_ENDPOINT.'/websites/'.$iclq->setting('site_id').'/cms_requests/'.$rid, array('title'=>'ICanLocalize')) . __('Project page on ICanLocalize.com', 'sitepress').'</a>';
+                    $language_status[$lang]['sent'] = sprintf(__('Sent for translation: %s', 'sitepress'), date('m/d/Y H:i', $details['attr']['created_at']));
+                }
+            }
+        }
+        ?>
+        <?php foreach ($language_status as $data): ?>
+            <tr>
+                <td>
+                    <?php echo $data['lang']?>
+                </td>
+                <td>
+                    <?php echo $data['status']?>
+                </td>
+                <td>
+                    <?php echo $data['translator']?>
+                </td>
+            </tr>
+            
+            <tr>
+                <td colspan=3>
+                    <?php echo $data['project']?><br />
+                    <?php echo $data['sent']?><br />
+                    <?php echo $data['words']?>
+                </td>
+            </tr>
+
+        <?php endforeach; ?>
+        </table>
+        <?php
+
+        break;
+}
+
+exit;
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-reminder-popup.php b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-reminder-popup.php
new file mode 100644
index 0000000..aca0dd4
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-reminder-popup.php
@@ -0,0 +1,149 @@
+<?php
+// included from Sitepress::reminder_popups
+//
+
+    // NOTE: this is also used for other popup links to ICanLocalize
+
+    global $wpdb;
+    	
+    $target = $_GET['target'];
+    $auto_resize = isset($_GET['auto_resize']) && $_GET['auto_resize'];
+    $unload_cb = isset($_GET['unload_cb']) ? $_GET['unload_cb'] : false;
+    if(preg_match('|^ select-translators;([^;]+);([^;]+)@|', $target, $matches)){
+        $from_lang = $matches[1];
+        $to_lang = $matches[2];
+
+        require_once ICL_PLUGIN_PATH . '/lib/Snoopy.class.php';
+        require_once ICL_PLUGIN_PATH . '/lib/xml2array.php';
+        require_once ICL_PLUGIN_PATH . '/lib/icl_api.php';
+        $icl_query = new ICanLocalizeQuery();                
+        
+        foreach($this->get_active_languages() as $lang){
+            $lang_server[$lang['code']] = apply_filters('icl_server_languages_map', $lang['english_name']);
+        }        
+        if(!$this->icl_account_configured()){
+            $user['create_account'] = 1;
+            $user['anon'] = 1;
+            $user['platform_kind'] = 2;
+            $user['cms_kind'] = 1;
+            $user['blogid'] = $wpdb->blogid?$wpdb->blogid:1;
+            $user['url'] = get_option('home');
+            $user['title'] = get_option('blogname');
+            $user['description'] = $this->settings['icl_site_description'];
+            $user['is_verified'] = 1;                
+           if(defined('ICL_AFFILIATE_ID') && defined('ICL_AFFILIATE_KEY')){
+                $user['affiliate_id'] = ICL_AFFILIATE_ID;
+                $user['affiliate_key'] = ICL_AFFILIATE_KEY;
+            }
+            $user['interview_translators'] = $this->settings['interview_translators'];
+            $user['project_kind'] = 2;
+            $user['pickup_type'] = intval($this->settings['translation_pickup_method']);
+            $notifications = 0;
+            if ( $this->settings['icl_notify_complete']){
+                $notifications += 1;
+            }
+            if ( $this->settings['alert_delay']){
+                $notifications += 2;
+            }
+            $user['notifications'] = $notifications;
+            $user['ignore_languages'] = 0;
+            
+            $user['from_language1'] = $lang_server[$from_lang]; 
+            $user['to_language1'] = $lang_server[$to_lang]; 
+
+            list($site_id, $access_key) = $icl_query->createAccount($user);                
+            if($site_id && $access_key){
+                $this->settings['site_id'] = $iclsettings['site_id'] = $site_id;
+                $this->settings['access_key'] = $iclsettings['access_key'] = $access_key;
+                $iclsettings['language_pairs'][$from_lang][$to_lang] = 1;
+                $this->save_settings($iclsettings);
+            }else{
+                echo '<p class="error" style="padding-left:8px;">';
+                printf(__('WPML did not manage to access the server at ICanLocalize. Please <a%s>contact us</a> for support.', 'sitepress'), ' target="_blank" href="http://www.icanlocalize.com/site/about-us/contact-us/";');
+                echo '</p>';
+                exit;
+            }
+        }else{
+            
+            $iclsettings['language_pairs'] = $this->settings['language_pairs'];
+            $iclsettings['language_pairs'][$from_lang][$to_lang] = 1;
+            $this->save_settings($iclsettings);
+            
+            // update account - add language pair
+            foreach($this->settings['language_pairs'] as $k=>$v){
+                foreach($v as $k2=>$v2){
+                    $incr++;
+                    $data['from_language'.$incr] = $lang_server[$k]; 
+                    $data['to_language'.$incr] = $lang_server[$k2];
+                }    
+            }
+            
+            $data['site_id'] = $this->settings['site_id'];                    
+            $data['accesskey'] = $this->settings['access_key'];
+            $data['create_account'] = 0;
+            
+            $icl_query->updateAccount($data);
+            
+        }
+        
+        $icl_query = new ICanLocalizeQuery($this->settings['site_id'], $this->settings['access_key']);                
+        $website_details = $icl_query->get_website_details();
+        
+        $translation_languages = $website_details['translation_languages']['translation_language'];        
+        if(isset($translation_languages['attr'])){
+            $buff = $translation_languages;
+            unset($translation_languages);
+            $translation_languages[0] = $buff;
+            unset($buff);
+        }
+        foreach((array)$translation_languages as $lpair){
+            if($lpair['attr']['from_language_name'] == $lang_server[$from_lang] && $lpair['attr']['to_language_name'] == $lang_server[$to_lang]){
+                $lang_pair_id = $lpair['attr']['id']; 
+            }    
+        }
+        
+        $target = ICL_API_ENDPOINT . '/websites/' . $this->settings['site_id'] . '/website_translation_offers/'.$lang_pair_id.'?accesskey=' . $this->settings['access_key'] . '&compact=1';
+    
+    }
+    
+    $support_mode = $_GET['support'];
+    
+    if ($support_mode == '1') {
+        $iclq = new ICanLocalizeQuery($this->settings['support_site_id'], $this->settings['support_access_key']);
+    } else {
+        $iclq = new ICanLocalizeQuery($this->settings['site_id'], $this->settings['access_key']);
+    }
+    $session_id = $iclq->get_current_session(true, $support_mode == '1');
+    
+    $admin_lang = $this->get_admin_language();
+    
+	
+	if (isset($_GET['code'])) {
+		$add = '&code=' . $_GET['code'];
+	}
+	
+    if (strpos($target, '?') === false) {
+        $target .= '?';
+    } else {
+        $target .= '&';
+    }
+    $target .= "session=" . $session_id . "&lc=" . $admin_lang . $add;
+    
+
+    $on_click = 'parent.dismiss_message(' . $_GET['message_id'] . ');';
+    
+    $can_delete = isset($_GET['message_id']) ? $wpdb->get_var("SELECT can_delete FROM {$wpdb->prefix}icl_reminders WHERE id='{$_GET['message_id']}'") == '1' : false;
+
+    $image_path = ICL_PLUGIN_URL . '/res/img/web_logo_small.png';
+    echo '<img src="' . $image_path . '"  style="margin: 0px 0px 0px; float: left; "><br clear="all" />';
+    
+?>
+
+
+<?php if($can_delete): ?>
+    <a id="icl_reminder_dismiss" href="#" onclick="<?php echo $on_click?>"><?php _e('Dismiss', 'sitepress')?></a>
+    <br />
+    <br />
+<?php endif; ?>
+<iframe src="<?php echo $target;?>" style="width:95%; height:90%" onload="<?php if($auto_resize):?>jQuery('#TB_window').css('width','90%').css('margin-left', '-45%');<?php endif; ?><?php if($unload_cb):?>jQuery('#TB_window').bind('unload', <?php echo $unload_cb ?>);<?php endif; ?>">
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation-dashboard.php b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation-dashboard.php
new file mode 100644
index 0000000..48f4619
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation-dashboard.php
@@ -0,0 +1,310 @@
+<?php 
+    $default_language = $sitepress->get_default_language();
+    
+    if(isset($icl_translation_filter['lang'])){
+        $selected_language = $icl_translation_filter['lang']; 
+    }else{
+        $selected_language = isset($_GET['lang'])?$_GET['lang']:$default_language;
+    }
+    if(isset($icl_translation_filter['tstatus'])){
+        $tstatus = $icl_translation_filter['tstatus']; 
+    }else{
+        $tstatus = isset($_GET['tstatus'])?$_GET['tstatus']:'all';
+    }     
+    if(isset($icl_translation_filter['status_on'])){
+        $status = $icl_translation_filter['status'];
+    }else{
+        if(isset($_GET['status_on']) && isset($_GET['status'])){
+            $status = $_GET['status'];
+        }else{
+            $status = false;
+            if(isset($icl_translation_filter)){
+                unset($icl_translation_filter['status_on']);
+                unset($icl_translation_filter['status']);                
+            }
+        }
+    }
+
+    if(isset($icl_translation_filter['type_on'])){
+        $type = $icl_translation_filter['type'];
+    }else{
+        if(isset($_GET['type_on']) && isset($_GET['type'])){
+            $type = $_GET['type'];
+        }else{
+            $type = false;
+            if(isset($icl_translation_filter)){
+                unset($icl_translation_filter['type_on']);
+                unset($icl_translation_filter['type']);
+            }
+        }
+    }   
+    
+    $active_languages = $sitepress->get_active_languages();
+    $sitepress_settings = $sitepress->get_settings();
+    $language_pairs = $sitepress_settings['language_pairs'];
+    $documents = icl_translation_get_documents($selected_language, $tstatus, $status, $type);
+    $icl_post_statuses = array(
+        'publish'   =>__('Published', 'sitepress'),
+        'draft'     =>__('Draft', 'sitepress'),
+        'pending'   =>__('Pending Review', 'sitepress'),
+        'future'    =>__('Scheduled', 'sitepress')
+    );    
+    $icl_post_types = $sitepress->get_translatable_documents();
+    
+?>
+<?php $sitepress->noscript_notice() ?>
+
+    <?php if ($_GET['message'] == 'icl_message_error'): ?>    
+        <div class="icl_form_errors"><?php echo __('Error sending some documents to translation', 'sitepress')?></div>
+    <?php endif;?>
+    <?php if ($_GET['message'] == 'icl_message_1'): ?>    
+        <div class="icl_form_success"><?php echo __('All documents sent to translation', 'sitepress')?></div>
+    <?php endif;?>
+         
+        
+    <?php if(isset($_GET['post_id'])): ?>
+    <a href="admin.php?page=<?php echo $_GET['page']?>"><?php echo __('Show all documents', 'sitepress')?></a> / <a href="post.php?action=edit&amp;post=<?php echo $_GET['post_id'] ?>"><?php printf(__("Back to editing '%s'", 'sitepress'),$documents[$_GET['post_id']]->post_title); ?></a>
+    <script type="text/javascript">
+    jQuery(document).ready(function(){
+            jQuery('#icl-estimated-words-count').html('<?php echo count(explode(' ', $documents[$_GET['post_id']]->post_content)) ?>');
+            jQuery('#icl-estimated-quote').html('<?php echo 0.07 * count(explode(' ', $documents[$_GET['post_id']]->post_content)) ?>');
+            jQuery('#icl-estimated-quote-all').html('<?php echo (count($active_languages)-1) * 0.07 * count(explode(' ', $documents[$_GET['post_id']]->post_content)) ?>');            
+    });
+    </script>
+    <?php else: ?>
+    <form method="post" name="translation-dashboard-filter" action="admin.php?page=<?php echo ICL_PLUGIN_FOLDER; ?>/menu/content-translation.php">
+    <table class="form-table widefat fixed" style="width:auto">
+        <thead>
+        <tr>
+            <th scope="col" colspan="3"><strong><?php _e('Select which documents to display','sitepress')?></strong></th>
+        </tr>
+        </thead>        
+        <tr valign="top">
+            <th scope="row"><strong><?php echo __('Show documents in:', 'sitepress') ?></strong></th>
+            <td colspan="2">
+                <?php foreach($active_languages as $lang): ?>
+                    <label><input type="radio" name="filter[lang]" value="<?php echo $lang['code'] ?>" <?php if($selected_language==$lang['code']): ?>checked="checked"<?php endif;?>/><?php echo $lang['display_name'] ?></label>&nbsp;&nbsp;
+                <?php endforeach; ?>
+            </td>
+        </tr>
+        <tr valign="top">
+            <th scope="row"><strong><?php echo __('Translation status:', 'sitepress') ?></strong>    </th>
+            <td colspan="2">
+                <select name="filter[tstatus]">
+                    <?php
+                        $option_status = array(
+                                               'all' => __('All documents', 'sitepress'),
+                                               'not' => __('Not translated or needs updating', 'sitepress'),
+                                               'in_progress' => __('Translation in progress', 'sitepress'),
+                                               'complete' => __('Translation complete', 'sitepress'));
+                    ?>
+                    <?php foreach($option_status as $k=>$v):?>
+                    <option value="<?php echo $k ?>" <?php if($tstatus==$k):?>selected="selected"<?php endif?>><?php echo $v ?></option>
+                    <?php endforeach; ?>
+                </select>
+            </td>
+        </tr>
+        <tr valign="top">
+            <th scope="row"><strong><?php echo __('Filter furter by:', 'sitepress') ?></strong>    </th>
+            <td>
+                <label><input type="checkbox" name="filter[status_on]" <?php if(isset($icl_translation_filter['status_on'])):?>checked="checked"<?php endif?> />&nbsp;
+                    Status:</label> 
+                    <select name="filter[status]">
+                        <?php foreach($icl_post_statuses as $k=>$v):?>
+                        <option value="<?php echo $k ?>" <?php if(isset($icl_translation_filter['status_on']) && $icl_translation_filter['status']==$k):?>selected="selected"<?php endif?>><?php echo $v ?></option>
+                        <?php endforeach; ?>
+                    </select>
+                &nbsp;&nbsp;    
+                <label><input type="checkbox" name="filter[type_on]" <?php if(isset($icl_translation_filter['type_on'])):?>checked="checked"<?php endif?> />&nbsp;
+                    Type:</label> 
+                    <select name="filter[type]">
+                        <?php foreach($icl_post_types as $k=>$v):?>
+                        <option value="<?php echo $k ?>" <?php if(isset($icl_translation_filter['type_on']) && $icl_translation_filter['type']==$k):?>selected="selected"<?php endif?>><?php echo $v->labels->singular_name; ?></option>
+                        <?php endforeach; ?>
+                    </select>
+                                        
+            </td>
+            <td align="right"><input name="translation_dashboard_filter" class="button" type="submit" value="<?php echo __('Display','sitepress')?>" /></td>
+        </tr>
+    </table>
+    </form>
+    <br />
+    <?php endif; ?>
+
+    <table class="widefat fixed" id="icl-translation-dashboard" cellspacing="0">
+        <thead>
+        <tr>
+            <th scope="col" class="manage-column column-cb check-column"><input type="checkbox" <?php if(isset($_GET['post_id'])) echo 'checked="checked"'?>/></th>
+            <th scope="col"><?php echo __('Title', 'sitepress') ?></th>
+            <th scope="col" class="manage-column column-date">
+                <img title="<?php _e('Note for translators', 'sitepress') ?>" src="<?php echo ICL_PLUGIN_URL ?>/res/img/notes.png" alt="note" width="16" height="16" /></th>
+            <th scope="col" class="manage-column column-date"><?php echo __('Type', 'sitepress') ?></th>
+            <th scope="col" class="manage-column column-date"><?php echo __('Status', 'sitepress') ?></th>        
+            <th scope="col" class="manage-column column-date"><?php echo __('Translation', 'sitepress') ?></th>        
+        </tr>        
+        </thead>
+        <tfoot>
+        <tr>
+            <th scope="col" class="manage-column column-cb check-column"><input type="checkbox" <?php if(isset($_GET['post_id'])) echo 'checked="checked"'?>/></th>
+            <th scope="col"><?php echo __('Title', 'sitepress') ?></th>
+            <th scope="col" class="manage-column column-date">
+                <img title="<?php _e('Note for translators', 'sitepress') ?>" src="<?php echo ICL_PLUGIN_URL ?>/res/img/notes.png" alt="note" width="16" height="16" /></th>
+            <th scope="col" class="manage-column column-date"><?php echo __('Type', 'sitepress') ?></th>
+            <th scope="col" class="manage-column column-date"><?php echo __('Status', 'sitepress') ?></th>        
+            <th scope="col" class="manage-column column-date"><?php echo __('Translation', 'sitepress') ?></th>        
+        </tr>        
+        </tfoot>                    
+        <tbody>
+            <?php if(!$documents): ?>
+            <tr>
+                <td scope="col" colspan="5" align="center"><?php echo __('No documents found', 'sitepress') ?></td>
+            </tr>                
+            <?php else: $oddcolumn = false; ?>
+            <?php foreach($documents as $doc): $oddcolumn=!$oddcolumn; ?>
+            <?php 
+            if($doc->rid[0] != null){
+                if(isset($doc->in_progress) && $doc->in_progress > 0){                        
+                    $tr_status = __('In progress', 'sitepress');
+                }elseif($doc->updated){                            
+                    $tr_status = __('Needs update', 'sitepress');
+                }else{
+                    $tr_status = __('Complete', 'sitepress');
+                }
+            }else{
+                $tr_status = __('Not Translated', 'sitepress');
+            }
+            
+            ?>            
+            <tr<?php if($oddcolumn): ?> class="alternate"<?php endif;?>>
+                <td scope="col">
+                    <input type="checkbox" value="<?php echo $doc->post_id ?>" name="post[]" <?php if(isset($_GET['post_id'])) echo 'checked="checked"'?> />                    
+                </td>
+                <td scope="col" class="post-title column-title">
+                    <a href="<?php echo get_edit_post_link($doc->post_id) ?>"><?php echo $doc->post_title ?></a>
+                    <?php
+                        $wc = icl_estimate_word_count($doc, $selected_language);
+                        $wc += icl_estimate_custom_field_word_count($doc->post_id, $selected_language);
+                    ?>
+                    <span id="icl-cw-<?php echo $doc->post_id ?>" style="display:none"><?php echo $wc; $wctotal+=$wc; ?></span>
+                    <span class="icl-tr-details">&nbsp;</span>
+                    <div class="icl_post_note" id="icl_post_note_<?php echo $doc->post_id ?>">
+                        <?php 
+                            if($wpdb->get_var("SELECT source_language_code FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$doc->post_type}' AND element_id={$doc->post_id}")){
+                                $_is_translation = true;
+                            }else{
+                                $_is_translation = false;
+                                $note = get_post_meta($doc->post_id, '_icl_translator_note', true); 
+                                if($note){
+                                    $note_text = __('Edit note for the translators', 'sitepress');
+                                    $note_icon = 'edit_translation.png';
+                                }else{
+                                    $note_text = __('Add note for the translators', 'sitepress');
+                                    $note_icon = 'add_translation.png';
+                                }
+                            }
+                        ?>
+                        <?php _e('Note for the translators', 'sitepress')?> 
+                        <textarea rows="5"><?php echo $note ?></textarea> 
+                        <table width="100%"><tr>
+                        <td style="border-bottom:none">
+                            <input type="button" class="icl_tn_clear button" 
+                                value="<?php _e('Clear', 'sitepress')?>" <?php if(!$note): ?>disabled="disabled"<?php endif; ?> />        
+                            <input class="icl_tn_post_id" type="hidden" value="<?php echo $doc->post_id ?>" />
+                        </td>
+                        <td align="right" style="border-bottom:none"><input type="button" class="icl_tn_save button-primary" value="<?php _e('Save', 'sitepress')?>" /></td>
+                        </tr></table>
+                    </div>
+                </td>
+                <td scope="col" class="icl_tn_link" id="icl_tn_link_<?php echo $doc->post_id ?>">
+                    <?php if($_is_translation):?>
+                    &nbsp;
+                    <?php else: ?>
+                    <a title="<?php echo $note_text ?>" href="#"><img src="<?php echo ICL_PLUGIN_URL ?>/res/img/<?php echo $note_icon ?>" width="16" height="16" /></a>
+                    <?php endif; ?>
+                </td>
+                <td scope="col">
+                    <?php echo $icl_post_types[$doc->post_type]->labels->singular_name; ?>
+                    <input class="icl_td_post_type" name="icl_post_type[<?php echo $doc->post_id ?>]" type="hidden" value="<?php echo $doc->post_type ?>" />
+                </td>
+                <td scope="col"><?php echo $icl_post_statuses[$doc->post_status]; ?></td>
+                <td scope="col" id="icl-tr-status-<?php echo $doc->post_id ?>">
+                    <?php if($doc->rid[0]): ?>
+                    <a href="#translation-details-<?php echo implode('-', $doc->rid) ; ?>" class="translation_details_but">
+                    <?php endif; ?>
+                    <?php echo $tr_status ?>
+                    <?php if($doc->rid[0]): ?></a><?php endif; ?>
+                </td>
+            </tr>                            
+            <?php endforeach;?>
+            <?php endif;?>
+        </tbody> 
+    </table>
+    <span id="icl-cw-total" style="display:none"><?php echo $wctotal; ?></span>    
+    <div class="tablenav">
+    <div style="float:left;margin-top:4px;"><strong><?php echo __('Translation Cost Estimate:', 'sitepress') ?></strong> 
+        <?php printf(__('%s words, %s USD.', 'sitepress'), 
+                '<span id="icl-estimated-words-count">0</span>', 
+                '<strong><span id="icl-estimated-quote">0.00</span></strong>') 
+              . '<span id="icl-estimated-all" style="display:none;"></span>' ?></div>
+    <?php   
+        $page_links = paginate_links( array(
+            'base' => add_query_arg('paged', '%#%' ),
+            'format' => '',
+            'prev_text' => '&laquo;',
+            'next_text' => '&raquo;',
+            'total' => $wp_query->max_num_pages,
+            'current' => $_GET['paged'],
+            'add_args' => isset($icl_translation_filter)?$icl_translation_filter:array() 
+        ));         
+    ?>
+    <?php if ( $page_links ) { ?>
+    <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s', 'sitepress' ) . '</span>%s',
+        number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
+        number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
+        number_format_i18n( $wp_query->found_posts ),
+        $page_links
+    ); echo $page_links_text; ?></div>
+    <?php } ?>
+    </div>
+    
+        <ul id="icl-tr-opt">
+            <?php   
+                if (isset($icl_lang_status)){
+                    foreach($icl_lang_status as $lang){
+                        if($lang['from'] == $selected_language) {
+                            $target_status[$lang['to']] = !empty($lang['translators']);
+                            $target_rate[$lang['to']] = $lang['max_rate'];
+                        }
+                    }
+                }
+            ?>
+            <?php foreach($active_languages as $lang): if($selected_language==$lang['code']) continue; ?>
+                <?php 
+                    if($target_status[$lang['code']]){
+                        $disabled =  ''; 
+                        $checked='checked="checked"';
+                    }else{
+                        $disabled =  ' disabled="disabled"'; 
+                        $checked='';
+                    }
+                ?>
+                <li>
+                    <label>
+                        <input type="checkbox" name="icl-tr-to-<?php echo $lang['code']?>" value="<?php echo $lang['english_name']?>"<?php echo $checked ?><?php echo $disabled ?> />&nbsp;
+                        <?php printf(__('Translate to %s %s','sitepress'), $lang['display_name'], $sitepress->get_language_status_text($selected_language, $lang['code'])); ?>
+                    </label>
+                    <input type="hidden" id="icl_tr_rate_<?php echo $lang['code'] ?>" value="<?php echo $target_rate[$lang['code']] ?>" />
+                </li>
+            <?php endforeach; ?>    
+            
+            <li>
+                <input<?php if(!isset($_GET['post_id'])): ?> disabled="disabled"<?php endif; ?> type="submit" class="button-primary" id="icl-tr-sel-doc" value="<?php 
+                    echo __('Translate selected documents', 'sitepress') ?>" />
+                <span class="icl_ajx_response" id="icl_ajx_response_td"><?php 
+                    echo __('Sending translation requests. Please wait!', 'sitepress') ?>&nbsp;<img src="<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif" alt="" /></span>
+            </li>
+        </ul>
+        
+        <span id="icl_message_1" style="display:none"><?php echo __('All documents sent to translation', 'sitepress')?></span>
+        <span id="icl_message_error" style="display:none"><?php echo __('Error sending some documents to translation', 'sitepress')?></span>
+        <span id="icl_message_2" style="display:none"><?php echo __('Translation in progress', 'sitepress')?></span>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation-functions.php b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation-functions.php
new file mode 100644
index 0000000..698a5e1
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation-functions.php
@@ -0,0 +1,2327 @@
+<?php
+
+function icl_translation_js(){
+    wp_enqueue_script('icl-translation-scripts', ICL_PLUGIN_URL . '/modules/icl-translation/js/icl-translation.js', array(), '0.1');
+}
+
+function icl_get_request_ids_for_post($post_id, $source_language, $target_languages){
+    global $sitepress;
+    
+    foreach((array)$target_languages as $target){
+        $target_code = $sitepress->get_language_code($target);
+        
+        $rid[$target] = icl_get_latest_request_id($post_id, $source_language, $target_code);
+        
+    }
+    
+    return $rid;
+    
+}
+
+function icl_initialize_db(){
+    include_once ICL_PLUGIN_PATH . '/modules/icl-translation/db-scheme.php';
+}
+
+function icl_get_latest_request_id($post_id, $source_language, $target_code){
+    global $wpdb;
+    
+    $sql = "SELECT content.rid FROM
+                {$wpdb->prefix}icl_content_status content
+            JOIN 
+               {$wpdb->prefix}icl_core_status core
+            ON
+               content.rid = core.rid
+            WHERE
+               content.nid = {$post_id} AND
+               core.origin = '{$source_language}' AND
+               core.target = '{$target_code}'
+            ORDER BY rid DESC
+            LIMIT 1
+            ";
+            
+    return $wpdb->get_var($sql);
+}
+
+function icl_get_all_languages_associated($post_id, $source_language, $rid) {
+    global $wpdb;
+    
+    $languages = $wpdb->get_col("SELECT target FROM {$wpdb->prefix}icl_core_status WHERE rid={$rid}");
+                                                
+    // check other request_ids that include these languages.
+
+    $other_rids = array();    
+    foreach($languages as $target_code) {
+        $sql = "SELECT content.rid FROM
+                    {$wpdb->prefix}icl_content_status content
+                JOIN 
+                   {$wpdb->prefix}icl_core_status core
+                ON
+                   content.rid = core.rid
+                WHERE
+                   content.nid = {$post_id} AND
+                   core.origin = '{$source_language}' AND
+                   core.target = '{$target_code}'
+                ";
+                
+        foreach($wpdb->get_col($sql) as $id){
+            if (!in_array($id, $other_rids)){
+                $other_rids[] = $id;
+            }
+        }
+    }
+    foreach($other_rids as $id){
+        foreach($wpdb->get_col("SELECT target FROM {$wpdb->prefix}icl_core_status WHERE rid={$id}") as $other_lang){
+            if (!in_array($other_lang, $languages)){
+                $languages[] = $other_lang;
+            }
+        }
+        
+    }
+    
+    return $languages;
+    
+}
+
+function icl_translation_send_post($post_id, $target_languages, $post_type='post'){
+    global $sitepress_settings, $wpdb, $sitepress;
+    $post = get_post($post_id);
+    
+    if(!$post){
+        return false;
+    }
+    
+    icl_translation_save_md5($post_id); // make sure the md5 is up to date.
+    $post_md5 = $wpdb->get_var("SELECT md5 FROM {$wpdb->prefix}icl_node WHERE nid=" . $post_id);
+    
+
+    $source_lang = $sitepress->get_language_for_element($post_id, 'post_' . $post_type);
+    
+    // get the previous request ids for this node and these langauges.
+    $previous_rid = icl_get_request_ids_for_post($post_id,
+                                                    $source_lang,
+                                                    $target_languages);
+    $targets_available = array();
+            
+    foreach($target_languages as $target){
+        // Make sure the previous request is complete.
+        $available = true;
+        
+        $rid = $previous_rid[$target];
+        if (isset($previous_rid[$target])){
+            // check to make sure this is the latest $rid
+            // get all languages for this rid
+            $langs = icl_get_all_languages_associated($post_id, $source_lang, $rid);
+            
+            // see if we have any later rids for any language.
+            foreach($langs as $lang){
+                $test_rid = icl_get_latest_request_id($post_id,
+                                                     $source_lang,
+                                                     $lang);
+                $status = $wpdb->get_col("SELECT status FROM {$wpdb->prefix}icl_core_status WHERE rid={$test_rid}");
+                foreach($status as $state){
+                    if($state != CMS_TARGET_LANGUAGE_DONE){
+                        // translation is still in progress for one or more languages.
+                        $available = false;
+                    }
+                }
+            }
+            if ($available){
+                // check md5 is different.
+                $request_md5 = $wpdb->get_var("SELECT md5 FROM {$wpdb->prefix}icl_content_status WHERE rid={$rid}");
+                if($request_md5 == $post_md5){
+                    $available = false;
+                }
+            }
+        }
+        if ($available){
+            if (isset($previous_rid[$target])){
+                $targets_available[$rid][] = $target;
+            } else {
+                $targets_available[] = array($target);
+            }
+        }
+        
+    }
+            
+    if (sizeof($targets_available) == 0){
+        return false;
+    }
+    
+    $target_languages = $targets_available;
+  
+    $iclq = new ICanLocalizeQuery($sitepress_settings['site_id'], $sitepress_settings['access_key']);
+    
+    //$post_url       = get_permalink($post_id);
+    if($post->post_type=='page'){
+        $post_url       = get_option('home') . '?page_id=' . ($post_id);
+    }else{
+        $post_url       = get_option('home') . '?p=' . ($post_id);
+    }
+    /*
+    }else{
+        global $wp_post_types;
+        $post_url = get_option('home') . '?' . $wp_post_types[$post_type]->query_var . '=' . ($post->post_name);
+    }
+    */
+    
+    $orig_lang = $wpdb->get_var("
+        SELECT l.english_name 
+        FROM {$wpdb->prefix}icl_translations t 
+        JOIN {$wpdb->prefix}icl_languages l ON t.language_code=l.code 
+        WHERE t.element_id={$post_id} AND t.element_type='post_{$post_type}'"
+        );
+    
+    $orig_lang_for_server = apply_filters('icl_server_languages_map', $orig_lang);
+            
+    /*if($post_type=='post'){*/
+        foreach(wp_get_object_terms($post_id, 'post_tag') as $tag){
+            $post_tags[$tag->term_taxonomy_id] = $tag->name;
+        }   
+        
+        if(is_array($post_tags)){
+            //only send tags that don't have a translation
+            foreach($post_tags as $term_taxonomy_id=>$pc){
+                $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$term_taxonomy_id}' AND element_type='tax_post_tag'");
+                foreach($target_languages as $lang){
+                    $lang = $lang[0]; // get the languag name (string)
+                    $not_translated = false;
+                    if($trid != $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations t JOIN {$wpdb->prefix}icl_languages l ON l.code = t.language_code WHERE l.english_name='{$lang}' AND trid='{$trid}'")){
+                        $not_translated = true;
+                        break;
+                    }                
+                }
+                if($not_translated){
+                    $tags_to_translate[$term_taxonomy_id] = $pc; 
+                }            
+            }              
+            sort($post_tags, SORT_STRING);
+        } 
+               
+        foreach(wp_get_object_terms($post_id, 'category') as $cat){
+            $post_categories[$cat->term_taxonomy_id] = $cat->name;
+        }      
+                      
+        if(is_array($post_categories)){
+            //only send categories that don't have a translation
+            foreach($post_categories as $term_taxonomy_id=>$pc){
+                $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$term_taxonomy_id}' AND element_type='tax_category'");
+                foreach($target_languages as $lang){
+                    $lang = $lang[0]; // get the languag name (string)
+                    $not_translated = false;
+                    if($trid != $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations t JOIN {$wpdb->prefix}icl_languages l ON l.code = t.language_code WHERE l.english_name='{$lang}' AND trid='{$trid}'")){
+                        $not_translated = true;
+                        break;
+                    }                
+                }
+                if($not_translated){
+                    $categories_to_translate[$term_taxonomy_id] = $pc; 
+                }            
+            }  
+            sort($post_categories, SORT_STRING);
+        }
+        
+        // get custom taxonomies
+        $taxonomies = $wpdb->get_col("
+            SELECT DISTINCT tx.taxonomy 
+            FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->term_relationships} tr ON tx.term_taxonomy_id = tr.term_taxonomy_id
+            WHERE tr.object_id = {$post_id}
+        ");
+        foreach($taxonomies as $t){
+            if($sitepress_settings['taxonomies_sync_option'][$t] == 1){
+                $object_terms = $wpdb->get_results("
+                    SELECT x.term_taxonomy_id, t.name 
+                    FROM {$wpdb->terms} t 
+                        JOIN {$wpdb->term_taxonomy} x ON t.term_id=x.term_id
+                        JOIN {$wpdb->term_relationships} r ON x.term_taxonomy_id = r.term_taxonomy_id
+                    WHERE x.taxonomy = '{$t}' AND r.object_id = $post_id
+                    ");
+                foreach($object_terms as $trm){
+                    $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations 
+                        WHERE element_id='{$trm->term_taxonomy_id}' AND element_type='tax_{$t}'");
+                    foreach($target_languages as $lang){
+                        $lang = $lang[0]; // get the languag name (string)
+                        $not_translated = false;
+                        if($trid != $wpdb->get_var("
+                                SELECT trid FROM {$wpdb->prefix}icl_translations t 
+                                JOIN {$wpdb->prefix}icl_languages l ON l.code = t.language_code WHERE l.english_name='{$lang}' AND trid='{$trid}'
+                        ")){
+                            $not_translated = true;
+                            break;
+                        }                
+                    }
+                    if($not_translated){
+                        $taxonomies_to_translate[$t][$trm->term_taxonomy_id] = $trm->name; 
+                    }            
+                }      
+            }
+        }
+    /*}*/
+    $timestamp = date('Y-m-d H:i:s');
+    
+    $md5 = icl_translation_calculate_md5($post_id);    
+    
+    
+    // send off to each language/s as a separate cms_request
+    // $target_languages is an array of groups of languages to be sent together
+    // if there is no previous cms_request it will be something like:
+    // array(array("Spanish), array("German"), array("French"))
+    // if there was a previous cms_request then some languages may be grouped.
+    // array(array("Spanish", "German"), array("French"))
+        
+    
+    foreach($target_languages as $target){
+        $target_for_server = apply_filters('icl_server_languages_map', $target); //filter some language names to match the names on the server
+        $data = array(
+            'url'=>htmlentities($post_url), 
+            'contents'=>array(
+                'title' => array(
+                    'translate'=>1,
+                    'data'=>base64_encode($post->post_title),
+                    'format'=>'base64'
+                ),
+                'body' => array(
+                    'translate'=>1,
+                    'data'=>base64_encode($post->post_content),
+                    'format'=>'base64'
+                ),
+                'original_id' => array(
+                    'translate'=>0,
+                    'data'=>$post_id
+                ),
+                            
+            ),
+            'target_languages' => $target_for_server
+        );
+
+        include_once ICL_PLUGIN_PATH . '/inc/plugins-texts-functions.php';
+        
+        $custom_fields = icl_get_posts_translatable_fields();
+        foreach($custom_fields as $id => $cf){
+            if ($cf->translate) {
+                $custom_fields_value = get_post_meta($post_id, $cf->attribute_name, true);
+                if ($custom_fields_value != '') {
+                    $data['contents']['field-'.$id] = array(
+                        'translate' => 1,
+                        'data' => base64_encode($custom_fields_value),
+                        'format' => 'base64',
+                    );
+                    $data['contents']['field-'.$id.'-name'] = array(
+                        'translate' => 0,
+                        'data' => $cf->attribute_name,
+                    );
+                    $data['contents']['field-'.$id.'-type'] = array(
+                        'translate' => 0,
+                        'data' => $cf->attribute_type,
+                    );
+                    $data['contents']['field-'.$id.'-plugin'] = array(
+                        'translate' => 0,
+                        'data' => $cf->plugin_name,
+                    );
+                }
+            }
+        }
+                
+                
+
+        
+        /*if($post_type=='post'){*/
+            if(is_array($categories_to_translate)){
+                $data['contents']['categories'] = array(
+                        'translate'=>1,
+                        'data'=> implode(',', array_map(create_function('$e', 'return \'"\'.base64_encode($e).\'"\';'), $categories_to_translate)),
+                        'format'=>'csv_base64'
+                    );    
+                $data['contents']['category_ids'] = array(
+                        'translate'=>0,
+                        'data'=> implode(',', array_keys($categories_to_translate)),
+                        'format'=>''
+                    );                
+            }
+            
+            if(is_array($tags_to_translate)){
+                $data['contents']['tags'] = array(
+                        'translate'=>1,
+                        'data'=> implode(',', array_map(create_function('$e', 'return \'"\'.base64_encode($e).\'"\';'), $tags_to_translate)),
+                        'format'=>'csv_base64'
+                    );                
+                $data['contents']['tag_ids'] = array(
+                        'translate'=>0,
+                        'data'=> implode(',', array_keys($tags_to_translate)),
+                        'format'=>''
+                    );                            
+            }
+            
+            if(is_array($taxonomies_to_translate)){
+                foreach($taxonomies_to_translate as $k=>$v){
+                    $data['contents'][$k] = array(
+                            'translate'=>1,
+                            'data'=> implode(',', array_map(create_function('$e', 'return \'"\'.base64_encode($e).\'"\';'), $v)),
+                            'format'=>'csv_base64'
+                        );                
+                    $data['contents'][$k.'_ids'] = array(
+                            'translate'=>0,
+                            'data'=> implode(',', array_keys($v)),
+                            'format'=>''
+                        );                            
+                }
+            }
+        /*}*/
+        $previous_rid_for_target = $previous_rid[$target[0]];
+        if ($previous_rid_for_target == null){
+            $previous_rid_for_target = false;
+        }
+        
+        if($post->post_status=='publish'){
+            $permlink = $post_url;
+        }else{
+            $permlink = false;
+        }
+        
+        $note = get_post_meta($post_id, '_icl_translator_note', true);
+        
+        $xml = $iclq->build_cms_request_xml($data, $orig_lang_for_server, $previous_rid_for_target);
+        
+        $res = $iclq->send_request($xml, $post->post_title, $target_for_server, $orig_lang_for_server, $permlink, $note);
+        
+        if($res > 0){
+            $wpdb->insert($wpdb->prefix.'icl_content_status', array('rid'=>$res, 'nid'=>$post_id, 'timestamp'=>$timestamp, 'md5'=>$md5)); //insert rid   
+    
+            foreach($target as $targ_lang){
+                $wpdb->insert($wpdb->prefix.'icl_core_status', array('rid'=>$res,
+                                                                     'origin'=>$sitepress->get_language_code($orig_lang),
+                                                                     'target'=>$sitepress->get_language_code($targ_lang),
+                                                                     'status'=>CMS_REQUEST_WAITING_FOR_PROJECT_CREATION));
+            }
+            
+            $ret = $res;  
+                  
+        }else{
+            // sending to translation failed
+            $ret = 0;
+            
+        }
+    }
+    return $ret;
+    
+}
+
+function icl_translation_save_md5($p){
+    global $wpdb;
+    if($_POST['autosave']) return;
+    if($_POST['action']=='post-quickpress-publish'){
+        $post_id = $p;            
+        $_POST['post_type']='post';
+    }elseif(isset($_POST['post_ID'])){
+        $post_id = $_POST['post_ID'];
+    }else{
+        $post_id = $p;
+    }
+    
+    $md5 = icl_translation_calculate_md5($post_id);    
+    
+    if($wpdb->get_var("SELECT nid FROM {$wpdb->prefix}icl_node WHERE nid='{$post_id}'")){
+        $wpdb->update($wpdb->prefix . 'icl_node', array('md5'=>$md5), array('nid'=>$post_id));
+    }else{
+        $wpdb->insert($wpdb->prefix . 'icl_node', array('nid'=>$post_id, 'md5'=>$md5));
+    }
+
+    // minor edit - update the current cms_request md5
+    if($_POST['icl_minor_edit']){
+        if($wpdb->get_var("SELECT nid FROM {$wpdb->prefix}icl_content_status WHERE nid='{$p}'")){
+            $wpdb->update($wpdb->prefix . 'icl_content_status', array('md5'=>$md5), array('nid'=>$p));
+        }
+    } 
+    
+}
+
+function icl_translation_calculate_md5($post_id){
+    $post = get_post($post_id);
+    $post_type = $post->post_type;
+    
+    if($post_type=='post'){
+        foreach(wp_get_object_terms($post_id, 'post_tag') as $tag){
+            $post_tags[] = $tag->name;
+        }
+        if(is_array($post_tags)){
+            sort($post_tags, SORT_STRING);
+        }        
+        foreach(wp_get_object_terms($post_id, 'category') as $cat){
+            $post_categories[] = $cat->name;
+        }    
+        if(is_array($post_categories)){
+            sort($post_categories, SORT_STRING);
+        }
+        
+        global $wpdb, $sitepress_settings;
+        // get custom taxonomies
+        $taxonomies = $wpdb->get_col("
+            SELECT DISTINCT tx.taxonomy 
+            FROM {$wpdb->term_taxonomy} tx JOIN {$wpdb->term_relationships} tr ON tx.term_taxonomy_id = tr.term_taxonomy_id
+            WHERE tr.object_id = {$post_id}
+        ");
+        sort($taxonomies, SORT_STRING);
+        foreach($taxonomies as $t){
+            if($sitepress_settings['taxonomies_sync_option'][$t] == 1){
+                $taxs = array();
+                foreach(wp_get_object_terms($post_id, $t) as $trm){
+                    $taxs[] = $trm->name;
+                }
+                if($taxs){
+                    sort($taxs,SORT_STRING);
+                    $all_taxs[] = '['.$t.']:'.join(',',$taxs);
+                }
+            }
+        }
+    }
+    
+    include_once ICL_PLUGIN_PATH . '/inc/plugins-texts-functions.php';
+
+    $custom_fields = icl_get_posts_translatable_fields();
+    $custom_fields_values = array();
+    foreach($custom_fields as $cf){
+        if ($cf->translate) {
+            $custom_fields_values[] = get_post_meta($post_id, $cf->attribute_name, true);
+        }
+    }
+    
+    $md5str =         
+        $post->post_title . ';' . 
+        $post->post_content . ';' . 
+        join(',',(array)$post_tags).';' . 
+        join(',',(array)$post_categories) . ';' . 
+        join(',', $custom_fields_values);
+    if(!empty($all_taxs)){
+        $md5str .= ';' . join(';', $all_taxs);
+    }    
+    $md5 = md5($md5str);
+                
+    return $md5;
+}
+
+function icl_translation_get_documents($lang,
+                                       $tstatus,
+                                       $status=false,
+                                       $type=false,
+                                       $limit = 20,
+                                       $from_date = false,
+                                       $to_date = false){
+    global $wpdb, $wp_query, $sitepress;
+    
+    $where = "WHERE 1";
+    $order = "ORDER BY p.post_date DESC";
+    
+    if(isset($_GET['post_id'])){ // this overrides the others
+        $where .= " AND p.ID=" . (int)$_GET['post_id'];  
+    }else{
+        if ($tstatus == 'in_progress' or $tstatus == 'complete') {
+            $where .= " AND (c.rid IS NOT NULL)";
+            $order = "ORDER BY c.rid DESC";
+        }
+        
+        $t_el_types = array_keys($sitepress->get_translatable_documents());
+        if($type){
+            $where .= " AND p.post_type = '{$type}'";
+            $icl_el_type_where = " AND t.element_type = 'post_{$type}'";
+        }else{
+            $where .= " AND p.post_type IN ('".join("','",$t_el_types)."')";
+            foreach($t_el_types as $k=>$v){
+                $t_el_types[$k] = 'post_' . $v;
+            }
+            $icl_el_type_where .= " AND t.element_type IN ('".join("','",$t_el_types)."')";
+        }  
+        
+        if($status){
+            $where .= " AND p.post_status = '{$status}'";
+        }        
+        
+        $where .= " AND t.language_code='{$lang}'";
+        
+        if($from_date and $to_date){
+            $where .= " AND p.post_date > '{$from_date}' AND p.post_date < '{$to_date}'";
+        }
+    }
+        
+    if(!isset($_GET['paged'])) $_GET['paged'] = 1;
+    $offset = ($_GET['paged']-1)*$limit;
+    
+    // exclude trashed posts
+    $where .= " AND p.post_status <> 'trash'";
+    
+    $sql = "
+        SELECT SQL_CALC_FOUND_ROWS p.ID as post_id, p.post_title, p.post_type, p.post_status, post_content, 
+            c.rid,
+            cs.target,
+            n.md5<>c.md5 AS updated
+        FROM {$wpdb->posts} p
+            JOIN {$wpdb->prefix}icl_translations t ON p.ID = t.element_id {$icl_el_type_where}
+            LEFT JOIN {$wpdb->prefix}icl_node n ON p.ID = n.nid
+            LEFT JOIN {$wpdb->prefix}icl_content_status c ON c.nid=p.ID
+            LEFT JOIN {$wpdb->prefix}icl_core_status cs ON cs.rid = c.rid
+        {$where}                
+        {$order} 
+    ";    
+    $results = $wpdb->get_results($sql);    
+        
+    // only use the latest rids for each language.
+    
+    $latested_per_language = array();
+    foreach($results as $r){
+        $key = $r->post_id.$r->target;
+        if(isset($latested_per_language[$key])) {
+            // keep the latest rid for a language
+            if ($r->rid > $latested_per_language[$key]->rid) {
+                $latested_per_language[$key] = $r;
+            }
+        } else {
+            $latested_per_language[$key] = $r;
+        }
+    }
+    
+    $results = $latested_per_language;
+    
+    $pids = array(0);
+    foreach($results as $r){
+        $pids[] = $r->post_id;
+    }
+    
+    $sql = "
+        SELECT p.ID as post_id, COUNT(r.rid) AS inprogress_count 
+        FROM {$wpdb->posts} p
+            JOIN {$wpdb->prefix}icl_translations t ON p.ID = t.element_id {$icl_el_type_where}
+            LEFT JOIN {$wpdb->prefix}icl_content_status c ON c.nid=p.ID
+            LEFT JOIN {$wpdb->prefix}icl_core_status r ON c.rid = r.rid
+            WHERE p.ID IN (".join(',', $pids).")
+            AND status <> ".CMS_TARGET_LANGUAGE_DONE."
+            GROUP BY (r.rid) HAVING inprogress_count > 0 
+        ORDER BY p.post_date DESC 
+    ";
+    
+    $in_progress = $wpdb->get_results($sql);
+
+    $count = 0;
+    $nodes_processed = array();
+    foreach($results as $r){
+        $post_ok = false;
+        if ($tstatus == 'in_progress'){
+            foreach ($in_progress as $item){
+                if($item->post_id == $r->post_id){
+                    $post_ok = true;
+                    break;
+                }
+            }
+        } else if ($tstatus == 'complete'){
+            $found = false;
+            foreach ($in_progress as $item){
+                if($item->post_id == $r->post_id){
+                    $found = true;
+                    break;
+                }
+            }
+            if (!$found) {
+                $post_ok = true;
+            }
+    
+        } else if ($tstatus == 'not'){
+            // check for posts that haven't been translated before or are updated.
+            if($r->rid == null or $r->updated){
+                $post_ok = true;
+            }
+        } else {
+            $post_ok = true;
+        }
+        if($post_ok){
+            if ($count >= $offset and $count < $offset + $limit){
+                if (isset($documents[$r->post_id])){
+                    $documents[$r->post_id]->rid[] = $r->rid;
+                    if (!isset($documents[$r->post_id]->updated)) {
+                        $documents[$r->post_id]->updated = $r->updated;
+                    } else {
+                        if(!$documents[$r->post_id]->updated) { // make sure we don't reset the updated status
+                            $documents[$r->post_id]->updated = $r->updated;
+                        }
+                    }
+                } else {
+                    $documents[$r->post_id] = $r;
+                    $documents[$r->post_id]->rid = array($r->rid);
+                }
+            }
+            if (!in_array($r->post_id, $nodes_processed)){
+                $count++;
+                $nodes_processed[] = $r->post_id;
+            }
+        }
+    }
+    
+    foreach($in_progress as $v){
+        if(isset($documents[$v->post_id])){
+            $documents[$v->post_id]->in_progress = $v->inprogress_count;
+        }
+    }
+
+    $wp_query->found_posts = $count;
+    $wp_query->query_vars['posts_per_page'] = $limit;
+    $wp_query->max_num_pages = ceil($wp_query->found_posts/$limit);
+      
+    return $documents;
+    
+}
+
+function icl_translation_delete_post($post_id){
+    global $wpdb;
+    $wpdb->query("DELETE FROM {$wpdb->prefix}icl_node WHERE nid=".$post_id);
+    $rid = $wpdb->get_var("SELECT rid FROM {$wpdb->prefix}icl_content_status WHERE nid=".$post_id);
+    $wpdb->query("DELETE FROM {$wpdb->prefix}icl_content_status WHERE nid=".$post_id);
+    if($rid){
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_core_status WHERE rid=".$rid);
+    }
+}
+
+function icl_add_post_translation($trid, $translation, $lang, $rid){
+    global $wpdb, $sitepress_settings, $sitepress, $wp_taxonomies;
+    $taxonomies = array_diff(array_keys((array)$wp_taxonomies), array('post_tag','category'));
+    $lang_code = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE english_name='".$wpdb->escape($lang)."'");
+    if(!$lang_code){        
+        return false;
+    }
+
+    $original_post_details = $wpdb->get_row("
+        SELECT p.post_author, p.post_type, p.post_status, p.comment_status, p.ping_status, p.post_parent, p.menu_order, t.language_code
+        FROM {$wpdb->prefix}icl_translations t 
+        JOIN {$wpdb->posts} p ON t.element_id = p.ID AND CONCAT('post_',p.post_type) = t.element_type
+        WHERE trid='{$trid}' AND p.ID = '{$translation['original_id']}'
+    ");
+    
+    //is the original post a sticky post?
+    remove_filter('option_sticky_posts', array($sitepress,'option_sticky_posts')); // remove filter used to get language relevant stickies. get them all
+    $sticky_posts = get_option('sticky_posts');
+    $is_original_sticky = $original_post_details->post_type=='post' && in_array($translation['original_id'], $sticky_posts);
+    
+    _icl_content_fix_image_paths_in_body($translation);
+    _icl_content_fix_relative_link_paths_in_body($translation);
+    _icl_content_decode_shortcodes($translation);
+        
+    /*if($original_post_details->post_type=='post'){*/
+        
+        // deal with tags
+        if(isset($translation['tags'])){
+            $translated_tags = $translation['tags'];   
+            $translated_tag_ids = explode(',', $translation['tag_ids']);
+            foreach($translated_tags as $k=>$v){
+                $tag_trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$translated_tag_ids[$k]}' AND element_type='tax_post_tag'");
+                
+                // before adding the new term make sure that another tag with the same name doesn't exist. If it does append @lang                                        
+                // same term name exists in a different language?
+                $term_different_language = $wpdb->get_var("
+                    SELECT tm.term_id 
+                    FROM {$wpdb->term_taxonomy} tx
+                        JOIN {$wpdb->terms} tm ON tx.term_id = tm.term_id 
+                        JOIN {$wpdb->prefix}icl_translations tr ON tx.term_taxonomy_id = tr.element_id
+                    WHERE tm.name='".$wpdb->escape($v)."' AND tr.element_type LIKE 'tax\\_%' AND tr.language_code <> '{$lang_code}'
+                ");
+                if($term_different_language){
+                    $v .= ' @'.$lang_code;    
+                }
+                
+                //tag exists? (in the current language)
+                $term_taxonomy_id = $wpdb->get_var("
+                    SELECT term_taxonomy_id 
+                    FROM {$wpdb->term_taxonomy} tx 
+                        JOIN {$wpdb->terms} tm ON tx.term_id = tm.term_id 
+                        JOIN {$wpdb->prefix}icl_translations tr ON tx.term_taxonomy_id = tr.element_id AND tr.element_type = 'tax_post_tag' AND tr.language_code = '{$lang_code}'
+                    WHERE tm.name='".$wpdb->escape($v)."' OR tm.name='".$wpdb->escape($v)." @{$lang_code}' AND taxonomy='post_tag'");
+                if(!$term_taxonomy_id){                                          
+                    $tmp = wp_insert_term($v, 'post_tag');
+                    if(isset($tmp['term_taxonomy_id'])){                
+                        $wpdb->update($wpdb->prefix.'icl_translations', 
+                            array('language_code'=>$lang_code, 'trid'=>$tag_trid, 'source_language_code'=>$original_post_details->language_code), 
+                            array('element_type'=>'tax_post_tag','element_id'=>$tmp['term_taxonomy_id']));
+                    }
+                }else{
+                    
+                    // check whether we have an orphan translation - the same trid and language but a different element id                                                     
+                    $__translation_id = $wpdb->get_var("
+                        SELECT translation_id FROM {$wpdb->prefix}icl_translations 
+                        WHERE   trid = '{$tag_trid}' 
+                            AND language_code = '{$lang_code}' 
+                            AND element_id <> '{$term_taxonomy_id}'
+                    ");
+                    if($__translation_id){
+                        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id={$__translation_id}");    
+                    }
+                    
+                    $tag_translation_id = $wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE element_id={$term_taxonomy_id} AND element_type='tax_post_tag'");                        
+                    if($tag_translation_id){
+                        $wpdb->update($wpdb->prefix.'icl_translations', 
+                            array('language_code'=>$lang_code, 'trid'=>$tag_trid, 'source_language_code'=>$original_post_details->language_code), 
+                            array('element_type'=>'tax_post_tag','translation_id'=>$tag_translation_id));                
+                    }else{                                                
+                        $wpdb->insert($wpdb->prefix.'icl_translations', 
+                            array('language_code'=>$lang_code, 'trid'=>$tag_trid, 'element_type'=>'tax_post_tag', 'element_id'=>$term_taxonomy_id, 'source_language_code'=>$original_post_details->language_code));                                
+                    }
+                }        
+            }
+        }
+        
+        foreach(wp_get_object_terms($translation['original_id'] , 'post_tag') as $t){
+            $original_post_tags[] = $t->term_taxonomy_id;
+        }    
+        if($original_post_tags){
+            $tag_trids = $wpdb->get_col("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='tax_post_tag' AND element_id IN (".join(',',$original_post_tags).")");    
+            $tag_tr_tts = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='tax_post_tag' AND language_code='{$lang_code}' AND trid IN (".join(',',$tag_trids).")");    
+            $translated_tags = $wpdb->get_col("SELECT t.name FROM {$wpdb->terms} t JOIN {$wpdb->term_taxonomy} tx ON tx.term_id = t.term_id WHERE tx.taxonomy='post_tag' AND tx.term_taxonomy_id IN (".join(',',$tag_tr_tts).")");
+        }
+                                          
+        // deal with categories
+        if(isset($translation['categories'])){
+            $translated_cats = $translation['categories'];   
+            $translated_cats_ids = explode(',', $translation['category_ids']);    
+            foreach($translated_cats as $k=>$v){
+                $cat_trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$translated_cats_ids[$k]}' AND element_type='tax_category'");
+                
+                // before adding the new term make sure that another tag with the same name doesn't exist. If it does append @lang                                        
+                // same term name exists in a different language?
+                $term_different_language = $wpdb->get_var("
+                    SELECT tm.term_id 
+                    FROM {$wpdb->term_taxonomy} tx
+                        JOIN {$wpdb->terms} tm ON tx.term_id = tm.term_id 
+                        JOIN {$wpdb->prefix}icl_translations tr ON tx.term_taxonomy_id = tr.element_id
+                    WHERE tm.name='".$wpdb->escape($v)."' AND tr.element_type LIKE 'tax\\_%' AND tr.language_code <> '{$lang_code}'
+                ");
+                if($term_different_language){
+                    $v .= ' @'.$lang_code;    
+                }
+                
+                //cat exists?
+                $term_taxonomy_id = $wpdb->get_var("
+                    SELECT term_taxonomy_id 
+                    FROM {$wpdb->term_taxonomy} tx 
+                        JOIN {$wpdb->terms} tm ON tx.term_id = tm.term_id 
+                        JOIN {$wpdb->prefix}icl_translations tr ON tx.term_taxonomy_id = tr.element_id AND tr.element_type = 'tax_category' AND tr.language_code = '{$lang_code}'
+                        WHERE tm.name='".$wpdb->escape($v)."' OR tm.name='".$wpdb->escape($v)." @{$lang_code}' AND taxonomy='category'");
+                if(!$term_taxonomy_id){  
+                    // get original category parent id
+                    $original_category_parent_id = $wpdb->get_var("SELECT parent FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id=".$translated_cats_ids[$k]);
+                    if($original_category_parent_id){                        
+                        $original_category_parent_id = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE taxonomy='category' AND term_id=".$original_category_parent_id);
+                        $category_parent_trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='tax_category' AND element_id=".$original_category_parent_id); 
+                        // get id of the translated category parent
+                        $category_parent_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE language_code='{$lang_code}' AND trid=".$category_parent_trid); 
+                        if($category_parent_id){
+                            $category_parent_id = $wpdb->get_var("SELECT term_id FROM {$wpdb->term_taxonomy} WHERE taxonomy='category' AND term_taxonomy_id=".$category_parent_id);
+                        }                        
+                    }else{
+                        $category_parent_id = 0;
+                    }
+                    $tmp = wp_insert_term($v, 'category', array('parent'=>$category_parent_id));
+                    if(isset($tmp['term_taxonomy_id'])){                
+                        $wpdb->update($wpdb->prefix.'icl_translations', 
+                            array('language_code'=>$lang_code, 'trid'=>$cat_trid, 'source_language_code'=>$original_post_details->language_code), 
+                            array('element_type'=>'tax_category','element_id'=>$tmp['term_taxonomy_id']));
+                    }
+                }else{
+                    
+                    // check whether we have an orphan translation - the same trid and language but a different element id                                                     
+                    $__translation_id = $wpdb->get_var("
+                        SELECT translation_id FROM {$wpdb->prefix}icl_translations 
+                        WHERE   trid = '{$cat_trid}' 
+                            AND language_code = '{$lang_code}' 
+                            AND element_id <> '{$term_taxonomy_id}'
+                    ");
+                    if($__translation_id){
+                        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id={$__translation_id}");    
+                    }
+                    
+                    $cat_translation_id = $wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE element_id={$term_taxonomy_id} AND element_type='tax_category'");    
+                    if($cat_translation_id){
+                        $wpdb->update($wpdb->prefix.'icl_translations', 
+                            array('language_code'=>$lang_code, 'trid'=>$cat_trid, 'source_language_code'=>$original_post_details->language_code), 
+                            array('element_type'=>'tax_category','translation_id'=>$cat_translation_id));                
+                    }else{
+                        $wpdb->insert($wpdb->prefix.'icl_translations', 
+                            array('language_code'=>$lang_code, 'trid'=>$cat_trid, 'element_type'=>'tax_category', 'element_id'=>$term_taxonomy_id, 'source_language_code'=>$original_post_details->language_code));                                
+                    }            
+                }        
+            }
+        }
+        $original_post_cats = array();    
+        foreach(wp_get_object_terms($translation['original_id'] , 'category') as $t){
+            $original_post_cats[] = $t->term_taxonomy_id;
+        }
+        if($original_post_cats){    
+            $cat_trids = $wpdb->get_col("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='tax_category' AND element_id IN (".join(',',$original_post_cats).")");
+            $cat_tr_tts = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='tax_category' AND language_code='{$lang_code}' AND trid IN (".join(',',$cat_trids).")");
+            $translated_cats_ids = $wpdb->get_col("SELECT t.term_id FROM {$wpdb->terms} t JOIN {$wpdb->term_taxonomy} tx ON tx.term_id = t.term_id WHERE tx.taxonomy='category' AND tx.term_taxonomy_id IN (".join(',',$cat_tr_tts).")");
+        }   
+                
+        // deal with custom taxonomies        
+        if(!empty($sitepress_settings['taxonomies_sync_option'])){
+            foreach($sitepress_settings['taxonomies_sync_option'] as $taxonomy=>$value){
+                if($value == 1 && isset($translation[$taxonomy])){
+                    $translated_taxs[$taxonomy] = $translation[$taxonomy];   
+                    $translated_tax_ids[$taxonomy] = explode(',', $translation[$taxonomy.'_ids']);
+                    foreach($translated_taxs[$taxonomy] as $k=>$v){
+                        $tax_trid = $wpdb->get_var("
+                                SELECT trid FROM {$wpdb->prefix}icl_translations 
+                                WHERE element_id='{$translated_tax_ids[$taxonomy][$k]}' AND element_type='tax_{$taxonomy}'");
+                        // before adding the new term make sure that another tag with the same name doesn't exist. If it does append @lang
+                        // same term name exists in a different language?                        
+                        $term_different_language = $wpdb->get_var("
+                                SELECT tm.term_id 
+                                FROM {$wpdb->term_taxonomy} tx
+                                    JOIN {$wpdb->terms} tm ON tx.term_id = tm.term_id 
+                                    JOIN {$wpdb->prefix}icl_translations tr ON tx.term_taxonomy_id = tr.element_id
+                                WHERE tm.name='".$wpdb->escape($v)."' AND tr.element_type LIKE 'tax\\_%' AND tr.language_code <> '{$lang_code}'
+                            ");
+                        if($term_different_language){
+                            $v .= ' @'.$lang_code;    
+                        }
+                            
+                        //tax exists? (in the current language)
+                        $term_taxonomy_id = $wpdb->get_var("
+                                SELECT term_taxonomy_id 
+                                FROM {$wpdb->term_taxonomy} tx 
+                                    JOIN {$wpdb->terms} tm ON tx.term_id = tm.term_id 
+                                    JOIN {$wpdb->prefix}icl_translations tr ON tx.term_taxonomy_id = tr.element_id 
+                                        AND tr.element_type = 'tax_{$taxonomy}' AND tr.language_code = '{$lang_code}'
+                                WHERE tm.name='".$wpdb->escape($v)."' OR tm.name='".$wpdb->escape($v)." @{$lang_code}' AND taxonomy='{$taxonomy}'");
+                        if(!$term_taxonomy_id){                                          
+                            $tmp = wp_insert_term($v, $taxonomy);                            
+                            if(isset($tmp['term_taxonomy_id'])){                
+                                $wpdb->update($wpdb->prefix.'icl_translations', 
+                                        array('language_code'=>$lang_code, 'trid'=>$tax_trid, 'source_language_code'=>$original_post_details->language_code), 
+                                        array('element_type'=>'tax_'.$taxonomy,'element_id'=>$tmp['term_taxonomy_id']));
+                                }
+                            }else{
+                                // check whether we have an orphan translation - the same trid and language but a different element id                             
+                                $__translation_id = $wpdb->get_var("
+                                    SELECT translation_id FROM {$wpdb->prefix}icl_translations 
+                                    WHERE   trid = '{$tax_trid}' 
+                                        AND language_code = '{$lang_code}' 
+                                        AND element_id <> '{$term_taxonomy_id}'
+                                ");
+                                if($__translation_id){
+                                    $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id={$__translation_id}");    
+                                }
+                                
+                                $tax_translation_id = $wpdb->get_var("
+                                    SELECT translation_id FROM {$wpdb->prefix}icl_translations 
+                                    WHERE element_id={$term_taxonomy_id} AND element_type='tax_{$taxonomy}'");                        
+                                if($tax_translation_id){
+                                    $wpdb->update($wpdb->prefix.'icl_translations', 
+                                        array('language_code'=>$lang_code, 'trid'=>$tax_trid, 'source_language_code'=>$original_post_details->language_code), 
+                                        array('element_type'=>'tax_'.$taxonomy,'translation_id'=>$tax_translation_id));                
+                                }else{                                                
+                                    $wpdb->insert($wpdb->prefix.'icl_translations', 
+                                        array('language_code'=>$lang_code, 'trid'=>$tax_trid, 'element_type'=>'tax_'.$taxonomy, 
+                                            'element_id'=>$term_taxonomy_id, 'source_language_code'=>$original_post_details->language_code));                                                      }
+                            }        
+                        }
+                    }
+                    
+                    foreach(wp_get_object_terms($translation['original_id'] , $taxonomy) as $t){
+                        $original_post_taxs[$taxonomy][] = $t->term_taxonomy_id;
+                    }    
+                    if($original_post_taxs[$taxonomy]){
+                        $tax_trids = $wpdb->get_col("SELECT trid FROM {$wpdb->prefix}icl_translations 
+                            WHERE element_type='tax_{$taxonomy}' AND element_id IN (".join(',',$original_post_taxs[$taxonomy]).")");    
+                        $tax_tr_tts = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations 
+                            WHERE element_type='tax_{$taxonomy}' AND language_code='{$lang_code}' AND trid IN (".join(',',$tax_trids).")");    
+                        if($wp_taxonomies[$taxonomy]->hierarchical){
+                            $translated_tax_ids[$taxonomy] = $wpdb->get_col("SELECT term_id FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id IN (".join(',',$tax_tr_tts).")");
+                        }else{
+                            $translated_taxs[$taxonomy] = $wpdb->get_col("SELECT t.name FROM {$wpdb->terms} t 
+                                JOIN {$wpdb->term_taxonomy} tx ON tx.term_id = t.term_id 
+                                WHERE tx.taxonomy='{$taxonomy}' AND tx.term_taxonomy_id IN (".join(',',$tax_tr_tts).")");                    
+                        }
+                }
+            }
+        }
+                     
+    /*}elseif($original_post_details->post_type=='page'){*/
+    
+        // handle the page parent and set it to the translated parent if we have one.
+        if($original_post_details->post_parent){
+            $post_parent_trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$original_post_details->post_type}' AND element_id='{$original_post_details->post_parent}'");
+            if($post_parent_trid){
+                $parent_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$original_post_details->post_type}' AND trid='{$post_parent_trid}' AND language_code='{$lang_code}'");
+            }            
+        }
+                
+    /*}*/
+    
+    // determine post id based on trid
+    $post_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$original_post_details->post_type}' AND trid='{$trid}' AND language_code='{$lang_code}'");
+    if($post_id){
+        // see if the post really exists - make sure it wasn't deleted while the plugin was 
+        if(!$wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE ID={$post_id}")){
+            $is_update = false;
+            $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$original_post_details->post_type}' AND element_id={$post_id}");
+        }else{
+            $is_update = true;
+            $postarr['ID'] = $_POST['post_ID'] = $post_id;
+        }
+    }else{
+        $is_update = false;
+    } 
+    
+    $postarr['post_title'] = $translation['title'];
+    $postarr['post_content'] = $translation['body'];
+    if(is_array($translated_tags)){
+        $postarr['tags_input'] = join(',',(array)$translated_tags);
+    }
+    if(is_array($translated_taxs)){
+        foreach($translated_taxs as $taxonomy=>$values){
+            $postarr['tax_input'][$taxonomy] = join(',',(array)$values);
+        }
+    } 
+    if(is_array($translated_tax_ids)){
+        $postarr['tax_input'] = $translated_tax_ids;
+    }           
+    if(isset($translated_cats_ids)){
+        $postarr['post_category'] = $translated_cats_ids;        
+    }
+    $postarr['post_author'] = $original_post_details->post_author;  
+    $postarr['post_type'] = $original_post_details->post_type;
+    if($sitepress_settings['sync_comment_status']){
+        $postarr['comment_status'] = $original_post_details->comment_status;
+    }
+    if($sitepress_settings['sync_ping_status']){
+        $postarr['ping_status'] = $original_post_details->ping_status;
+    }
+    if($sitepress_settings['sync_page_ordering']){
+        $postarr['menu_order'] = $original_post_details->menu_order;
+    }
+    if($sitepress_settings['sync_private_flag'] && $original_post_details->post_status=='private'){    
+        $postarr['post_status'] = 'private';
+    }
+    if(!$is_update){
+        $postarr['post_status'] = !$sitepress_settings['translated_document_status'] ? 'draft' : $original_post_details->post_status;
+    } else {
+        // set post_status to the current post status.
+        $postarr['post_status'] = $wpdb->get_var("SELECT post_status FROM {$wpdb->prefix}posts WHERE ID = ".$post_id);
+    }
+    
+    if(isset($parent_id) && $sitepress_settings['sync_page_parent']){
+        $_POST['post_parent'] = $postarr['post_parent'] = $parent_id;  
+        $_POST['parent_id'] = $postarr['parent_id'] = $parent_id;  
+    }
+    
+    $_POST['trid'] = $trid;
+    $_POST['lang'] = $lang_code;
+    $_POST['skip_sitepress_actions'] = true;
+    
+    
+    global $wp_rewrite;
+    if(!isset($wp_rewrite)) $wp_rewrite = new WP_Rewrite();
+        
+    kses_remove_filters();
+    $new_post_id = wp_insert_post($postarr);    
+    
+    // associate custom taxonomies by hand
+    if ( !empty($postarr['tax_input']) ) {
+        foreach ( $postarr['tax_input'] as $taxonomy => $tags ) {
+            wp_set_post_terms( $new_post_id, $tags, $taxonomy );
+        }
+    }
+    
+    
+    // set stickiness
+    if($is_original_sticky && $sitepress_settings['sync_sticky_flag']){
+        stick_post($new_post_id);
+    }else{
+        if($original_post_details->post_type=='post' && $is_update){
+            unstick_post($new_post_id); //just in case - if this is an update and the original post stckiness has changed since the post was sent to translation
+        }
+    }
+    
+    //sync plugins texts
+    require_once ICL_PLUGIN_PATH . '/inc/plugins-texts-functions.php';
+    $fields_2_sync = icl_get_posts_translatable_fields(true);
+    foreach($fields_2_sync as $f2s){
+        update_post_meta($new_post_id, $f2s->attribute_name, get_post_meta($translation['original_id'],$f2s->attribute_name,true));
+    }
+    
+    // set specific custom fields
+    $copied_custom_fields = array('_top_nav_excluded', '_cms_nav_minihome');    
+    foreach($copied_custom_fields as $ccf){
+        $val = get_post_meta($translation['original_id'], $ccf, true);
+        update_post_meta($new_post_id, $ccf, $val);
+    }    
+    
+    // sync _wp_page_template
+    if($sitepress_settings['sync_page_template']){
+        $_wp_page_template = get_post_meta($translation['original_id'], '_wp_page_template', true);
+        update_post_meta($new_post_id, '_wp_page_template', $_wp_page_template);
+    }
+    
+    
+    // set the translated custom fields if we have some.
+    $custom_fields = icl_get_posts_translatable_fields();
+    foreach($custom_fields as $id => $cf){
+        if ($cf->translate) {
+            $field_name = $cf->attribute_name;
+            // find it in the translation
+            foreach($translation as $name => $data) {
+                if ($data == $field_name) {
+                    if (preg_match("/field-(.*?)-name/", $name, $match)) {
+                        $field_id = $match[1];
+                        $field_translation = $translation['field-'.$field_id];
+                        $field_type = $translation['field-'.$field_id.'-type'];
+                        if ($field_type == 'custom_field') {
+                            $field_translation = str_replace ( '&#0A;', "\n", $field_translation );
+                            
+                            // always decode html entities  eg decode &amp; to &
+                            $field_translation = html_entity_decode($field_translation);
+                            update_post_meta($new_post_id, $field_name, $field_translation);
+                        }
+                    }
+                }
+            }
+        }
+    }
+    
+    if(!$new_post_id){
+        return false;
+    }
+        
+    // record trids
+    if(!$is_update){
+        $wpdb->insert($wpdb->prefix.'icl_translations', 
+            array(
+                'element_type'=>'post_' . $original_post_details->post_type, 
+                'element_id'=>$new_post_id, 
+                'trid'=> $trid, 
+                'language_code'=>$lang_code, 
+                'source_language_code'=>$original_post_details->language_code
+                )
+        );
+    }
+    
+    update_post_meta($new_post_id, '_icl_translation', 1);
+    
+    _icl_content_fix_links_to_translated_content($new_post_id, $lang_code, 'post');
+    icl_st_fix_links_in_strings($new_post_id);
+    
+    // update translation status
+    $wpdb->update($wpdb->prefix.'icl_core_status', array('status'=>CMS_TARGET_LANGUAGE_DONE), array('rid'=>$rid, 'target'=>$sitepress->get_language_code($lang)));
+    // 
+    
+    // Now try to fix links in other translated content that may link to this post.
+    $sql = "SELECT
+                nid
+            FROM
+                {$wpdb->prefix}icl_node n
+            JOIN
+                {$wpdb->prefix}icl_translations t
+            ON
+                n.nid = t.element_id
+            WHERE
+                n.links_fixed = 0 AND t.element_type = 'post_{$original_post_details->post_type}' AND t.language_code = '{$lang_code}'";
+                
+    $needs_fixing = $wpdb->get_results($sql);
+    foreach($needs_fixing as $id){
+        if($id->nid != $new_post_id){ // fix all except the new_post_id. We have already done this.
+            _icl_content_fix_links_to_translated_content($id->nid, $lang_code, 'post');
+        }
+    }
+    
+    // if this is a parent page then make sure it's children point to this.
+    icl_fix_translated_children($translation['original_id'], $new_post_id, $lang_code);
+    
+    return true;
+}
+
+function icl_fix_translated_children($original_id, $translated_id, $lang_code){
+    global $wpdb, $sitepress;
+
+    // get the children of of original page.
+    $original_children = $wpdb->get_col("SELECT ID FROM {$wpdb->posts} WHERE post_parent = {$original_id} AND post_type = 'page'");
+    foreach($original_children as $original_child){
+        // See if the child has a translation.
+        $trid = $sitepress->get_element_trid($original_child);
+        if($trid){
+            $translations = $sitepress->get_element_translations($trid);
+            if (isset($translations[$lang_code])){
+                $current_parent = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID = ".$translations[$lang_code]->element_id);
+                if ($current_parent != $translated_id){
+                    $wpdb->query("UPDATE {$wpdb->posts} SET post_parent={$translated_id} WHERE ID = ".$translations[$lang_code]->element_id);
+                }
+            }
+        }
+    }
+}
+
+function icl_fix_translated_parent($original_id, $translated_id, $lang_code){
+    global $wpdb, $sitepress;
+
+    $original_parent = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID = {$original_id} AND post_type = 'page'");
+    if ($original_parent){
+        $trid = $sitepress->get_element_trid($original_parent);
+        if($trid){
+            $translations = $sitepress->get_element_translations($trid);
+            if (isset($translations[$lang_code])){
+                $current_parent = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID = ".$translated_id);
+                if ($current_parent != $translations[$lang_code]->element_id){
+                    $wpdb->query("UPDATE {$wpdb->posts} SET post_parent={$translations[$lang_code]->element_id} WHERE ID = ".$translated_id);
+                }
+            }
+        }
+    }
+}
+
+function icl_process_translated_document($request_id, $language){
+    global $sitepress_settings, $wpdb, $sitepress;
+    $ret = false;
+    $iclq = new ICanLocalizeQuery($sitepress_settings['site_id'], $sitepress_settings['access_key']);       
+    $post_type = $wpdb->get_var($wpdb->prepare("SELECT p.post_type FROM {$wpdb->posts} p JOIN {$wpdb->prefix}icl_content_status c ON p.ID = c.nid WHERE c.rid=%d", $request_id));
+    $trid = $wpdb->get_var($wpdb->prepare("
+        SELECT trid 
+        FROM {$wpdb->prefix}icl_translations t 
+        JOIN {$wpdb->prefix}icl_content_status c ON t.element_id = c.nid AND t.element_type='post_{$post_type}' AND c.rid=%d",$request_id));
+    $translation = $iclq->cms_do_download($request_id, $language);                           
+    
+    if($translation){
+        if (icl_is_string_translation($translation)){
+            $ret = icl_translation_add_string_translation($trid, $translation, apply_filters('icl_server_languages_map', $language, true), $request_id); //the 'reverse' language filter
+        } else {
+            $ret = icl_add_post_translation($trid, $translation, apply_filters('icl_server_languages_map', $language, true), $request_id); //the 'reverse' language filter
+            if ($ret){
+                $translations = $sitepress->get_element_translations($trid, 'post_'.$post_type);
+                $iclq->report_back_permalink($request_id, $language, $translations[$sitepress->get_language_code($language)]);
+            }
+        }
+        if($ret){
+            $iclq->cms_update_request_status($request_id, CMS_TARGET_LANGUAGE_DONE, $language);
+        } 
+        
+    }        
+    // if there aren't any other unfullfilled requests send a global 'done'               
+    if(0 == $wpdb->get_var("SELECT COUNT(rid) FROM {$wpdb->prefix}icl_core_status WHERE rid='{$request_id}' AND status < ".CMS_TARGET_LANGUAGE_DONE)){
+        $iclq->cms_update_request_status($request_id, CMS_REQUEST_DONE, false);
+    }
+    return $ret;
+}
+
+function icl_poll_for_translations(){
+    global $wpdb, $sitepress_settings, $sitepress, $wp_rewrite;
+    if(!isset($wp_rewrite)){
+        require_once ABSPATH . WPINC . '/rewrite.php'; 
+        $wp_rewrite = new WP_Rewrite();
+    }
+    
+    $iclq = new ICanLocalizeQuery($sitepress_settings['site_id'], $sitepress_settings['access_key']);
+    $pending_requests = $iclq->cms_requests();
+    foreach($pending_requests as $pr){
+        
+        $cms_request_xml = $iclq->cms_request_translations($pr['id']);
+        if(isset($cms_request_xml['cms_target_languages']['cms_target_language'])){
+            $target_languages = $cms_request_xml['cms_target_languages']['cms_target_language'];
+            // HACK: If we only have one target language then the $target_languages
+            // array no longer has an array of languages but returns just the target language
+            if(!isset($target_languages[0])){
+                $target = $target_languages;
+                $target_languages = array(0 => $target);
+            }
+            foreach($target_languages as $target){
+                if(isset($target['attr'])){
+                    $status = $target['attr']['status'];
+                    $language = apply_filters('icl_server_languages_map', $target['attr']['language'], true); //reverse filter
+                    $lang_code = $sitepress->get_language_code($language);
+                    $wpdb->query("UPDATE {$wpdb->prefix}icl_core_status SET status='{$status}' WHERE rid='{$pr['id']}' AND target='{$lang_code}'");
+                    
+                }
+                
+            }
+        }
+        
+        // process translated languages
+        $tr_details = $wpdb->get_col("SELECT target FROM {$wpdb->prefix}icl_core_status WHERE rid=".$pr['id']." AND status = ".CMS_TARGET_LANGUAGE_TRANSLATED);
+        foreach($tr_details as $language){
+            $language = $sitepress->get_language_details($language);
+            icl_process_translated_document($pr['id'],$language['english_name']);
+        }
+    }    
+}
+
+function _icl_translation_error_handler($errno, $errstr, $errfile, $errline){
+    
+    switch($errno){
+        case E_ERROR:
+        case E_USER_ERROR:
+            throw new Exception ($errstr . ' [code:e' . $errno . '] in '. $errfile . ':' . $errline);
+        case E_WARNING:
+        case E_USER_WARNING:
+            return true;                
+            //throw new Exception ($errstr . ' [code:w' . $errno . '] in '. $errfile . ':' . $errline);    
+        default: 
+            return true;
+    }
+    
+}
+
+function _icl_throw_exception_for_mysql_errors(){
+    global $EZSQL_ERROR, $sitepress_settings;
+    if($sitepress_settings['troubleshooting_options']['raise_mysql_errors']){
+        if(!empty($EZSQL_ERROR)){
+            foreach($EZSQL_ERROR as $k=>$v){
+                $mysql_errors[] = $v['error_str'] . ' [' . $v['query'] . ']';
+            }
+            throw new Exception(join("\n", $mysql_errors));
+        }    
+    }
+}
+
+function icl_add_custom_xmlrpc_methods($methods){
+    $icl_methods['icanlocalize.set_translation_status'] = 'setTranslationStatus';
+    $icl_methods['icanlocalize.list_posts'] = '_icl_list_posts';
+    $icl_methods['icanlocalize.translate_post'] = '_icl_remote_control_translate_post';
+    $icl_methods['icanlocalize.test_xmlrpc'] = '_icl_test_xmlrpc';
+    $icl_methods['icanlocalize.cancel_translation'] = '_icl_xmlrpc_cancel_translation';
+    $icl_methods['icanlocalize.notify_comment_translation'] =  '_icl_xmlrpc_add_message_translation';    
+    
+    $methods = $methods + $icl_methods;    
+    if(defined('XMLRPC_REQUEST') && XMLRPC_REQUEST){
+        preg_match('#<methodName>([^<]+)</methodName>#i', $GLOBALS['HTTP_RAW_POST_DATA'], $matches);
+        $method = $matches[1];            
+        if(in_array($method, array_keys($icl_methods))){  
+            error_reporting(E_NONE);
+            //ini_set('display_errors', '0');        
+            $old_error_handler = set_error_handler("_icl_translation_error_handler",E_ERROR|E_USER_ERROR);
+        }
+    }
+    return $methods;
+}
+
+/*
+ * The XML-RPC method to notify about translation status changes
+ *
+ * 0 â?? Unknown error
+ * 1 â?? success
+ * 2 â?? Signature failed
+ * 3 â?? website_id incorrect
+ * 4 â?? cms_request_id not found
+ */
+function _icl_xmlrpc_cancel_translation($args) {
+    global $sitepress_settings, $sitepress, $wpdb;        
+    $signature = $args[0];
+    $website_id = $args[1];
+    $request_id = $args[2];
+    $accesskey = $sitepress_settings['access_key'];
+    $checksum = $accesskey . $website_id . $request_id;
+    if (sha1 ( $checksum ) == $signature) {
+        $wid = $sitepress_settings['site_id'];
+        if ($website_id == $wid) {
+    
+            $cms_request_info = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}icl_core_status WHERE rid={$request_id}");
+            
+            if (empty($cms_request_info)){
+                return 4; // cms_request not found
+            }
+      
+            // cms_request have been found.
+            // delete it
+    
+            $wpdb->query("DELETE FROM {$wpdb->prefix}icl_core_status WHERE rid={$request_id}");
+            $wpdb->query("DELETE FROM {$wpdb->prefix}icl_content_status WHERE rid={$request_id}");
+            return 1;
+        } else {
+            return 3; // Website id incorrect
+        }
+    } else {
+        return 2; // Signature failed
+    }
+  
+    return 0; // Should not have got here - unknown error.
+}
+
+function _icl_test_xmlrpc($args){
+    return true;
+}
+
+/*
+ * 0 â?? Unknown error
+ * 1 â?? success
+ * 2 â?? Signature failed
+ * 3 â?? website_id incorrect
+ * 4 â?? cms_request_id not found
+ * 5 - icl translation not enabled
+ * 6 - unknown error processing translation
+ */
+
+function setTranslationStatus($args){
+        global $sitepress_settings, $sitepress, $wpdb;        
+        try{
+            
+            $signature   = $args[0];
+            $site_id     = $args[1];
+            $request_id  = $args[2];
+            $original_language    = $args[3];
+            $language    = $args[4];
+            $status      = $args[5];
+            $message     = $args[6];  
+
+            if ($site_id != $sitepress_settings['site_id']) {
+                return 3;                                                             
+            }
+            
+            //check signature
+            $signature_chk = sha1($sitepress_settings['access_key'].$sitepress_settings['site_id'].$request_id.$language.$status.$message);
+            if($signature_chk != $signature){
+                return 2;
+            }
+            
+            $lang_code = $sitepress->get_language_code(apply_filters('icl_server_languages_map', $language, true));//the 'reverse' language filter 
+            $cms_request_info = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}icl_core_status WHERE rid={$request_id} AND target='{$lang_code}'");
+            
+            if (empty($cms_request_info)){
+                _icl_throw_exception_for_mysql_errors();
+                return 4;
+            }
+                    
+            if (icl_process_translated_document($request_id, $language) === true){
+                _icl_throw_exception_for_mysql_errors();
+                return 1;
+            } else {
+                _icl_throw_exception_for_mysql_errors();                
+                return 6;
+            }
+            
+        }catch(Exception $e) {
+            return $e->getMessage();
+        }
+
+} 
+
+function icl_get_post_translation_status($post_id){
+    global $wpdb;
+    
+    $sql = "
+        SELECT  c.rid, r.target, r.status, n.md5<>c.md5 AS updated
+        FROM 
+            {$wpdb->prefix}icl_content_status c
+            JOIN {$wpdb->prefix}icl_core_status r ON c.rid = r.rid
+            LEFT JOIN {$wpdb->prefix}icl_node n ON c.nid = n.nid
+        WHERE c.nid = {$post_id}
+    ";
+    $status = $wpdb->get_results($sql);
+    return $status;
+}
+
+function icl_display_post_translation_status($post_id, &$post_translation_statuses, $short = false){
+    global $wpdb, $sitepress;                    
+    $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID={$post_id}");                                                                                           
+    $trid = $sitepress->get_element_trid($post_id, 'post_' . $post_type);
+    $translations = $sitepress->get_element_translations($trid, 'post_' . $post_type);
+    
+    foreach($translations as $t){
+        if($t->original){
+            $original_updated = $wpdb->get_var("SELECT c.md5<>n.md5 FROM {$wpdb->prefix}icl_content_status c JOIN {$wpdb->prefix}icl_node n ON c.nid=n.nid WHERE c.nid=".$t->element_id);    
+            break;
+        }
+    }    
+    
+    $active_languages = $sitepress->get_active_languages();    
+    $_tr_status = icl_get_post_translation_status($post_id);    
+    foreach((array)$_tr_status as $st){
+        $tr_status[$st->target] = $st->status;
+    }
+    
+    $tr_info = $wpdb->get_row("
+        SELECT lt.name, t.language_code, t.source_language_code, t.trid 
+        FROM {$wpdb->prefix}icl_translations t LEFT JOIN {$wpdb->prefix}icl_languages_translations lt ON t.source_language_code=lt.language_code
+        WHERE t.element_type='post_{$post_type}' AND t.element_id={$post_id} AND lt.display_language_code = '".$sitepress->get_default_language()."'"
+        );    
+    // is ICL translation ?
+    $icl_translation = get_post_meta($post_id,'_icl_translation',true); 
+    if($icl_translation && $tr_info->name){
+        echo '<div style="text-align:center;clear:both;">'. sprintf(__('Translated from %s','sitepress'),$tr_info->name).'</div>';
+        echo '<div style="text-align:center;clear:both;color:#888;">'. __('This translation is maintained by ICanLocalize. Edits that you do will be overwritten when the translator does an update.','sitepress').'</div>';        
+    }
+    
+    foreach($active_languages as $lang){
+        if(isset($translations[$lang['code']])){
+            $id = $translations[$lang['code']]->element_id;
+
+            if($translations[$lang['code']]->original && $original_updated && $id == $post_id){
+                echo '
+                    <div id="noupdate_but" style="display:none;">
+                    <input type="button" class="button" value="'.__('Translations don\'t need updating', 'sitepress').'" title="'.__('The translations for this document are OK.', 'sitepress').'"/>
+                    <span id="noupdate_but_wm" style="display:none">'.__('Translations for this document appear to be out-of-date. Are you sure they don\'t need to be updated?','sitepress').'</span>                
+                    </div>';
+            }
+            
+            
+            if($original_updated && !$translations[$lang['code']]->original){
+                if ($short) {
+                    $post_translation_statuses[$lang['code']] = __('Needs update','sitepress');
+                } else {
+                    $post_translation_statuses[$lang['code']] = __('Translation needs update','sitepress');
+                }
+            }elseif($translations[$lang['code']]->original){
+                if ($short) {
+                    $post_translation_statuses[$lang['code']] = __('Original','sitepress');
+                } else {
+                    $post_translation_statuses[$lang['code']] = __('Original document','sitepress');
+                }
+            }else{
+                switch($tr_status[$lang['code']]){
+                    case CMS_REQUEST_WAITING_FOR_PROJECT_CREATION: 
+                        if ($short) {
+                            $post_translation_statuses[$lang['code']] = __('In progress','sitepress');
+                        } else {
+                            $post_translation_statuses[$lang['code']] = __('Translation in progress','sitepress');
+                        }
+                        break;
+                    case CMS_TARGET_LANGUAGE_DONE: 
+                        if ($short) {
+                            $post_translation_statuses[$lang['code']] = __('Complete','sitepress');
+                        } else {
+                            $post_translation_statuses[$lang['code']] = __('Translation complete','sitepress');
+                        }
+                        break;
+                    case CMS_REQUEST_FAILED: 
+                        $post_translation_statuses[$lang['code']] = __('Request failed','sitepress');
+                        break;
+                    default: 
+                        $post_translation_statuses[$lang['code']] = __('Not translated','sitepress');
+                }
+            }                        
+        }else{
+            $post_translation_statuses[$lang['code']] = __('Not translated','sitepress');
+        }
+    }
+}
+
+function icl_decode_translation_status_id($status){
+    switch($status){
+        case CMS_TARGET_LANGUAGE_CREATED: $st = __('Waiting for translator','sitepress');break;
+        case CMS_TARGET_LANGUAGE_ASSIGNED: $st = __('In progress','sitepress');break; 
+        case CMS_TARGET_LANGUAGE_TRANSLATED: $st = __('Translation received','sitepress');break;
+        case CMS_TARGET_LANGUAGE_DONE: $st = __('Translation complete','sitepress');break;
+        case CMS_REQUEST_FAILED: $st = __('Request failed','sitepress');break;
+        default: $st = __('Not translated','sitepress');
+    }
+    
+    return $st;
+}
+
+/*
+ Decode any html encoding in shortcodes
+ http://codex.wordpress.org/Shortcode_API
+*/
+ 
+function _icl_content_decode_shortcodes(&$translation) {
+    $body = $translation['body'];
+    
+    global $shortcode_tags;
+    if (isset($shortcode_tags)) {
+        $tagnames = array_keys($shortcode_tags);
+    $tagregexp = join( '|', array_map('preg_quote', $tagnames) );
+
+        $regexp = '/\[('.$tagregexp.')\b(.*?)\]/s';
+        
+        if (preg_match_all($regexp, $body, $matches, PREG_SET_ORDER)) {
+            foreach ($matches as $match) {
+                $body = str_replace($match[0], '[' . $match[1] . html_entity_decode($match[2]) . ']', $body);
+            }
+        }
+        
+    }
+    
+    $translation['body'] = $body;
+}
+
+function _icl_content_fix_image_paths_in_body(&$translation) {
+    $body = $translation['body'];
+    $image_paths = _icl_content_get_image_paths($body);
+    
+    $source_path = post_permalink($translation['original_id']);
+  
+    foreach($image_paths as $path) {
+  
+        $src_path = resolve_url($source_path, $path[2]);
+        if ($src_path != $path[2]) {
+            $search = $path[1] . $path[2] . $path[1];
+            $replace = $path[1] . $src_path . $path[1];
+            $new_link = str_replace($search, $replace, $path[0]);
+      
+            $body = str_replace($path[0], $new_link, $body);
+      
+          
+        }
+    
+    }
+    $translation['body'] = $body;
+}
+
+/**
+ * get the paths to images in the body of the content
+ */
+
+function _icl_content_get_image_paths($body) {
+
+  $regexp_links = array(
+                      "/<img\ssrc\s*=\s*([\"\']??)([^\"]*)\".*>/siU",
+                      "/&lt;script\ssrc\s*=\s*([\"\']??)([^\"]*)\".*>/siU",
+                      "/<embed\ssrc\s*=\s*([\"\']??)([^\"]*)\".*>/siU",
+                      );
+
+  $links = array();
+
+  foreach($regexp_links as $regexp) {
+    if (preg_match_all($regexp, $body, $matches, PREG_SET_ORDER)) {
+      foreach ($matches as $match) {
+        $links[] = $match;
+      }
+    }
+  }
+
+  return $links;
+}
+
+
+/**
+ * Resolve a URL relative to a base path. This happens to work with POSIX
+ * filenames as well. This is based on RFC 2396 section 5.2.
+ */
+function resolve_url($base, $url) {
+        if (!strlen($base)) return $url;
+        // Step 2
+        if (!strlen($url)) return $base;
+        // Step 3
+        if (preg_match('!^[a-z]+:!i', $url)) return $url;
+        $base = parse_url($base);
+        if ($url{0} == "#") {
+                // Step 2 (fragment)
+                $base['fragment'] = substr($url, 1);
+                return unparse_url($base);
+        }
+        unset($base['fragment']);
+        unset($base['query']);
+        if (substr($url, 0, 2) == "//") {
+                // Step 4
+                return unparse_url(array(
+                        'scheme'=>$base['scheme'],
+                        'path'=>$url,
+                ));
+        } else if ($url{0} == "/") {
+                // Step 5
+                $base['path'] = $url;
+        } else {
+                // Step 6
+                $path = explode('/', $base['path']);
+                $url_path = explode('/', $url);
+                // Step 6a: drop file from base
+                array_pop($path);
+                // Step 6b, 6c, 6e: append url while removing "." and ".." from
+                // the directory portion
+                $end = array_pop($url_path);
+                foreach ($url_path as $segment) {
+                        if ($segment == '.') {
+                                // skip
+                        } else if ($segment == '..' && $path && $path[sizeof($path)-1] != '..') {
+                                array_pop($path);
+                        } else {
+                                $path[] = $segment;
+                        }
+                }
+                // Step 6d, 6f: remove "." and ".." from file portion
+                if ($end == '.') {
+                        $path[] = '';
+                } else if ($end == '..' && $path && $path[sizeof($path)-1] != '..') {
+                        $path[sizeof($path)-1] = '';
+                } else {
+                        $path[] = $end;
+                }
+                // Step 6h
+                $base['path'] = join('/', $path);
+
+        }
+        // Step 7
+        return unparse_url($base);
+}
+
+function unparse_url($parsed)
+    {
+    if (! is_array($parsed)) return false;
+    $uri = isset($parsed['scheme']) ? $parsed['scheme'].':'.((strtolower($parsed['scheme']) == 'mailto') ? '':'//'): '';
+    $uri .= isset($parsed['user']) ? $parsed['user'].($parsed['pass']? ':'.$parsed['pass']:'').'@':'';
+    $uri .= isset($parsed['host']) ? $parsed['host'] : '';
+    $uri .= isset($parsed['port']) ? ':'.$parsed['port'] : '';
+    if(isset($parsed['path']))
+        {
+        $uri .= (substr($parsed['path'],0,1) == '/')?$parsed['path']:'/'.$parsed['path'];
+        }
+    $uri .= isset($parsed['query']) ? '?'.$parsed['query'] : '';
+    $uri .= isset($parsed['fragment']) ? '#'.$parsed['fragment'] : '';
+    return $uri;
+    }
+
+function _icl_content_fix_relative_link_paths_in_body(&$translation) {
+    $body = $translation['body'];
+    $link_paths = _icl_content_get_link_paths($body);
+
+    $source_path = post_permalink($translation['original_id']);
+
+    foreach($link_paths as $path) {
+      
+        if ($path[2][0] != "#"){
+            $src_path = resolve_url($source_path, $path[2]);
+            if ($src_path != $path[2]) {
+                $search = $path[1] . $path[2] . $path[1];
+                $replace = $path[1] . $src_path . $path[1];
+                $new_link = str_replace($search, $replace, $path[0]);
+                
+                $body = str_replace($path[0], $new_link, $body);
+            }
+        }      
+    }
+    $translation['body'] = $body;
+}
+
+function _icl_content_get_link_paths($body) {
+  
+    $regexp_links = array(
+                        "/<a.*?href\s*=\s*([\"\']??)([^\"]*)[\"\']>(.*?)<\/a>/i",
+                        );
+    
+    $links = array();
+    
+    foreach($regexp_links as $regexp) {
+        if (preg_match_all($regexp, $body, $matches, PREG_SET_ORDER)) {
+            foreach ($matches as $match) {
+              $links[] = $match;
+            }
+        }
+    }
+    
+    return $links;
+}
+
+function _icl_content_make_links_sticky($element_id, $element_type='post', $string_translation = true) {
+    if($element_type=='post'){
+        // only need to do it if sticky links is not enabled.
+        // create the object
+        if(!$sitepress_settings['modules']['absolute-links']['enabled']){
+            include_once ICL_PLUGIN_PATH . '/modules/absolute-links/absolute-links-plugin.php';
+            $icl_abs_links = new AbsoluteLinksPlugin();
+            $icl_abs_links->process_post($element_id);
+        }
+    }elseif($element_type=='string'){                
+        if(!class_exists('AbsoluteLinksPlugin')){
+            include_once ICL_PLUGIN_PATH . '/modules/absolute-links/absolute-links-plugin.php';
+        }
+        $icl_abs_links = new AbsoluteLinksPlugin(true); // call just for strings
+        $icl_abs_links->process_string($element_id, $string_translation);                                        
+    }
+}
+
+function _icl_content_fix_links_to_translated_content($element_id, $target_lang_code, $element_type='post'){
+    global $wpdb, $sitepress, $sitepress_settings, $wp_taxonomies;
+    _icl_content_make_links_sticky($element_id, $element_type);
+    
+    
+    if($element_type == 'post'){
+        $post = $wpdb->get_row("SELECT * FROM {$wpdb->posts} WHERE ID={$element_id}");
+        $body = $post->post_content;        
+    }elseif($element_type=='string'){
+        $body = $wpdb->get_var("SELECT value FROM {$wpdb->prefix}icl_string_translations WHERE id=" . $element_id);
+    }    
+    $new_body = $body;
+
+    $base_url_parts = parse_url(get_option('home'));
+    
+    $links = _icl_content_get_link_paths($body);
+    $all_links_fixed = 1;
+    
+    foreach($links as $link) {
+        $path = $link[2];
+        $url_parts = parse_url($path);
+        
+        if((!isset($url_parts['host']) or $base_url_parts['host'] == $url_parts['host']) and
+                (!isset($url_parts['scheme']) or $base_url_parts['scheme'] == $url_parts['scheme']) and
+                isset($url_parts['query'])) {
+            $query_parts = split('&', $url_parts['query']);
+            foreach($query_parts as $query){
+                
+                // find p=id or cat=id or tag=id queries
+                
+                list($key, $value) = split('=', $query);
+                $translations = NULL;
+                $is_tax = false;
+                if($key == 'p'){
+                    $kind = 'post_' . $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$value}'");
+                } else if($key == "page_id"){
+                    $kind = 'post_page';
+                } else if($key == 'cat' || $key == 'cat_ID'){
+                    $kind = 'tax_category';
+                } else if($key == 'tag'){
+                    $is_tax = true;
+                    $taxonomy = 'post_tag';
+                    $kind = 'tax_' . $taxonomy;                    
+                    $value = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->terms} t 
+                        JOIN {$wpdb->term_taxonomy} x ON t.term_id = x.term_id WHERE x.taxonomy='{$taxonomy}' AND t.slug='{$value}'");
+                } else {
+                    $found = false;
+                    foreach($wp_taxonomies as $ktax => $tax){
+                        if($tax->query_var && $key == $tax->query_var){
+                            $found = true;
+                            $is_tax = true;
+                            $kind = 'tax_' . $ktax;                            
+                            $value = $wpdb->get_var("
+                                SELECT term_taxonomy_id FROM {$wpdb->terms} t 
+                                    JOIN {$wpdb->term_taxonomy} x ON t.term_id = x.term_id WHERE x.taxonomy='{$ktax}' AND t.slug='{$value}'");                            
+                        }                        
+                    }
+                    if(!$found) continue;
+                }
+
+                $link_id = (int)$value;  
+                
+                if (!$link_id || $sitepress->get_language_for_element($link_id, $kind) == $target_lang_code) {
+                    // link already points to the target language.
+                    continue;
+                }
+
+                $trid = $sitepress->get_element_trid($link_id, $kind);
+                if(!$trid){
+                    continue;
+                }
+                if($trid !== NULL){
+                    $translations = $sitepress->get_element_translations($trid, $kind);
+                }
+                if(isset($translations[$target_lang_code])){
+                    
+                    // use the new translated id in the link path.
+                    
+                    $translated_id = $translations[$target_lang_code]->element_id;
+                    
+                    if($is_tax){
+                        $translated_id = $wpdb->get_var("SELECT slug FROM {$wpdb->terms} t JOIN {$wpdb->term_taxonomy} x ON t.term_id=x.term_id WHERE x.term_taxonomy_id=$translated_id");    
+                    }
+
+                    $replace = $key . '=' . $translated_id;
+                    
+                    $new_link = str_replace($query, $replace, $link[0]);
+                    
+                    // replace the link in the body.
+                    
+                    $new_body = str_replace($link[0], $new_link, $new_body);
+                } else {
+                    // translation not found for this.
+                    $all_links_fixed = 0;
+                }
+            }
+        }
+        
+        
+    }
+    
+    if ($new_body != $body){
+
+        // unless sticky links is on - we convert default links to permalinks
+        /*
+        if(!$sitepress_settings['modules']['absolute-links']['enabled']){
+            // create the object
+            include_once ICL_PLUGIN_PATH . '/modules/absolute-links/absolute-links-plugin.php';
+            $icl_abs_links = new AbsoluteLinksPlugin();
+            
+            $new_body = $icl_abs_links->show_permalinks($new_body);
+        }        
+        */
+        
+        // save changes to the database.
+        if($element_type == 'post'){        
+            $wpdb->update($wpdb->posts, array('post_content'=>$new_body), array('ID'=>$element_id));
+            
+            // save the all links fixed status to the database.
+            $wpdb->query("UPDATE {$wpdb->prefix}icl_node SET links_fixed='{$all_links_fixed}' WHERE nid={$element_id}");
+            
+        }elseif($element_type == 'string'){
+            $wpdb->update($wpdb->prefix.'icl_string_translations', array('value'=>$new_body), array('id'=>$element_id));
+        }
+                
+    }
+    
+}
+
+$asian_languages = array('ja', 'ko', 'zh-hans', 'zh-hant', 'mn', 'ne', 'hi', 'pa', 'ta', 'th');
+
+function icl_estimate_word_count($data, $lang_code) {
+    global $asian_languages;
+    
+    $words = 0;
+    if(isset($data->post_title)){
+        if(in_array($lang_code, $asian_languages)){
+            $words += strlen(strip_tags($data->post_title)) / 6;
+        } else {
+            $words += count(explode(' ',$data->post_title));
+        }
+    }
+    if(isset($data->post_content)){
+        if(in_array($lang_code, $asian_languages)){
+            $words += strlen(strip_tags($data->post_content)) / 6;
+        } else {
+            $words += count(explode(' ',strip_tags($data->post_content)));
+        }
+    }
+    
+    return (int)$words;
+}
+
+function icl_estimate_custom_field_word_count($post_id, $lang_code) {
+    global $asian_languages;
+
+    include_once ICL_PLUGIN_PATH . '/inc/plugins-texts-functions.php';
+    
+    $words = 0;
+    $custom_fields = icl_get_posts_translatable_fields();
+    foreach($custom_fields as $id => $cf){
+        if ($cf->translate) {
+            $custom_fields_value = get_post_meta($post_id, $cf->attribute_name, true);
+            if ($custom_fields_value != "") {
+                if(in_array($lang_code, $asian_languages)){
+                    $words += strlen(strip_tags($custom_fields_value)) / 6;
+                } else {
+                    $words += count(explode(' ',strip_tags($custom_fields_value)));
+                }
+            }
+        }
+    }
+    
+    return (int)$words;
+}
+
+function _icl_list_posts($args){
+    global $wpdb, $sitepress, $sitepress_settings;
+    try{
+        
+        $signature   = $args[0];
+        $site_id     = $args[1];
+            
+        $from_date   = date('Y-m-d H:i:s',$args[2]);
+        $to_date     = date('Y-m-d H:i:s',$args[3]);
+        $lang        = $args[4];
+        $tstatus     = $args[5];
+        $status      = $args[6];
+        $type        = $args[7];
+        
+        if ( !$sitepress_settings['remote_management']) {
+            return array('err_code'=>1, 'err_str'=>__('remote translation management not enabled','sitepress'));
+        }    
+        if ( !$sitepress->get_icl_translation_enabled() ) {
+            return array('err_code'=>3, 'err_str'=> __( 'Professional translation not enabled.','sitepress'));
+        }
+
+        //check signature
+        $signature_chk = sha1($sitepress_settings['access_key'].$sitepress_settings['site_id'].$lang.$tstatus);
+        if($signature_chk != $signature){
+            return array('err_code'=>2, 'err_str'=>__('signature incorrect','sitepress'));
+        }
+        
+        if ($site_id != $sitepress_settings['site_id']) {
+            return array('err_code'=>4, 'err_str'=>__('website id is not correct','sitepress'));
+        }
+    
+    
+        $documents = icl_translation_get_documents($sitepress->get_language_code($lang), $tstatus, $status, $type, 100000, $from_date, $to_date);
+        foreach($documents as $id=>$data){
+            $_cats = (array)get_the_terms($id,'category');
+            $cats = array();
+            foreach($_cats as $cv){
+                $cats[] = $cv->name;
+            }
+            $documents[$id]->categories = $cats;
+            $documents[$id]->words = icl_estimate_word_count($data, $sitepress->get_language_code($lang));
+            $documents[$id]->words += icl_estimate_custom_field_word_count($id, $sitepress->get_language_code($lang));
+            unset($documents[$id]->post_content);
+            unset($documents[$id]->post_title);
+        }
+    }catch(Exception $e){
+        return array('err_code'=>$e->getCode(), 'err_str'=>$e->getMessage().'[' . $e->getFile() . ':' . $e->getLine() . ']');
+    }
+    return array('err_code'=>0, 'posts'=>$documents);
+
+}
+
+function _icl_remote_control_translate_post($args){
+    global $wpdb, $sitepress, $sitepress_settings;
+    $signature   = $args[0];
+    $site_id     = $args[1];
+    
+    $post_id     = $args[2];
+    $from_lang   = $args[3];
+    $langs       = $args[4];
+
+    if ( !$sitepress_settings['remote_management']) {
+        return array('err_code'=>1, 'err_str'=>__('remote translation management not enabled','sitepress'));
+    }    
+    if ( !$sitepress->get_icl_translation_enabled() ){
+        return array('err_code'=>3, 'err_str'=> __( 'Professional translation not enabled.','sitepress'));
+    }
+
+    //check signature
+    $signature_chk = sha1($sitepress_settings['access_key'].$sitepress_settings['site_id'].$post_id.$from_lang.implode(',', $langs));
+    if($signature_chk != $signature){
+        return array('err_code'=>2, 'err_str'=>__('signature incorrect','sitepress'));
+    }
+    
+    if ($site_id != $sitepress_settings['site_id']) {
+        return array('err_code'=>4, 'err_str'=>__('website id is not correct','sitepress'));
+    }
+
+    // check post_id
+    $post = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE ID={$post_id}");
+    if(!$post){
+        return array('err_code'=>5, 'err_str'=>__('post id not found','sitepress'));
+    }
+    $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID={$post_id}");
+    
+    $element = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}icl_translations WHERE element_id={$post_id} and element_type='post_{$post_type}'");
+    if(!$element){
+        return array('err_code'=>6, 'err_str'=>__('post id not managed in icl_translations','sitepress'));
+    }
+
+    $from_code = $sitepress->get_language_code($from_lang);
+    if($element->language_code != $from_code){
+        return array('err_code'=>7, 'err_str'=>sprintf(__('Source language is not correct. %s != %s', 'sitepress'), $from_code, $element->language_code));
+    }
+    
+    $language_pairs = $sitepress_settings['language_pairs'];
+    
+    foreach($langs as $to_lang){
+        if(!isset($language_pairs[$from_code][$sitepress->get_language_code($to_lang)])){
+            return array('err_code'=>8, 'err_str'=>sprintf(__('Destination language %s is not correct','sitepress'), $to_lang));
+        }
+    }
+    
+    // everything is ok.
+    
+    
+    
+    try{
+        $result = icl_translation_send_post($post_id, $langs, $post_type);
+    }catch(Exception $e){
+        return array('err_code'=>$e->getCode(), 'err_str'=>$e->getMessage().'[' . $e->getFile() . ':' . $e->getLine() . ']');
+    }        
+    
+    if ($result != false){
+        return array('err_code'=>0, 'rid'=>$result);
+    } else {
+        return array('err_code'=>9, 'err_str'=>_('failed to send for translation','sitepress'));
+    }
+    
+    
+}
+
+function sh_post_submitbox_start(){
+    global $post;
+    if(!$post->ID){
+        return;
+    }
+    $status = icl_get_post_translation_status($post->ID);    
+    if(empty($status)){
+        return;
+    }
+    
+    $show_box = 'display:none';
+    
+    foreach($status as $k=>$v){
+        if($v->status && !$v->updated){
+            $show_box = '';
+            break;
+        }
+    }
+    
+    
+    echo '<p id="icl_minor_change_box" style="float:left;padding:0;margin:3px;'.$show_box.'">';
+    echo '<label><input type="checkbox" name="icl_minor_edit" value="1" style="min-width:15px;" />&nbsp;';
+    echo __('Minor edit - don\'t update translation','sitepress');        
+    echo '</label>';
+    echo '<br clear="all" />';
+    echo '</p>';
+}
+
+function icl_server_languages_map($language_name, $server2plugin = false){    
+    if(is_array($language_name)){
+        return array_map('icl_server_languages_map', $language_name);
+    }
+    $map = array(
+        'Norwegian Bokmål' => 'Norwegian',
+        'Portuguese, Brazil' => 'Portuguese',
+        'Portuguese, Portugal' => 'Portugal Portuguese'
+    );
+    if($server2plugin){
+        $map = array_flip($map);
+    }    
+    if(isset($map[$language_name])){
+        return $map[$language_name];
+    }else{
+        return $language_name;    
+    }
+}
+
+// String translation using ICanLocalize server
+
+/*
+ $string_ids - an array of string ids to be sent for translation
+ $target_languages - an array of languages to translate to
+*/
+function icl_translation_send_strings($string_ids, $target_languages) {
+    // send to each language
+    foreach($target_languages as $target){
+        _icl_translation_send_strings($string_ids, $target);
+    }
+}
+
+function _icl_translation_send_strings($string_ids, $target) {
+    global $wpdb, $sitepress, $sitepress_settings;
+    
+    if(!$sitepress_settings['st']['strings_language']) $sitepress_settings['st']['strings_language'] = $sitepress->get_default_language();
+    
+    $target_code = $sitepress->get_language_code($target);
+    
+    // get all the untranslated strings
+    $untranslated = array();
+    foreach($string_ids as $st_id) {
+        $status = $wpdb->get_var("SELECT status FROM {$wpdb->prefix}icl_string_translations WHERE string_id={$st_id} and language='{$target_code}'");
+        if ($status != ICL_STRING_TRANSLATION_COMPLETE) {
+            $untranslated[] = $st_id;
+        }
+    }
+    
+    if (sizeof($untranslated) >  0) {
+        // Something to translate.
+        $target_for_server = apply_filters('icl_server_languages_map', array($target)); //filter some language names to match the names on the server
+        $data = array(
+            'url'=>'', 
+            'target_languages' => $target_for_server,
+        );
+        $string_values = array();
+        foreach($untranslated as $st_id) {
+            
+            $string = $wpdb->get_row("SELECT context, name, value FROM {$wpdb->prefix}icl_strings WHERE id={$st_id}");
+            $string_values[$st_id] = $string->value;
+            $data['contents']['string-'.$st_id.'-context'] = array(
+                    'translate'=>0,
+                    'data'=>base64_encode(htmlspecialchars($string->context)),
+                    'format'=>'base64',
+            );
+            $data['contents']['string-'.$st_id.'-name'] = array(
+                    'translate'=>0,
+                    'data'=>base64_encode(htmlspecialchars($string->name)),
+                    'format'=>'base64',
+            );
+            $data['contents']['string-'.$st_id.'-value'] = array(
+                    'translate'=>1,
+                    'data'=>base64_encode(htmlspecialchars($string->value)),
+                    'format'=>'base64',
+            );
+            
+        }
+
+        $iclq = new ICanLocalizeQuery($sitepress_settings['site_id'], $sitepress_settings['access_key']);
+        
+        $orig_lang = $sitepress->get_language_details($sitepress_settings['st']['strings_language']);
+        $orig_lang_for_server = apply_filters('icl_server_languages_map', $orig_lang['english_name']);
+
+        $timestamp = date('Y-m-d H:i:s');
+        
+        $xml = $iclq->build_cms_request_xml($data, $orig_lang_for_server);
+        $res = $iclq->send_request($xml, "String translations", $target_for_server, $orig_lang_for_server, "");
+
+        
+        if($res > 0){
+            foreach($string_values as $st_id => $value){
+                $wpdb->insert($wpdb->prefix.'icl_string_status', array('rid'=>$res, 'string_translation_id'=>$st_id, 'timestamp'=>$timestamp, 'md5'=>md5($value))); //insert rid
+            }
+    
+            $wpdb->insert($wpdb->prefix.'icl_core_status', array('rid'=>$res,
+                                                                     'origin'=>$orig_lang['code'],
+                                                                     'target'=>$target_code,
+                                                                     'status'=>CMS_REQUEST_WAITING_FOR_PROJECT_CREATION));
+        }
+    }
+}
+
+function icl_translation_get_string_translation_status($string_id) {
+    global $wpdb;
+    $status = $wpdb->get_var("
+            SELECT
+                MIN(cs.status) 
+            FROM
+                {$wpdb->prefix}icl_core_status cs
+            JOIN 
+               {$wpdb->prefix}icl_string_status ss
+            ON
+               ss.rid = cs.rid
+            WHERE
+                ss.string_translation_id={$string_id}
+            "   
+            );
+    
+    if ($status === null){
+        return "";
+    }
+    
+    $status = icl_decode_translation_status_id($status);
+    
+    return $status;
+        
+}
+
+function icl_translation_send_untranslated_strings($target_languages) {
+    global $wpdb;
+    $untranslated = $wpdb->get_col("SELECT id FROM {$wpdb->prefix}icl_strings WHERE status <> " . ICL_STRING_TRANSLATION_COMPLETE);
+    
+    icl_translation_send_strings($untranslated, $target_languages);
+    
+}
+
+function icl_is_string_translation($translation) {
+    // determine if the $translation data is for string translation.
+    
+    foreach($translation as $key => $value) {
+        if($key == 'body' or $key == 'title') {
+            return false;
+        }
+        if (preg_match("/string-.*?-value/", $key)){
+            return true;
+        }
+    }
+    
+    // if we get here assume it's not a string.
+    return false;
+    
+}
+
+function icl_translation_add_string_translation($trid, $translation, $lang, $rid){
+    
+    global $wpdb, $sitepress_settings, $sitepress;
+    $lang_code = $wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE english_name='".$wpdb->escape($lang)."'");
+    if(!$lang_code){        
+        return false;
+    }
+
+    foreach($translation as $key => $value) {
+        if (preg_match("/string-(.*?)-value/", $key, $match)){
+            $string_id = $match[1];
+            
+            $md5_when_sent = $wpdb->get_var("SELECT md5 FROM {$wpdb->prefix}icl_string_status WHERE string_translation_id={$string_id} AND rid={$rid}");
+            $current_string_value = $wpdb->get_var("SELECT value FROM {$wpdb->prefix}icl_strings WHERE id={$string_id}");
+            if ($md5_when_sent == md5($current_string_value)) {
+                $status = ICL_STRING_TRANSLATION_COMPLETE;
+            } else {
+                $status = ICL_STRING_TRANSLATION_NEEDS_UPDATE;
+            }
+            $value = str_replace ( '&#0A;', "\n", $value );
+            icl_add_string_translation($string_id, $lang_code, html_entity_decode($value), $status);
+        }
+    }
+
+    // update translation status
+    $wpdb->update($wpdb->prefix.'icl_core_status', array('status'=>CMS_TARGET_LANGUAGE_DONE), array('rid'=>$rid, 'target'=>$sitepress->get_language_code($lang)));
+    
+    return true;
+}
+
+
+function _icl_xmlrpc_add_message_translation($args){
+    global $wpdb, $sitepress, $sitepress_settings, $wpml_add_message_translation_callbacks;
+    $signature      = $args[0];
+    $site_id        = $args[1];
+    $rid            = $args[2];
+    $translation    = $args[3];
+    
+    $signature_check = md5($sitepress_settings['access_key'] . $sitepress_settings['site_id'] . $rid);
+    if($signature != $signature_check){
+        return 0; // array('err_code'=>1, 'err_str'=> __('Signature mismatch','sitepress'));
+    }
+    
+    $res = $wpdb->get_row("SELECT to_language, object_id, object_type FROM {$wpdb->prefix}icl_message_status WHERE rid={$rid}");
+    if(!$res){
+        return 0;
+    }
+    
+    $to_language = $res->to_language;
+    $object_id   = $res->object_id;
+    $object_type   = $res->object_type;
+    
+    try{
+        if(is_array($wpml_add_message_translation_callbacks[$object_type])){
+            foreach($wpml_add_message_translation_callbacks[$object_type] as $callback){
+                if ( !is_null($callback) ) {
+                    call_user_func($callback, $object_id, $to_language, $translation);    
+                } 
+            }
+        }                            
+        $wpdb->update($wpdb->prefix.'icl_message_status', array('status'=>MESSAGE_TRANSLATION_COMPLETE), array('rid'=>$rid));
+    }catch(Exception $e){
+        return $e->getMessage().'[' . $e->getFile() . ':' . $e->getLine() . ']';
+    }
+    return 1;
+    
+}
+
+function update_icl_account(){
+    global $sitepress, $wpdb;
+
+    //if the account is configured - update language pairs
+    if($sitepress->icl_account_configured()){
+        $iclsettings = $sitepress->get_settings();
+        
+        $pay_per_use = $iclsettings['translator_choice'] == 1;
+
+        // prepare language pairs
+        
+        $language_pairs = $iclsettings['language_pairs'];
+        $lang_pairs = array();
+        foreach($language_pairs as $k=>$v){
+            $english_fr = $wpdb->get_var("SELECT english_name FROM {$wpdb->prefix}icl_languages WHERE code='{$k}' ");
+            foreach($v as $k=>$v){
+                $incr++;
+                $english_to = $wpdb->get_var("SELECT english_name FROM {$wpdb->prefix}icl_languages WHERE code='{$k}' ");
+                $lpairs['from_language'.$incr] = apply_filters('icl_server_languages_map', $english_fr); 
+                $lpairs['to_language'.$incr] = apply_filters('icl_server_languages_map', $english_to);
+                if ($pay_per_use) {
+                    $lpairs['pay_per_use'.$incr] = 1;
+                } else {
+                    $lpairs['pay_per_use'.$incr] = 0;
+                }
+            }    
+        }
+        $data['site_id'] = $iclsettings['site_id'];                    
+        $data['accesskey'] = $iclsettings['access_key'];
+        $data['create_account'] = 0;
+        $data['url'] = get_option('home');
+        $data['title'] = get_option('blogname');
+        $data['description'] = $iclsettings['icl_site_description'];
+        $data['project_kind'] = $iclsettings['website_kind'];
+        $data['pickup_type'] = $iclsettings['translation_pickup_method'];
+        $data['interview_translators'] = $iclsettings['interview_translators'];
+
+        $notifications = 0;
+        if ($iclsettings['notify_complete']){
+            $notifications += 1;
+        }
+        if ($iclsettings['alert_delay']){
+            $notifications += 2;
+        }
+        $data['notifications'] = $notifications;
+        
+        $data = array_merge($data, $lpairs);
+        
+        require_once ICL_PLUGIN_PATH . '/lib/Snoopy.class.php';
+        require_once ICL_PLUGIN_PATH . '/lib/xml2array.php';
+        require_once ICL_PLUGIN_PATH . '/lib/icl_api.php';
+        
+        $icl_query = new ICanLocalizeQuery();
+        
+        return $icl_query->updateAccount($data);
+    } else {
+        return 0;
+    }
+
+        
+}
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation.php b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation.php
new file mode 100644
index 0000000..3d0d1ad
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/icl-translation.php
@@ -0,0 +1,40 @@
+<?php
+require_once ICL_PLUGIN_PATH . '/lib/Snoopy.class.php';
+require_once ICL_PLUGIN_PATH . '/lib/xml2array.php';
+require_once ICL_PLUGIN_PATH . '/lib/icl_api.php';
+require_once ICL_PLUGIN_PATH . '/modules/icl-translation/constants.inc';
+require_once ICL_PLUGIN_PATH . '/modules/icl-translation/icl-translation-functions.php';
+
+if(isset($_POST['translation_dashboard_filter'])){
+    $icl_translation_filter = $_POST['filter'];
+}
+
+add_filter('icl_server_languages_map', 'icl_server_languages_map', 10, 2);
+
+if(isset($_REQUEST['icl_ajx_req'])){
+    include dirname(__FILE__) . '/icl-ajx-requests.php';
+}
+
+if($sitepress_settings['existing_content_language_verified']){
+    add_action('save_post', 'icl_translation_save_md5', 12); //takes a lower priority - allow other actions to happen
+    add_action('delete_post', 'icl_translation_delete_post');
+    
+    add_action('post_submitbox_start', 'sh_post_submitbox_start');
+    
+    //add_action('icl_post_languages_options_before', 'icl_display_post_translation_status');
+}
+add_action('admin_print_scripts', 'icl_translation_js');
+add_filter('xmlrpc_methods','icl_add_custom_xmlrpc_methods');
+
+add_action('icl_initial_language_set', 'icl_initialize_db');
+
+if(defined('WP_ADMIN')){
+    wp_enqueue_style('icl-translation-style', ICL_PLUGIN_URL . '/modules/icl-translation/css/style.css',null,null,'all');
+}
+
+
+if(isset($_POST['poll']) && $_POST['poll']==1){
+    icl_poll_for_translations();
+}
+
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/js/icl-translation.js b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/js/icl-translation.js
new file mode 100644
index 0000000..8b92413
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/icl-translation/js/icl-translation.js
@@ -0,0 +1,353 @@
+jQuery(document).ready(function(){
+    iclUpdateTranslationEstimate();
+    
+    // th checkboxes
+    jQuery('#icl-translation-dashboard th :checkbox').change(
+        function(){
+            if(jQuery(this).attr('checked')){
+                jQuery('#icl-translation-dashboard :checkbox').attr('checked','checked');    
+                if(jQuery('#icl-tr-opt :checkbox:checked').length > 0) icl_td_enable_send();
+            }else{
+                jQuery('#icl-translation-dashboard :checkbox').removeAttr('checked');  
+                icl_td_disable_send();
+            }   
+            iclUpdateTranslationEstimate();
+        }
+    );
+    
+    jQuery('#icl-translation-dashboard td :checkbox').change(
+        function(){
+            if(!jQuery('#icl-translation-dashboard td :checkbox:checked').length){
+                icl_td_disable_send();
+            }else{
+                if(jQuery('#icl-tr-opt :checkbox:checked').length){
+                    icl_td_enable_send();    
+                }                
+                if(jQuery('#icl-translation-dashboard td :checkbox:checked').length == jQuery('#icl-translation-dashboard td :checkbox').length){
+                    jQuery('#icl-translation-dashboard th :checkbox').attr('checked', 'checked');
+                }else{
+                    jQuery('#icl-translation-dashboard th :checkbox').removeAttr('checked');
+                }
+            }
+            iclUpdateTranslationEstimate();
+        }        
+    );
+    
+    // lang options checkboxes
+    jQuery('#icl-tr-opt :checkbox').change(
+        function(){
+            if(!jQuery('#icl-tr-opt :checkbox:checked').length){
+                icl_td_disable_send()
+            }else{
+                if(jQuery('#icl-translation-dashboard :checkbox:checked').length > 0){
+                    icl_td_enable_send();
+                }   
+            }
+            iclUpdateTranslationEstimate();
+        }
+    )
+      
+    jQuery('#icl-tr-sel-doc').click(function(){        
+        
+        if(jQuery('#icl-translation-dashboard td :checkbox:checked').length==0) return false;
+    
+        target_languages = new Array();
+        jQuery('#icl-tr-opt :checkbox').each(function(){
+            if(jQuery(this).attr('checked')){
+                target_languages.push(jQuery(this).val());
+            }
+        });
+        jQuery('#icl_ajx_response_td').fadeIn();        
+        jQuery('#icl-tr-sel-doc').attr('disabled','disabled');    
+        var post_ids = new Array();
+        var tmpback = new Array();
+        jQuery('#icl-translation-dashboard :checkbox').each(function(){
+            if(jQuery(this).attr('checked') && jQuery(this).val()!='on'){
+                post_id = jQuery(this).val();
+                tmpback[post_id] = jQuery('#icl-tr-status-'+post_id).html();
+                post_ids.push(post_id);
+            }            
+        });
+        post_types = new Array();
+        jQuery('#icl-translation-dashboard .icl_td_post_type').each(function(){
+            post_types.push(jQuery(this).attr('name')+'='+jQuery(this).val()); 
+        });
+        
+        jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            dataType: 'json',
+            data: "icl_ajx_action=send_translation_request&post_ids="+post_ids+'&'+post_types.join('&')+'&target_languages='+target_languages.join('#'),
+            success: function(msg){
+                var all_ok = true;
+                for(i in msg){
+                    p = msg[i];    
+                    if(p.status > 0){
+                        jQuery('#icl-tr-status-'+p.post_id).html(jQuery('#icl_message_2').html());
+                    }else{
+                        jQuery('#icl-tr-status-'+p.post_id).html(tmpback[p.post_id]);
+                        all_ok = false;
+                    }
+                    jQuery('#icl-tr-status-'+p.post_id).fadeIn();
+                }
+                jQuery('#icl-tr-sel-doc').removeAttr('disabled');    
+                if (all_ok) {
+                    message = 'icl_message_1';
+                } else {
+                    message = 'icl_message_error';
+                }
+                jQuery('#icl_ajx_response_td').html(jQuery('#'+message).html());
+                location.href = location.href + "&message="+message;
+            }
+        });
+    });
+      
+    jQuery('a.translation_details_but').click(toogleTranslationDetails);
+    
+    var cache = '&cache=1';
+    if (location.href.indexOf("content-translation.php") != -1 || location.href.indexOf('string-translation.php') != -1) {
+        cache = '';
+    }
+    
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        dataType: 'json',
+        data: "icl_ajx_action=get_translator_status"+cache,
+        success: function(msg){
+            if (cache == '') {
+                var from_lang = jQuery('input[name="filter[lang]"]:checked').attr('value');
+                for(i in msg){
+                    if(msg[i]['from'] == from_lang) {
+                        if(msg[i]['have_translators'] == 1) {
+                            var to_lang = msg[i]['to'];
+                            if(jQuery('#icl-tr-not-avail-to-'+to_lang).length > 0) {
+                                jQuery('input[name="icl-tr-to-'+to_lang+'"]').removeAttr('disabled');
+                                jQuery('#icl-tr-not-avail-to-'+to_lang).remove();
+                            }
+                            
+                        }
+                    }
+                    
+                }
+            }
+
+            
+        }
+    });
+
+    if (typeof(icl_tb_init) != 'undefined') {
+        icl_tb_init('a.icl_thickbox');
+        icl_tb_set_size('a.icl_thickbox');
+    }
+    
+    
+    jQuery('.icl_tn_link').click(function(){
+        jQuery('.icl_post_note:visible').slideUp();
+        thisl = jQuery(this);
+        spl = thisl.attr('id').split('_');
+        doc_id = spl[3];
+        if(jQuery('#icl_post_note_'+doc_id).css('display') != 'none'){
+            jQuery('#icl_post_note_'+doc_id).slideUp();
+        }else{
+            jQuery('#icl_post_note_'+doc_id).slideDown();
+            jQuery('#icl_post_note_'+doc_id+' textarea').focus();
+        }
+        return false;
+    });
+    
+    jQuery('.icl_post_note textarea').keyup(function(){
+        if(jQuery.trim(jQuery(this).val())){
+            jQuery('.icl_tn_clear').removeAttr('disabled');
+        }else{
+            jQuery('.icl_tn_clear').attr('disabled', 'disabled');
+        }  
+    });
+    jQuery('.icl_tn_clear').click(function(){
+        jQuery(this).closest('table').prev().val('');
+        jQuery(this).attr('disabled','disabled');
+    })
+    jQuery('.icl_tn_save').click(function(){
+        thisa = jQuery(this);
+        thisa.closest('table').find('input').attr('disabled','disabled');
+        tn_post_id = thisa.closest('table').find('.icl_tn_post_id').val();
+        jQuery.ajax({
+                type: "POST",
+                url: icl_ajx_url,        
+                data: "icl_ajx_action=save_translator_note&note="+thisa.closest('table').prev().val()+'&post_id='+tn_post_id,
+                success: function(msg){
+                    thisa.closest('table').find('input').removeAttr('disabled');
+                    thisa.closest('table').parent().slideUp();
+                    icon_url = jQuery('#icl_tn_link_'+tn_post_id+' img').attr('src');
+                    if(thisa.closest('table').prev().val()){
+                        jQuery('#icl_tn_link_'+tn_post_id+' img').attr('src', icon_url.replace(/add_translation\.png$/, 'edit_translation.png'));
+                    }else{
+                        jQuery('#icl_tn_link_'+tn_post_id+' img').attr('src', icon_url.replace(/edit_translation\.png$/, 'add_translation.png'));
+                    }
+                }
+        });    
+        
+    })
+    
+});
+
+function icl_td_enable_send(){
+    jQuery('#icl-tr-sel-doc').removeAttr('disabled');    
+}
+function icl_td_disable_send(){
+    jQuery('#icl-tr-sel-doc').attr('disabled','disabled');    
+}
+
+function iclUpdateTranslationEstimate(){
+    //determine words 
+    var words = 0;    
+    var langs = jQuery('#icl-tr-opt :checkbox:checked').length;
+    jQuery('#icl-translation-dashboard td :checkbox:checked').each(function(){
+        words += parseInt(jQuery('#icl-cw-'+jQuery(this).val()).html());    
+    });
+    jQuery('#icl-estimated-words-count').html(words * langs);
+    
+    // estimate cost    
+    var estimate = 0;
+    jQuery('#icl-tr-opt :checkbox:checked').each(
+        function(){
+            lang = jQuery(this).attr('name').replace(/^icl-tr-to-/,'');
+            rate = jQuery('#icl_tr_rate_'+lang).val();
+            estimate += words * rate;
+        }
+    )
+    if(estimate < 1){
+        precision = Math.floor(estimate).toString().length + 1;    
+    }else{
+        precision = Math.floor(estimate).toString().length + 2;
+    }
+    jQuery('#icl-estimated-quote').html(estimate.toPrecision(precision));
+    
+}
+
+var icl_tr_details_selected_rid = 0;
+function toogleTranslationDetails(){    
+    jQuery('.icl-tr-details:visible').slideUp();
+    var rid = jQuery(this).attr('href').replace(/#translation-details-/,'');        
+    if(rid == icl_tr_details_selected_rid){
+        icl_tr_details_selected_rid = 0;
+        return;
+    } 
+    icl_tr_details_selected_rid = rid;
+    var tr = jQuery(this).parent().parent();
+    var last_col = tr.find('td:eq(4)');
+    last_col.append(icl_ajxloaderimg);    
+    tr.find('td span.icl-tr-details').load(location.href.replace(/#(.*)$/,''), {
+        icl_ajx_req:'get_translation_details',
+        rid:rid
+    }, function(){        
+        last_col.find('img').fadeOut('fast',function(){jQuery(this).remove()});
+        jQuery(this).slideDown();
+        icl_tb_init('a.icl_thickbox');
+        icl_tb_set_size('a.icl_thickbox');
+        
+    });    
+}
+
+function icl_refresh_translator_not_available_links() {
+    
+    // the links can be in
+    // 1) translation dashboard
+    // 2) string translation
+    // 3) Pro translation
+    
+    var from_lang = jQuery('input[name="filter[lang]"]:checked').attr('value');
+    if(from_lang == undefined){
+        from_lang = jQuery('input[name="icl-tr-from"]').attr('value');
+    }
+    from_lang = '&from_lang=' + from_lang;
+    
+    cache = '';
+    count = 0;
+    jQuery('.icl-tr-not-avail-to').each(function(){
+        count += 1;
+    });
+    
+    jQuery('.icl-tr-not-avail-to').each(function(){
+        if(jQuery(this).html().indexOf('/explain') == -1 &&
+                jQuery(this).html().indexOf('/support/show') == -1) {
+            return;
+        }
+
+        id = this.id;
+
+        if (id.indexOf('icl_lng_from_status_') != -1) {
+            langs = id.substring(20).split('_');
+            from_lang = langs[0];
+            from_lang = '&from_lang=' + from_lang;
+            to_lang = langs[1];
+            to_lang = '&to_lang=' + to_lang;
+        } else {
+            to_lang = id.substring(20);
+            to_lang = '&to_lang=' + to_lang;
+        }
+        jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=get_language_status_text"+cache+from_lang+to_lang+'&id='+id,
+            success: function(msg){
+                spl = msg.split('|');
+                if(spl[0]=='1'){
+                    item_id = spl[1];
+                    jQuery('#' + item_id).html(spl[2]);
+                    count -= 1;
+                    if (count == 0) {
+                        icl_tb_init('a.icl_thickbox');
+                        icl_tb_set_size('a.icl_thickbox');
+                    }
+                }
+            }
+        });
+        
+        //cache = '&cache=1';
+    });
+
+    
+}
+
+
+function iclConfigureAccount(){
+    formdata = jQuery(this).serialize();
+    var thisf = jQuery(this);
+    iclShowProgressBar(thisf, function(){        
+        thisf.contents().find("input").removeAttr('disabled');
+        jQuery('.icl_progress').html('ERROR: Connection timeout!').css('color','red');    
+        window.stop();
+    });
+    thisf.contents().find("input").attr('disabled', 'disabled');
+    jQuery.post(thisf.attr('action'), formdata, 
+        function(msg){           
+            matches = msg.replace(/\r?\n/ig,'').match(/<body([^>]*)>(.*)<\/body>/i);
+            jQuery('.icl_progress').stop();
+            jQuery('body').html(matches[2]);
+        }
+    )
+    return false;
+}
+
+var _icl_progress_text_save = false;
+var _icl_progress_width = false;
+function iclShowProgressBar(form, callback){    
+    
+    progress = form.find('.icl_progress');
+    if(_icl_progress_text_save){        
+        progress.html(_icl_progress_text_save).css('color','white').css('width',_icl_progress_width);
+        progress.css('width');
+    }
+    if(jQuery('.icl_progress').html() != 'ERROR: Connection timeout!'){
+        _icl_progress_text_save = progress.html();
+        _icl_progress_width = progress.css('width');
+    }
+    progress.fadeIn();
+    progress.animate({        
+        width:'99.5%'
+    }, 25000, callback); 
+}
+
+        
+        
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/modules/multiple-domains-login.php b/wp-content/plugins/sitepress-multilingual-cms/modules/multiple-domains-login.php
new file mode 100644
index 0000000..830c227
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/modules/multiple-domains-login.php
@@ -0,0 +1,130 @@
+<?php
+add_filter('login_url', 'emw_login_url', 10, 2);
+add_action('wp_authenticate', 'emw_intercept_login', 10, 1);
+add_action('wp_logout', 'emw_intercept_logout');
+add_action('plugins_loaded', 'emw_check_cross_domain_login', 1);
+
+function emw_login_url ($login_url, $redirect) {
+    global $sitepress_settings;
+    $domains = $sitepress_settings['language_domains'];
+    if ($domains) {
+        $domains[$sitepress_settings['default_language']] = get_option('siteurl');
+        $login_url = $domains[ICL_LANGUAGE_CODE].'/wp-login.php';
+    }
+    if ($redirect != '')
+        $login_url .= '?redirect_to='.$redirect;
+    return $login_url;
+}
+
+function emw_intercept_login ($username) {
+    global $sitepress_settings;
+    if (user_pass_ok($username, $_POST['pwd'])) {
+        wp_set_auth_cookie(get_profile('ID', $username), $_POST['rememberme'], is_ssl());
+        $domains = $sitepress_settings['language_domains'];
+        if ($domains) {
+            $time = floor(time()/10);
+            $_languages=icl_get_languages('skip_missing=0');
+            foreach($_languages as $l){
+                $languages[] = $l;
+            }
+            $next_domain = $domains[$languages[1]['language_code']];
+            $parts = parse_url($next_domain);
+            $options['nonce'] = md5($parts['scheme'] . '://' . $parts['host']."-{$username}-{$time}");
+            $options['redirect'] = $_REQUEST['redirect_to'];
+            $options['remember'] = $_POST['rememberme'];
+            $options['language_number'] = 1;
+            update_option('emw_login', $options);
+            header ('HTTP/1.1 301 Moved Permanently');
+            header ('Location: '.$next_domain."?emw-login&user={$username}&nonce={$options['nonce']}");
+            die();
+        }
+    }
+}
+
+function emw_intercept_logout () {
+    global $sitepress_settings;
+    $domains = $sitepress_settings['language_domains'];
+    if ($domains) {
+        $_languages=icl_get_languages('skip_missing=0');
+        foreach($_languages as $l){
+            $languages[] = $l;
+        }
+        $next_domain = $domains[$languages[1]['language_code']];
+        wp_clear_auth_cookie();
+        header ('HTTP/1.1 301 Moved Permanently');
+        header ('Location: '.$next_domain.'?emw-logout&next_language=1&redirect_to='.$_GET['redirect_to']);
+        die();
+    }
+}
+
+function emw_check_cross_domain_login () {
+    global $sitepress_settings;
+    if (isset($_REQUEST['emw-login'])) {
+        $options = get_option('emw_login');
+        $username = $_GET['user'];
+        $time = floor(time()/10);
+        $https = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ? 's' : '';
+        $hash1 = md5("http{$https}://".$_SERVER['SERVER_NAME']."-{$username}-{$time}");
+        $time = $time-1;
+        $hash2 = md5("http://".$_SERVER['SERVER_NAME']."-{$username}-{$time}");
+        if ($options['nonce'] == $hash1 | $options['nonce'] == $hash2) {
+            if ($_GET['nonce'] == $hash1 | $_GET['nonce'] == $hash2) {
+                wp_set_auth_cookie(get_profile('ID', $username), $options['remember'], is_ssl());
+                $domains = $sitepress_settings['language_domains'];
+                if ($domains) {
+                    $_languages=icl_get_languages('skip_missing=0');
+                    foreach($_languages as $l){
+                        $languages[] = $l;
+                    }                    
+                    if (isset($languages[$options['language_number']+1])) {
+                        $next_domain = $domains[$languages[$options['language_number']+1]['language_code']];
+                        $options['nonce'] = md5($next_domain."-{$username}-{$time}");
+                        $options['remember'] = $_POST['rememberme'];
+                        $options['language_number'] = $options['language_number']+1;
+                        update_option('emw_login', $options);
+                        header ('HTTP/1.1 301 Moved Permanently');
+                        header ('Location: '.$next_domain."?emw-login&user={$username}&nonce={$options['nonce']}");
+                        die();
+                    } else {
+                        delete_option ('emw_login');
+                        header ('HTTP/1.1 301 Moved Permanently');
+                        header ('Location: '.$options['redirect']);
+                        die();
+                    }
+                }
+            } else {
+                delete_option ('emw_login');
+                wp_die(__('Possible login hack attempt','sitepress'));
+            }
+        } else {
+            delete_option ('emw_login');
+            wp_die(__('Possible login hack attempt','sitepress'));
+        }
+    } elseif (isset($_REQUEST['emw-logout'])) {
+        $domains = $sitepress_settings['language_domains'];
+        if ($domains) {
+            $languages=icl_get_languages('skip_missing=0');
+            $_languages=icl_get_languages('skip_missing=0');
+            foreach($_languages as $l){
+                $languages[] = $l;
+            }            
+            $language_index = $_GET['next_language']+1;            
+            if (isset($languages[$language_index]['language_code'])) {
+                $next_domain = $domains[$languages[$language_index]['language_code']];
+                wp_clear_auth_cookie();
+                header ('HTTP/1.1 301 Moved Permanently');
+                header ('Location: '.$next_domain.'?emw-logout&next_language='.$language_index.'&redirect_to='.$_GET['redirect_to']);
+                die();
+            } else {
+                wp_clear_auth_cookie();
+                header ('HTTP/1.1 301 Moved Permanently');
+                if ($_GET['redirect_to'])
+                    header ('Location: '.$_GET['redirect_to']);
+                else
+                    header ('Location: '.get_option('siteurl'));
+                die();
+            }
+        }
+    }
+}
+?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/readme.txt b/wp-content/plugins/sitepress-multilingual-cms/readme.txt
new file mode 100644
index 0000000..2b6e12b
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/readme.txt
@@ -0,0 +1,382 @@
+=== WPML Multilingual CMS ===
+Contributors: ICanLocalize
+Donate link: http://wpml.org/?page_id=2312
+Tags: CMS, navigation, menus, menu, dropdown, css, sidebar, pages, i18n, translation, localization, language, multilingual, WPML
+Requires at least: 2.7
+Tested up to: 3.0.1
+Stable tag: 1.8.1.2
+
+Allows building complete multilingual sites with WordPress.
+
+== Description ==
+
+**WPML makes multilingual content management easy, just like running a site in one language.**
+
+= Features =
+
+ * Turns a single WordPress install into a [multilingual site](http://wpml.org/?page_id=519).
+ * Built-in [theme localization](http://wpml.org/?page_id=2717) without .mo files.
+ * [Comments translation](http://wpml.org/?page_id=2755) allows you to moderate and reply to comments in your own language.
+ * Integrated [professional translation](http://wpml.org/?page_id=1169) (optional feature for folks who need help translating).
+ * Includes [CMS navigation](http://wpml.org/?page_id=527) elements for drop down menus, breadcrumbs trail and sidebar navigation.
+ * [Robust links](http://wpml.org/?page_id=594) to posts and pages that never break.
+
+= Highlights =
+
+* Translations are grouped together and not mixed in the database.
+* CMS navigation elements provide accurate and easy to use site-wide navigation.
+* Simple CSS for easy [customization](http://wpml.org/?page_id=909).
+
+= Commercial Support =
+
+While WPML boast a lively [community](http://forum.wpml.org), it's great to get fast an accurate support when you need it.
+
+[ICanLocalize](http://www.icanlocalize.com/site/) offers reliable [commercial support](http://wpml.org/partners/) for WPML. This support option is meant for professional web developers who need timely and dependable support directly from the developers.
+
+= In a Nutshell =
+
+WPML makes it possible to turn WordPress blogs multilingual in a few minutes with no knowledge of PHP or WordPress.
+Its advanced features allow professional web developers to build full multilingual websites.
+
+WPML's [showcase](http://wpml.org/showcase/) includes samples of blogs, full websites and even multilingual BuddyPress portals.
+
+== Installation ==
+
+1. Place the folder containing this file into the plugins folder
+2. Activate the plugin from the admin interface
+
+WPML needs to create tables in your database. These tables are used to hold the new language information. In order to use WPML, your MySQL user needs to have sufficient privileges to create new tables in the database.
+
+For help, visit the [support forum](http://forum.wpml.org).
+
+== Frequently Asked Questions ==
+
+= Can I translate myself, or do I need to pay for it? =
+
+You can certainly translate your site yourself. The professional translation is an optional feature intended for people who don't want to translate themselves.
+
+If you're translating your site yourself, just ignore that option.
+
+= Everything in the theme still appears without translation =
+
+Have a look at this [theme localization guide](http://wpml.org/?page_id=2717).
+
+= Languages per directories are disabled =
+
+To be able to use languages in directories, you should use a non-default permlink structure.
+Also, go through the [detailed description](http://wpml.org/?page_id=1010).
+
+== Screenshots ==
+
+1. Translation controls in posts and pages lists.
+2. Translation controls in edit screen.
+3. String translation panel for translating plugins and themes.
+4. Language setup admin screen.
+
+== Changelog ==
+
+= 1.8.1.2 =
+* Bug fixes for reminders, removing translation languages and more
+
+= 1.8.1.1 =
+* Fixed source of warning messages in 1.8.1
+
+= 1.8.1 =
+* Bugfixes for the WP Nav Menus
+* Improved translaiton interface
+* Fixed bug with custom post type in WP_Query
+* Fixed navigation url issues when using language added as a parameter
+* Filter multiple post types
+* Fixes for supporting https urls
+
+= 1.8.0 =
+* Added support for multilingual menus. Each language gets a different menus, linked as translations.
+* Fixed bug with tag translations that have the same value.
+* Fixed bug causing page order to change when adding translations.
+
+= 1.7.9 =
+* Fixed bug with pagination not showing on custom posts archive pages.
+* Fixed bug for search results.
+* Fixed bug for thinkbox popups.
+* Fixed bug for auto adjusting IDs (e.g. post_parent).
+* Fixed bug related to using WPML as a site wide activated plugin on WPMU.
+* Added option to set strings language to be different than the default language.
+* Option to scan WPMU plugins.
+* Fixed bug related to http communication (Snoopy) with the translation server.
+* Option to delete only specific translations.
+* More bug fixes.
+
+= 1.7.8.1 =
+* Fixed bug with some js strings causing errors
+* Fixed bug in icl_link_to_element (for pages)
+
+= 1.7.8 =
+* Added full support for WordPress custom posts.
+* Added option to subscribe to paid support.
+* Updated the CMS navigation to support custom posts and custom taxonomies.
+* Fixed bug with 'menu_order' flag not being synced when using the PRO translation
+* More bug fixes and better compatibility with WP 3.0
+
+
+= 1.7.7 =
+* Added full support for WordPress custom taxonomies.
+* Fixed bugs with category and tag translation.
+* icl_link_to_element fixed to work with auto-link adjustment.
+* Works much faster when using the 'auto adjust IDs' function (caching results).
+
+= 1.7.6 =
+* Fixed bug that slipped through in 1.7.4 
+
+= 1.7.4 =
+* Works with WordPress 3.
+* Fixed bug for wp_list_pages()/wp_list_categories() when Adjust IDs is on.
+* Sync default categories upon change. Wasn't happening before.
+* Fixed bug regarding get_pages() not working with Adjust IDs.
+* Include private pages in the CMS navigation.
+* Allow the flag 'private' to be synced between pages.
+* icl_link_to_element() - added argument $return_original_if_missing (default true) Allows returning empty strings. 
+* Author links by language.
+* bugfix in the library used for communicating with ICanLocalize to work with HTTPS.
+
+= 1.7.3 =
+* Added languages editing, allowing to enter new languages to WPML.
+* Added translation for texts in admin screens of themes and plugins.
+* Fixed some issues with categories and tags when automaticallt adjust ids was on.
+* Reverted language name for Persian (in Farsi).
+* Language auto-update is disabled. Update is now only manual.
+
+= 1.7.2 =
+* Fixed bug related to using a revision for a translated page.
+* Fixed language names Magyar, Croatian, Persian, Latvian.
+* Set correct locales for Chinese (traditional and simplified).
+* Fixed potential Cross Site Scripting (XSS) security hole.
+* Sticky links works with single quote links too.
+* Implemented Sticky links for strings.
+* Fixed bug related to special (UTF-8) characters in translation body.
+* Added warning on the reset function, to avoid accidental plugin data reset.
+
+= 1.7.1 =
+* Home-page URLs are now automatically adjusted per language.
+* Added optional title to the language switcher (some theme don't display correctly without a title).
+* Bug fix: subpages in different language than the default not rendering correctly when the auto-adjust IDs option was set.
+* Bug fix: compatibility packages from the theme folder were not included.
+* Added mysqldump feature on the troubleshooting page.
+* Catalan, Slovenian, Serbian flags fixed.
+* Fixed gallery links, per the [discussion](http://forum.wpml.org/topic.php?id=1000#post-4652) in the forum.
+* Bug fix: WPMU - some strings translations for subblogs were wrong.
+
+= 1.7.0 =
+* WPML adapts itself to any WordPress theme, making any website fully multilingual without any changes.
+* Added option to add a list of language links in the site's footer.
+* Added controls for choosing what to synchronize between originals and translations.
+* Added feature to allow [hiding all contents per language](http://wpml.org/?p=4031).
+* Fixed bug when quick editing tags.
+* Switched locales for Chinese between simplified and traditional.
+* Lots of other tiny bug fixes.
+
+= 1.6.0 =
+* Allows translating both themes and plugins in WPML's string translation.
+* Existing translations in .mo files are imported to WPML's translation interface.
+* Shows the source of strings for translation (both in the PHP and on the HTML).
+* Cleaned and simplified string translation page.
+* Fixed bugs for the option of showing the default language posts when translations are missing.
+* Fixed search function when blog is set to display all posts with language fallback.
+* Added placeholder for _cleanup_header_comment (for compatibility with WP 2.7 and below).
+* Fixed some bugs with the tags and the tag cloud.
+* Fixed bug with missing comments,
+* Added correct Estonian flag.
+
+= 1.5.1 =
+* Fixed broken link to media library
+* Fixed language selector appearance for people using ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS
+* Tested WP 2.9 compatibility
+* Fixed Ukranian flag
+* Added support for PHP setups without json_decode
+* Added compatibility package for Headspace2 SEO plugin
+* Fixed bug in the 'icl_object_id' template function
+
+= 1.5.0 =
+* Added compatibility packages for Thematic, Hybrid and the default WordPress theme.
+* Blog posts can be displayed in the default language if translations are missing.
+* Language switcher can be customized to match the appearance of the site without editing CSS.
+* Users can add notes for translation on posts and pages.
+* Added an optional argument for specifying the breadcrumbs trail separator.
+* Reporting 404 errors if translations don't exist for a URL.
+* Fixed a bug which caused WPML to use HTTPS on certain Windows servers.
+* Improved the way WPML imports the ajax.php files for more advanced WordPress installations.
+* When importing .po files, only existing strings are updated and new strings are not created.
+* Allow minimizing the ICanLocalize reminders box.
+* Synchronize `allow_pings` and `allow_comments` between translations.
+* Synchronize page templates for translations.
+* Fix page parent synchronization for translation.
+* Removed hard-coded flag sizes from HTML and moved to CSS and easy customization.
+* Make sure that cache entries are not accumulated in the database.
+
+= 1.4.0 =
+* WPML now has two distinct modes - Basic and Advanced. Basic mode just for multilingual contents and Advanced for all the rest.
+* Professional translation management is unified to one screen. No more Tools->Translation dashboard.
+* Communication with translators is all done from within WordPress.
+* Many [bugs fixed](http://wpml.org/?p=3110).
+
+= 1.3.5 =
+* Improved the professional translation flow and streamlined it for easy usage.
+* Avoids failing due to PHP errors in other plugins (caused various compatibility issues).
+* Fixed a bug that prevented Sticky Links from working for links with anchors.
+* Fixed bug for comments feed.
+* Fix bug which caused Bulk Editing to change languages.
+* After install, defaults to languages per directories if it's working on the server.
+* Add language 'all', that allows listing contents in all languages (good for feeds).
+* Turned the 'advanced' / 'basic' selection to a button.
+
+= 1.3.4 =
+* Changed the posts menu in the top navigation. Now its contents and position can be configured.
+* Fixed a bug which prevented the preview changes from working.
+* Fixed a bug in the language switcher, which sent the home page to the wrong URL.
+
+= 1.3.3 =
+* Huge speed improvements.
+* Ability to prevent loading WPML's CSS and JS files.
+* Fixed bugs for .po import/export.
+* Corrected Czech flag.
+* Fixed bug for feeds in other languages when using the language as a parameter in the url.
+* Fixed bug for translation column not displaying after doing quick-edit.
+* Fixed bug for comments count (was reporting SPAM comments too).
+* Made multi-domain login optional. To enable, set `ICL_USE_MULTIPLE_DOMAIN_LOGIN` to true.
+
+= 1.3.2 =
+* Fixes to the comments translation. This will bring back comments that were hidden on translated pages after upgrading from a previous release.
+
+= 1.3.1 =
+* Added a translations summary to posts and pages lists.
+* Fixed bug when replying to comments from the admin screen.
+* Updated Chinese, Portuguese and Japanese translations.
+
+= 1.3.0 =
+* Added translation for comments.
+* Allow associating existing contents as translation.
+* Modified the layout of the translation boxes.
+* Added a setup wizard.
+* Fixed bugs that prevented WPML to work with MySQL in strict mode.
+* Fixed bugs that prevented working with some other plugins.
+
+= 1.2.1 =
+* Allows specifying the locale for the default language.
+* Added a theme integration file - docs/theme-integration/wpml-integration.php.
+* Added an input for affiliate ID for themes.
+* Simplified the setup for [professional translation](http://wpml.org/?page_id=1169).
+
+= 1.2.0 =
+* Adds theme localization.
+* ICanLocalize translation integration for theme and widget texts.
+* Added string translation import and export using .po files.
+* Fix for empty language tables bug.
+
+= 1.1.0 =
+* Adds [translation for general texts](http://wpml.org/?page_id=1915), such as title, tagline and widgets.
+* Can [translate custom fields](http://wpml.org/?page_id=2065) by ICanLocalize.
+* Added an overview page, for quick access to all functions and a snapshot of WPML's status.
+
+= 1.0.4 =
+* Fixed the bug which caused errors when upgrading the plugin from previous versions.
+* Fixed category and tag mess when using Quick-edit.
+* Admin pages run much faster due to statistics caching and faster DB queries.
+* Fixed name of blog page in cms-navigation section.
+* Fixed compatibility with openID plugin.
+* Fixed a bug that was caused when pages/posts had no title.
+* Added `icl_object_id` which returns the ID of translated objects.
+* Fixed permlinks for newly created posts (autosave by WordPress).
+* Fixed bug which prevented sub-pages from being excluded from the navigation.
+* Simplified the professional translation setup page.
+
+= 1.0.3 =
+* Added a hook for adding [custom HTML in menu items](http://wpml.org/?page_id=1824).
+* Added a function for creating [multilingual links in themes](http://wpml.org/?page_id=1815).
+* Cleaned up translation table, in case posts were deleted while WPML is inactive.
+* Reverting to HTTP communication instead of HTTPs if a firewall is blocking us.
+
+= 1.0.2 =
+* Fixed language selector bug for some themes.
+* Major improvements for translation database integrity.
+* Fixed word count estimate for documents in Asian languages.
+* Added a new Troubleshoot module, which allows getting translation table status and to reset the plugin.
+
+= 1.0.1 =
+* Fixed problems with all Asian languages and Norwegian.
+* Fixed missing tables problem for people who upgraded from 0.9.9.
+* Fixed CMS navigation drop down bug for IE6.
+* Improved the display for the translation dashboard.
+
+= 1.0.0 =
+* Added the capability to translate contents, including posts, pages, tags and categories.
+* Fixed HTML for the built in language selector.
+* Fixed 'preview' functionality when using different domains per language.
+* Fixed PHP error that popped when activating the plugin after upgrade.
+* Fixed drafts count problem (the plugin didn't count correctly the number of drafts per language).
+
+= 0.9.9 =
+* Fixed problems with WordPress Gallery.
+* Fixed error when using a static home page that's not translated (now, returns the 404 page).
+* Fixed bug that prevented sticky links to work for pages.
+* Fixed a CSS error in language-selector.css.
+* Fixed a bug which created the RSS feed to have invalid XML (be an invalid feed).
+* Fixed a bug which caused the default language to reset after plugin upgrade.
+* Added WP-Http class for compatibility with WP 2.6.
+* Added country flags as an option for the language switcher.
+* Added a function that returns the languages information for [building custom language switchers](http://wpml.org/?page_id=989).
+* Added the language name as the class for each entry in the languages selector, so that they can be styled individually.
+
+= 0.9.8 =
+* Fixed compatibility issues with Windows servers.
+* Fixed bug with sticky post - mysql query error when no sticky post existed.
+* Fixed search function.
+* Prev/Next links for category archive pages are now working again.
+* Add warning about disabled JavaScript (which is required for the plugin to work).
+* Added debug information for hunting down stubborn bugs.
+* Localized the admin section of the plugin to Spanish.
+
+= 0.9.7 =
+* Posts created via XML-RPC are assigned to the default language.
+* Translated homepage displays correctly for blogs configured with 'language name passed as a parameter'.
+* Defined a language contants that can be used in templates - `ICL_LANGUAGE_CODE`, `ICL_LANGUAGE_NAME`, `ICL_LANGUAGE_NAME_EN`.
+* Split the stylesheet for the CMS Navigation into structure and design - users will be able to copy the design stylesheet and use it to override the plugin default style from their theme stylesheet.
+* Fixed incorrect query when selecting categories in the admin panel, causing extra records to be added to the translation table when editing categories inline.
+
+= 0.9.6 =
+* Fixed search in different languages
+* Fixed page edit links in different languages
+* Custom language domains don't change back to default when switching to different language negotiation scheme.
+
+= 0.9.4 =
+* Custom domains per language work correctly (forced to WPML defaults before)
+* Prevents from being activated on PHP4 (WPML only runs on PHP5)
+
+= 0.9.3 =
+* Fixed the Media Library (which the plugin disabled in the previous release).
+* Checks against collision with other plugins (CMS-navigation and Absolute-links).
+* Verified that per-directory language URLs can be implemented in WP.
+* Split Portuguese to Brazilian and Portuguese (European) Portuguese.
+* Fixed broken HTML in default category name for translations.
+* Verify that the plugin can create the required database tables and warn if not.
+
+= 0.9.2 =
+* First public release
+
+== Upgrade Notice ==
+
+= 1.8.1 =
+Multilingual menus bug fixes and improved translation interface
+
+= 1.8.0 =
+Added support for multilingual menus.
+
+= 1.7.9 =
+Added support for MultiSite, theme localization from any language and bug fixes.
+
+= 1.7.1 =
+Home page auto adjusts per language.
+
+= 1.7.0 =
+WPML automatically adjusts to any theme.
+
+= 1.6.0 =
+* WPML can now translate other plugins without editing .po/.mo files
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/affiliate-info.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/affiliate-info.css
new file mode 100644
index 0000000..5918a88
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/affiliate-info.css
@@ -0,0 +1,10 @@
+.icon32{
+    background: transparent url(../img/icon.png) no-repeat !important;    
+}
+.icon32_adv{
+    background: transparent url(../img/icon_adv.png) no-repeat !important;    
+}
+
+#icl_affiliate_info_check table.widefat{
+    width:500px;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/content-translation.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/content-translation.css
new file mode 100644
index 0000000..4e357e3
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/content-translation.css
@@ -0,0 +1,76 @@
+#icl_language_pairs{
+    /*display: none;*/    
+}
+.icl_language_pairs li{
+    background-color:#fff;
+    border:1px solid #ccc;
+    padding:5px;
+}
+.icl_language_pairs ul{
+    /*display:none;*/
+    margin:10px;
+}
+.icl_language_pairs ul li{
+    border:none; 
+    float:none;
+    width:auto; 
+    padding:0px;  
+}
+
+.icon32{
+    background: transparent url(../img/icon.png) no-repeat !important;    
+}
+.icon32_adv{
+    background: transparent url(../img/icon_adv.png) no-repeat !important;    
+}
+
+.icl_benefits {
+    background-image: url(../img/yes.png);
+    background-repeat: no-repeat;
+    background-position: 25px 3px;
+    padding-left:50px;
+}
+
+#icl_setup_wizard .icl_setup_wizard_step{
+    width:33%;
+    float:left;
+}
+
+
+#icl_setup_wizard_2 .icl_setup_wizard_step{
+    width:50%;
+    float:left;
+}
+
+#icl_setup_wizard_progress{
+    height:10px;
+    background-color: #ccc;
+    margin: 10px 0 10px 0;
+    width:100%;
+}
+#icl_setup_wizard_progress_bar{
+    background-color: #777;
+    height:10px;
+}
+
+
+.icl_cost_estimate_toggle, .icl_account_setup_toggle{
+    margin-bottom: 5px;
+}
+
+#icl_cost_estimate, #icl_account_setup{
+    display: none;
+}
+
+.icl_account_form {
+    border:1px solid #ccc;
+    padding:5px;
+    margin-left: 10px;
+    margin-top: 10px;
+}
+
+.icl_status_jobs{padding-left:20px;background: url(../img/documents.png) no-repeat;}
+.icl_status_project{padding-left:20px;background: url(../img/documents.png) no-repeat;}
+.icl_status_balance{padding-left:20px;background: url(../img/dollar1.png) no-repeat;}
+.icl_status_help{padding-left:20px;background: url(../img/question1.png) no-repeat;}
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/language-selector.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/language-selector.css
new file mode 100644
index 0000000..3b1ee10
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/language-selector.css
@@ -0,0 +1,143 @@
+#lang_sel {height:32px; position:relative; z-index:99;  font-family: verdana, arial, sans-serif;}
+/* hack to correct IE5.5 faulty box model */
+* html #lang_sel {width:12em; w\idth:12em;}
+/* remove all the bullets, borders and padding from the default list styling */
+#lang_sel ul, #lang_sel li {padding:0 !important; margin:0 !important; list-style-type:none !important;}
+#lang_sel li:before{content:'' !important;}
+#lang_sel ul ul {width:149px;}
+/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
+#lang_sel li {float:left;width:149px;position:relative;}
+/* style the links for the top level */
+#lang_sel a, #lang_sel a:visited {display:block;font-size:11px;text-decoration:none !important; color:#444444; border:1px solid #cdcdcd; background:#fff; padding-left:10px; line-height:24px;}
+/* a hack so that IE5.5 faulty box model is corrected */
+* html #lang_sel a, * html #lang_sel a:visited {width:149px; w\idth:138px;}
+
+/* hide the sub levels and give them a positon absolute so that they take up no room */
+#lang_sel ul ul {visibility:hidden;position:absolute;height:0;top:25px;left:0; width:149px;border-top:1px solid #cdcdcd;}
+/* another hack for IE5.5 */
+* html #lang_sel ul ul {top:18px;t\op:19px;}
+
+/* style the table so that it takes no ppart in the layout - required for IE to work */
+#lang_sel table {position:absolute; top:0; left:0; border-collapse:collapse;;}
+
+/* style the second level links */
+#lang_sel ul ul a, #lang_sel ul ul a:visited {background:#ffffff; color:#444444; height:auto; line-height:1em; padding:5px 10px;border-width:0 1px 1px 1px;}
+/* yet another hack for IE5.5 */
+* html #lang_sel ul ul a, * html #lang_sel ul ul a:visited {width:150px;w\idth:128px;}
+
+/* style the top level hover */
+#lang_sel a:hover, #lang_sel ul ul a:hover{color:#000; background:#eee;}
+#lang_sel :hover > a, #lang_sel ul ul :hover > a {color:#000; background:#eee;}
+
+#lang_sel a.lang_sel_sel{
+    background:url(../img/nav-arrow-down.png) #fff right no-repeat;
+    color:#444;
+}
+#lang_sel a.lang_sel_sel:hover{
+    text-decoration: none;
+    color:#000;
+}
+
+/* make the second level visible when hover on first level list OR link */
+#lang_sel ul li:hover ul,
+#lang_sel ul a:hover ul{visibility:visible; }
+
+#lang_sel img.iclflag{width:18px;height:12px;position: relative; top: 1px;}
+
+
+
+
+
+#lang_sel_footer {
+  margin: 0;
+  padding: 7px;
+  text-align: center;
+  border: 1px solid #fff;
+  font: 11px Verdana, sans-serif;
+  height: 15px;
+  clear: both;
+  background-color: #fff;
+  border: 1px solid #cdcdcd;
+}
+
+#lang_sel_footer ul {
+  list-style: none;
+  margin:0;
+  padding:0;
+}
+
+#lang_sel_footer ul li img {
+  position: relative;
+  top: 1px;
+  width: 18px;
+  height: 12px;
+}
+
+#lang_sel_footer ul li {
+  display:inline;
+  margin:0 1px 0 0;
+  padding:0;
+}
+
+#lang_sel_footer ul li a, #lang_sel_footer ul li a:visited {
+  text-decoration: none;
+  padding: 5px 10px;
+}
+
+#lang_sel_footer ul li a:hover, #lang_sel_footer ul li a:active {}
+
+#wpml_credit_footer { width: 100%; margin: 10px 0; padding: 0; text-align: center; font-size: 11px; }
+
+
+
+
+
+#lang_sel_list {height:32px; position:relative; z-index:99;  font-family: verdana, arial, sans-serif; width:149px;}
+/* hack to correct IE5.5 faulty box model */
+* html #lang_sel_list {width:12em; w\idth:12em;}
+/* remove all the bullets, borders and padding from the default list styling */
+#lang_sel_list ul, #lang_sel_list li {padding:0 !important; margin:0 !important; list-style-type:none !important;}
+#lang_sel_list li:before{content:'' !important;}
+#lang_sel_list ul {width:149px;}
+/* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
+#lang_sel_list li {float:left;width:149px;position:relative;}
+/* style the links for the top level */
+#lang_sel_list a, #lang_sel_list a:visited {display:block;font-size:11px;text-decoration:none !important; color:#444444; border:1px solid #cdcdcd; border-width:0 1px 1px 1px; background:#fff; padding-left:10px; line-height:18px;}
+/* a hack so that IE5.5 faulty box model is corrected */
+* html #lang_sel_list a, * html #lang_sel_list a:visited {width:149px; w\idth:138px;}
+
+/* hide the sub levels and give them a positon absolute so that they take up no room */
+#lang_sel_list ul {/*visibility:hidden;position:absolute;*/height:0;top:19px;left:0; width:149px;border-top:1px solid #cdcdcd;}
+/* another hack for IE5.5 */
+* html #lang_sel_list ul {top:18px;t\op:19px;}
+
+/* style the table so that it takes no ppart in the layout - required for IE to work */
+#lang_sel_list table {position:absolute; top:0; left:0; border-collapse:collapse;}
+
+/* style the second level links */
+#lang_sel_list ul a, #lang_sel_list_list ul a:visited {background:#ffffff; color:#444444; height:auto; line-height:1em; padding:3px 10px;}
+/* yet another hack for IE5.5 */
+* html #lang_sel_list ul a, * html #lang_sel_list ul a:visited {width:150px;w\idth:128px;}
+
+#lang_sel_list a.lang_sel_sel{
+    background-image: none;
+    color:#444;
+}
+#lang_sel_list a.lang_sel_sel:hover{
+    text-decoration: none;
+    color:#000;
+}
+
+/* make the second level visible when hover on first level list OR link */
+#lang_sel_list ul li:hover ul,
+#lang_sel_list ul a:hover ul{visibility:visible; }
+
+#lang_sel_list img.iclflag{width:18px;height:12px;position: relative; top: 1px;}
+
+#lang_sel.icl_rtl{
+    text-align:right;
+    direction: rtl;
+}
+#lang_sel.icl_rtl .lang_sel_sel{
+    padding-right:14px;
+}
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/languages.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/languages.css
new file mode 100644
index 0000000..81b7d5e
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/languages.css
@@ -0,0 +1,108 @@
+#icl_enabled_languages{
+    margin-bottom: 10px;    
+}
+#icl_enabled_languages input{
+    visibility: hidden;
+}
+
+#icl_save_default_button, #icl_cancel_default_button{
+    display: none;    
+}
+#icl_save_default_button, #icl_cancel_default_button, #icl_save_language_selection, #icl_cancel_language_selection{
+    color:#E68A00;
+}
+
+#icl_avail_languages_picker{
+    margin: 5px 0 5px 0;        
+    display: none;
+}
+#icl_avail_languages_picker ul, #icl_enabled_languages{
+    list-style: none;
+    margin: 0;
+    padding: 0;        
+}
+#icl_avail_languages_picker li, #icl_enabled_languages li{
+    float:left;
+    width:170px;    
+}
+#icl_enabled_languages li.default_language{
+    font-weight: bold;
+}
+#icl_avail_languages_picker li:hover{
+    color:#f00;
+}
+
+table.language_domains{
+    margin:6px;
+}
+.language_domains td, .language_domains input{
+    font-size: 11px;
+}
+
+a#toggle-theme-localization{
+    text-decoration: none;
+}
+#icl_theme_localization{
+    display: none;
+}
+#icl_theme_localization input{
+    font-size: 80%;
+}
+
+.icon32{
+    background: transparent url(../img/icon.png) no-repeat !important;    
+}
+.icon32_adv{
+    background: transparent url(../img/icon_adv.png) no-repeat !important;    
+}
+
+#icl_inactive_content_table{
+    width:auto;
+}
+#icl_inactive_content_table td{
+    text-align: right;
+}
+#icl_inactive_content_table tfoot td{font-weight:bold;}
+
+#icl_setup_wizard .icl_setup_wizard_step{
+    font-size:11px;
+    width:33%;
+    float:left;
+    font-weight: bold;
+}
+#icl_setup_wizard_progress{
+    height:10px;
+    background-color: #ccc;
+    margin: 10px 0 10px 0;
+    width:100%;
+}
+#icl_setup_wizard_progress_bar{
+    background-color: #777;
+    height:10px;
+}
+
+#icl_more_languages_wrap .widefat h4{
+    margin:15px 0 5px 0;
+}
+
+#icl_lang_sel_preview_wrap{
+    height:30px;
+    float:right;
+    width:300px;
+    border: 1px solid #ccc;
+    padding:0 15px;
+}
+#colorPickerDiv a, #colorPickerDiv a:hover {
+		padding: 1px;
+		text-decoration: none;
+		border-bottom: 0px;
+}
+
+#icl_edit_languages_table input { width:70px; }
+#icl_edit_languages_table .radio, #icl_edit_languages_table .file { width:auto; }
+#icl_edit_languages_info ul {
+	list-style : square inside;
+	padding: 15px;
+}
+
+#icl_edit_languages_table td { vertical-align: middle; }
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/navigation.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/navigation.css
new file mode 100644
index 0000000..6862587
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/navigation.css
@@ -0,0 +1,6 @@
+.icon32{
+    background: transparent url(../img/icon.png) no-repeat !important;    
+}
+.icon32_adv{
+    background: transparent url(../img/icon_adv.png) no-repeat !important;    
+}
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/overview.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/overview.css
new file mode 100644
index 0000000..2897a42
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/overview.css
@@ -0,0 +1,18 @@
+p.sub {
+    color:#444444;
+    font-family: Verdana;
+    font-size:12px;
+    padding:5px 10px 15px;
+    margin:0px;
+}
+.icon32{
+    background: transparent url(../img/icon.png) no-repeat !important;    
+}
+.icon32_adv{
+    background: transparent url(../img/icon_adv.png) no-repeat !important;    
+}
+.postbox hr{
+    border:none;
+    border-bottom: solid 1px #ccc;    
+    height:1px;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/string-translation.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/string-translation.css
new file mode 100644
index 0000000..06820f7
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/string-translation.css
@@ -0,0 +1,157 @@
+.icon32{
+    background: transparent url(../img/icon.png) no-repeat !important;    
+}
+.icon32_adv{
+    background: transparent url(../img/icon_adv.png) no-repeat !important;    
+}
+.icl-st-original{
+    /*padding:3px 3px 3px 0;*/
+}
+.icl-st-inline{
+    background: #DFDFDF url(../../../../../wp-admin/images/gray-grad.png) repeat-x scroll left top;
+    border:1px solid #ddd;
+    padding:1px;
+    clear:both;
+    display: none;
+    
+}
+.icl-st-table{
+    width:100%;
+}
+.icl-st-table textarea{
+    font-size: 10px;
+    padding:1px;
+    margin:0;
+    line-height:normal;
+}
+
+.colthree{
+    width:48%;
+    float:left;
+    padding-right:8px;
+}
+.colthree h4{
+    margin-bottom:0;
+}
+
+.meta_comment{
+    font-style: italic;
+    color:#777;
+}
+
+p.sub {
+    color:#444444;
+    font-family: Verdana;
+    font-size:12px;
+    margin:0 0 5px 0;
+}
+div.postbox div.inside {
+    margin:10px;
+    position:relative;
+}
+
+#icl_show_source_top{
+    position:fixed;
+    margin-left:-10px;
+}
+#icl_show_source_wrap{
+    /*height:575px;*/    
+    /*width:805px;*/
+    /*overflow:auto;*/
+    /*margin-top:10px;*/
+
+}
+.icl_string_track_source pre{
+    /*width:800px;*/
+    /*height:575px;*/
+    height:100%;
+    font-family:Arial;
+    background-color:#fefefe;
+    border:1px solid #eee;
+}
+.icl_string_track_source ol{
+    line-height:10px;
+}
+.icl_string_track_source ol li{
+    font-size:10px;
+    margin:0;
+    list-style-position: inside;
+    padding:0;
+    line-height:0px;
+}
+.icl_string_track_source .icl_string_track_filename{
+    position:fixed;
+    /*top:663px;*/
+    /*z-index: 999;*/
+    font-size:10px;
+    margin:-25px 0 0 -5px;
+    color:#fff;
+    background-color: #222222;
+}
+
+.icl_string_track_url{
+    /*position:fixed;*/
+    /*top:663px;*/
+    /*z-index: 999;*/
+    font-size:10px;
+    /*width:810px !important;*/
+    height:16px;
+    overflow:hidden;
+    white-space:nowrap;
+    /*margin:0 0 -25px -5px;*/
+    /*color:#000;*/
+    /*background-color: #222222;    */
+}
+
+#colorPickerDiv{
+    background-color: #000;
+    color:#fff;
+    border:1px solid #000;
+}
+
+#icl_st_option_writes ul.icl_st_option_writes{
+    margin-left:20px;
+
+}
+
+.icl_st_admin_string{
+    -moz-border-radius: 4px;
+    padding:2px;
+    float: left;
+    margin-bottom: 5px;;
+}
+.icl_st_numeric{
+    background-color: #d5e8f9;
+    border: 1px solid #9bc8f0;
+}
+span.icl_st_numeric, span.icl_st_string{
+    padding:2px;
+    -moz-border-radius: 4px;
+}
+.icl_st_string{
+    background-color: #f3ece2;
+    border: 1px solid #c4a26f;
+}
+
+.icl_stow_head{
+    float:left;
+}
+
+#icl_st_options_write_success{
+    padding:4px;
+}
+a.icl_stow_toggler{
+    text-decoration: none;
+}
+
+#icl_st_ow_export_out{
+    display: none;
+}
+#icl_st_ow_export_out textarea{
+    width:100%;
+    height:200px;
+    font-size:10px;    
+}
+#icl_st_ow_export_close{
+    display: none;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/style.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/style.css
new file mode 100644
index 0000000..75a1ade
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/style.css
@@ -0,0 +1,184 @@
+.icl-account-setup{
+    width:70%;
+}
+.icl_form_errors{
+    border:1px solid #f00;
+    background-color: #ffb7b7;
+    color:#000;
+    width:65%;
+    padding: 5px;    
+    -moz-border-radius-bottomleft:3px;
+    -moz-border-radius-bottomright:3px;
+    -moz-border-radius-topleft:3px;
+    -moz-border-radius-topright:3px;
+}
+.icl_form_errors p{
+    line-height:1.5;
+    margin:0;
+}
+.icl_form_errors ul{
+    list-style: circle;
+    margin-left:20px;
+}
+.icl_form_success{
+    border:1px solid #fff;
+    background-color: #336600;
+    color:#fff;
+    width:65%;
+    padding: 5px;
+}
+.icl_error_text{
+    font-style: italic;
+    color:#f00;
+}
+.icl_valid_text{
+    font-style: italic;
+    color:#3f7257;    
+}
+
+.icl_ajx_response{
+    color:#E68A00;
+    display: none;    
+}
+
+#noupdate_but{
+    text-align: center;
+}
+
+.icl_yellow_box{
+    background-color: #FFFBCC; 
+    border: 1pt solid #E6DB55; 
+    padding: 1em; 
+    margin: 0em;
+}
+.icl_yellow_box p{
+    line-height:normal;    
+    margin:0 0 5px 0;
+}
+
+.icl_advanced_switch{
+    margin:-10px 0 10px 0;
+    font-size:85%;
+    text-align:right;
+}
+.icl_advanced_switch a{
+    text-decoration: none;
+}
+.icl_advanced_feature{
+    /*display:none;*/
+}
+
+#icl_translations_table{    
+    background-color: #f2f2f2;
+    margin: 0 5px 0 5px;
+}
+#icl_translations_table td{
+    font-size: 11px;
+    padding:5px;
+    background-color: #fcfcfc;
+}
+
+.icl_golden_button{
+    background-image:none;
+    background-color:#9a841e;
+    color:#fff;
+    text-shadow:0 1px 0 #000000;
+}
+
+.icl_golden_button:hover{
+    color:#fff;
+    border-color: #000;
+}
+
+#icl_post_add_notes h4{
+    background: url(../../res/img/notes.png) no-repeat;
+    padding: 5px 0 5px 20px;    
+    margin:10px 0px 0px 0px;
+}
+#icl_post_add_notes h4 a{
+    text-decoration: none;    
+}
+#icl_post_add_notes textarea, .icl_post_note textarea{
+    width:100%;   
+    font-size: 90%; 
+}
+#icl_post_note{
+    display: none;
+}
+#icl_tn_not_saved{
+    display: none;
+    color:#900;
+    text-align: center;
+}
+.icl_post_note{
+    display: none;
+}
+.icl_tn_progress{
+    display: none;
+}
+
+.icl_sidebar {
+    border: 1px solid #8cceea;
+    background-color: #eff8fc;
+    display: block;
+    float: right;
+    -moz-border-radius-bottomleft:5px;
+    -moz-border-radius-bottomright:5px;
+    -moz-border-radius-topleft:5px;
+    -moz-border-radius-topright:5px;
+    margin-bottom:10px;
+    margin-top:4px;
+    padding:3px 10px 3px 9px;
+    width:207px;
+}
+
+.icl_tick {
+    background-image: url(../img/ok.png);
+    background-repeat: no-repeat;
+    background-position: 0px 3px;
+    padding-left:20px;
+}
+
+.icl_info {
+    background-image: url(../img/sun-solid.png);
+    background-repeat: no-repeat;
+    background-position: 0px 0px;
+    padding-left:20px;
+}
+
+.icl_next_step {
+    padding-left:20px;
+}
+
+.icl_cyan_box{
+    border: 1px solid #8cceea;
+    background-color: #eff8fc;
+    padding:10px;    
+    margin-bottom:0px;
+    margin-top:25px;
+    -moz-border-radius-bottomleft:5px;
+    -moz-border-radius-bottomright:5px;
+    -moz-border-radius-topleft:5px;
+    -moz-border-radius-topright:5px;
+}
+
+.icl_cyan_box H3 { margin-top: 2px; }
+
+.icl_cyan_box ul{
+    margin-top:5px;
+    font-size: 11px;
+}
+
+.icl_new_feature {
+	margin: 5px;
+	padding: 3px 5px;
+	border-width: 1px;
+	border-style: solid;
+	-moz-border-radius: 5px;
+	-khtml-border-radius: 5px;
+	-webkit-border-radius: 5px;
+	border-radius: 5px;
+        border-color: #D54E21;
+        background-color: #D54E21;
+        color: #FFFFFF;
+}
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/support.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/support.css
new file mode 100644
index 0000000..58c6ab0
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/support.css
@@ -0,0 +1,63 @@
+#icl_support_subscriptions .info td, #icl_support_subscriptions .title td {
+	padding: 5px 10px;
+	border-bottom: 1px solid #eee;
+}
+#icl_support_subscriptions tr.info {
+	background-color: #fff;
+}
+#icl_support_subscriptions .title td, #icl_support_subscriptions .buy-link td {
+	background-color: #F0F0F0;
+}
+#icl_support_subscriptions tr.title td.first {
+	-moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px;
+}
+#icl_support_subscriptions tr.title td.last {
+	-moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px;
+}
+
+#icl_support_subscriptions tr.buy-link td.first {
+	-moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px;
+}
+#icl_support_subscriptions tr.buy-link td.last {
+	-moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px;
+}
+#icl_support_subscriptions .info td.first {
+	width: 200px;
+	border-left: 1px solid #eee;
+}
+#icl_support_subscriptions .info td.last {
+	border-right: 1px solid #eee;
+}
+#icl_support_subscriptions .title td h2 {
+	color: #1376B0;
+	font-size: 1.5em;
+}
+#icl_support_subscriptions .title .smaller-heading h2 {
+	color: #969696;
+	font-size: 1.2em;
+}
+#icl_support_subscriptions .buy-link td {
+	height: 60px;
+}
+#icl_support_subscriptions .buy-link a, #icl_support_subscriptions .buy-link a:visited,
+.icl_support_toggle_link, .icl_support_toggle_link:visited,
+.icl_support_create_ticket_link, .icl_support_create_ticket_link:visited,
+.icl_support_buy_link, .icl_support_buy_link:visited {
+	background-color: #F96C10;
+	color: #fff;
+	-moz-border-radius: 10px;
+	-webkit-border-radius: 10px;
+	border: 1px solid #eee;
+	padding: 10px;
+	margin: 20px 0;
+	text-decoration: none;
+	font-weight: bold;
+}
+#icl_support_subscriptions .buy-link a:hover,
+.icl_support_toggle_link:hover,
+.icl_support_create_ticket_link:hover,
+.icl_support_buy_link:hover {
+	background-color: #F9AD11;
+	text-decoration: none;
+	color: #fff;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/theme-localization.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/theme-localization.css
new file mode 100644
index 0000000..19a91dd
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/theme-localization.css
@@ -0,0 +1,14 @@
+.icon32{
+    background: transparent url(../img/icon.png) no-repeat !important;    
+}
+.icon32_adv{
+    background: transparent url(../img/icon_adv.png) no-repeat !important;    
+}
+#icl_theme_localization input{
+    font-size: 80%;
+}
+
+#icl_tl_scan_stats{
+    display: none;
+    font-size:10px;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/translation-synchronization.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/translation-synchronization.css
new file mode 100644
index 0000000..e59c6fe
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/translation-synchronization.css
@@ -0,0 +1,26 @@
+.icon32{
+    background: transparent url(../img/icon.png) no-repeat !important;    
+}
+.icon32_adv{
+    background: transparent url(../img/icon_adv.png) no-repeat !important;    
+}
+#icl_plugin_texts_wrapper .postbox-container{
+    width:100%!important;
+}
+div.postbox div.inside {
+    margin:10px;
+    position:relative;
+}
+#icl_plugin_texts_wrapper .widefat th{
+    line-height: 1em;
+    padding:4px;
+    color:#555;
+}
+
+#icl_custom_posts_sync_options, #icl_custom_tax_sync_options{
+    width:49%;
+    float:left;    
+}
+#icl_custom_posts_sync_options{
+    margin-right:2%;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/css/wp-nav-menus.css b/wp-content/plugins/sitepress-multilingual-cms/res/css/wp-nav-menus.css
new file mode 100644
index 0000000..a4f2d14
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/css/wp-nav-menus.css
@@ -0,0 +1,14 @@
+.icl_nav_menu_text{
+    font-size:11px;
+    font-style:normal;
+}
+
+.icl_lang_menu a{
+    text-decoration: none;
+}
+.icl_lang_menu a:hover{
+    text-decoration: underline;
+}
+.icl_lang_menu a.current{
+    font-weight: bold;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ad.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ad.alt.png
new file mode 100644
index 0000000..549c69b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ad.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ad.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ad.png
new file mode 100644
index 0000000..854f31b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ad.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ae.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ae.png
new file mode 100644
index 0000000..cdd6974
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ae.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/af.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/af.png
new file mode 100644
index 0000000..65c8a05
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/af.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ag.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ag.png
new file mode 100644
index 0000000..84cd081
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ag.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ai.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ai.alt.png
new file mode 100644
index 0000000..756dbd0
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ai.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ai.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ai.png
new file mode 100644
index 0000000..9c28449
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ai.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/al.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/al.png
new file mode 100644
index 0000000..468af2f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/al.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/am.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/am.png
new file mode 100644
index 0000000..1a5afaa
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/am.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/an.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/an.png
new file mode 100644
index 0000000..b69a20f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/an.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ao.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ao.png
new file mode 100644
index 0000000..519ebe7
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ao.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/aq.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/aq.png
new file mode 100644
index 0000000..3038814
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/aq.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ar.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ar.alt.png
new file mode 100644
index 0000000..14eb6c9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ar.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ar.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ar.png
new file mode 100644
index 0000000..f20b48a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ar.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/as.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/as.png
new file mode 100644
index 0000000..d3c76f2
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/as.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/at.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/at.alt.png
new file mode 100644
index 0000000..1bf0bcf
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/at.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/at.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/at.png
new file mode 100644
index 0000000..91b3164
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/at.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/au.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/au.png
new file mode 100644
index 0000000..6d744e8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/au.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/aw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/aw.png
new file mode 100644
index 0000000..90f27db
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/aw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ax.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ax.png
new file mode 100644
index 0000000..46882df
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ax.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/az.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/az.png
new file mode 100644
index 0000000..94f6a80
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/az.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ba.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ba.png
new file mode 100644
index 0000000..6ccf43b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ba.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bb.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bb.png
new file mode 100644
index 0000000..ad17934
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bb.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bd.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bd.png
new file mode 100644
index 0000000..50b7ab1
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bd.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/be.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/be.png
new file mode 100644
index 0000000..391f297
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/be.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bf.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bf.png
new file mode 100644
index 0000000..e4a475c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bf.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bg.png
new file mode 100644
index 0000000..86b4095
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bh.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bh.png
new file mode 100644
index 0000000..b69137b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bh.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bi.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bi.alt.png
new file mode 100644
index 0000000..bb792ec
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bi.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bi.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bi.png
new file mode 100644
index 0000000..63eaa64
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bi.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bj.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bj.png
new file mode 100644
index 0000000..7f8ab79
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bj.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bm.png
new file mode 100644
index 0000000..75f07c4
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bn.png
new file mode 100644
index 0000000..0bf4bc8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bo.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bo.png
new file mode 100644
index 0000000..738fb06
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bo.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/br.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/br.png
new file mode 100644
index 0000000..e761b6f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/br.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bs.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bs.png
new file mode 100644
index 0000000..fbc906d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bs.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bt.png
new file mode 100644
index 0000000..4c2ca86
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bv.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bv.png
new file mode 100644
index 0000000..16ba1d8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bv.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bw.png
new file mode 100644
index 0000000..06eb019
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/by.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/by.png
new file mode 100644
index 0000000..147a632
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/by.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/bz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bz.png
new file mode 100644
index 0000000..c7609e6
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/bz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ca.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ca.png
new file mode 100644
index 0000000..c7a5993
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ca.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cc.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cc.alt.png
new file mode 100644
index 0000000..5d930a2
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cc.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cc.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cc.png
new file mode 100644
index 0000000..6d744e8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cc.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cd.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cd.png
new file mode 100644
index 0000000..cdfdc6f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cd.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cf.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cf.png
new file mode 100644
index 0000000..b461629
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cf.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cg.png
new file mode 100644
index 0000000..bf35566
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ch.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ch.png
new file mode 100644
index 0000000..f538dc9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ch.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ci.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ci.png
new file mode 100644
index 0000000..9d02883
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ci.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ck.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ck.png
new file mode 100644
index 0000000..cf7dca9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ck.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cl.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cl.png
new file mode 100644
index 0000000..48cef7e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cl.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cm.png
new file mode 100644
index 0000000..3e7adb8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cn.png
new file mode 100644
index 0000000..1cc62eb
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/co.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/co.png
new file mode 100644
index 0000000..f8ca2e6
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/co.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cr.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cr.alt.png
new file mode 100644
index 0000000..502955d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cr.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cr.png
new file mode 100644
index 0000000..afd2879
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cs.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cs.png
new file mode 100644
index 0000000..241427b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cs.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cu.png
new file mode 100644
index 0000000..62d57ad
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cv.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cv.png
new file mode 100644
index 0000000..684647b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cv.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cx.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cx.png
new file mode 100644
index 0000000..c2c94c7
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cx.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cy.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cy.png
new file mode 100644
index 0000000..a3f6a83
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cy.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/cz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cz.png
new file mode 100644
index 0000000..241427b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/cz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/da.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/da.png
new file mode 100644
index 0000000..8edd11f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/da.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/de.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/de.png
new file mode 100644
index 0000000..cbc046f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/de.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/dj.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/dj.png
new file mode 100644
index 0000000..a9fc74a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/dj.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/dk.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/dk.png
new file mode 100644
index 0000000..8edd11f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/dk.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/dm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/dm.png
new file mode 100644
index 0000000..79819dd
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/dm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/do.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/do.png
new file mode 100644
index 0000000..f76e8b3
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/do.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/dz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/dz.png
new file mode 100644
index 0000000..44ca81c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/dz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ec.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ec.alt.png
new file mode 100644
index 0000000..ab2bd48
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ec.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ec.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ec.png
new file mode 100644
index 0000000..16ba832
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ec.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/eg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/eg.png
new file mode 100644
index 0000000..c96f3e8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/eg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/eh.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/eh.alt.png
new file mode 100644
index 0000000..ed82489
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/eh.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/eh.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/eh.png
new file mode 100644
index 0000000..989d0f8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/eh.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/el.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/el.png
new file mode 100644
index 0000000..d6e4cae
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/el.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png
new file mode 100644
index 0000000..9afcef0
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/er.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/er.png
new file mode 100644
index 0000000..041652a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/er.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/es.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/es.alt.png
new file mode 100644
index 0000000..3410318
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/es.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/es.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/es.png
new file mode 100644
index 0000000..b88229b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/es.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.alt.png
new file mode 100644
index 0000000..9282a07
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.o.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.o.png
new file mode 100644
index 0000000..993c85c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.o.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.png
new file mode 100644
index 0000000..0dc18aa
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/et.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/eu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/eu.png
new file mode 100644
index 0000000..49dfe59
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/eu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/fa.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fa.png
new file mode 100644
index 0000000..960e8e5
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fa.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/fi.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fi.png
new file mode 100644
index 0000000..63de3b6
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fi.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/fj.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fj.png
new file mode 100644
index 0000000..cb5d6dd
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fj.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/fk.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fk.png
new file mode 100644
index 0000000..30c8d5e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fk.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/fm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fm.png
new file mode 100644
index 0000000..7cbc148
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/fo.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fo.png
new file mode 100644
index 0000000..32e8d81
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fo.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/fr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fr.png
new file mode 100644
index 0000000..b70610c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/fr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ga.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ga.png
new file mode 100644
index 0000000..67cc759
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ga.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gb.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gb.png
new file mode 100644
index 0000000..9afcef0
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gb.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gd.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gd.png
new file mode 100644
index 0000000..5b7ddbd
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gd.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ge.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ge.png
new file mode 100644
index 0000000..81a1a56
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ge.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gf.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gf.png
new file mode 100644
index 0000000..965d154
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gf.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gg.png
new file mode 100644
index 0000000..2c4bf64
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gh.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gh.png
new file mode 100644
index 0000000..7d308f0
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gh.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gi.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gi.png
new file mode 100644
index 0000000..8799ce8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gi.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gl.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gl.png
new file mode 100644
index 0000000..b74f4de
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gl.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gm.png
new file mode 100644
index 0000000..cff1917
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gn.png
new file mode 100644
index 0000000..9d7923c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gp.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gp.png
new file mode 100644
index 0000000..965d154
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gp.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gq.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gq.png
new file mode 100644
index 0000000..784ae06
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gq.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gr.png
new file mode 100644
index 0000000..d6e4cae
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gs.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gs.png
new file mode 100644
index 0000000..f8cd954
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gs.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gt.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gt.alt.png
new file mode 100644
index 0000000..ac90233
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gt.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gt.png
new file mode 100644
index 0000000..6232dc9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gu.png
new file mode 100644
index 0000000..b9afa18
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gw.png
new file mode 100644
index 0000000..2808ec7
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/gy.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gy.png
new file mode 100644
index 0000000..d2334ce
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/gy.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/he.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/he.png
new file mode 100644
index 0000000..097a517
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/he.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/hi.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hi.png
new file mode 100644
index 0000000..9e69653
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hi.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/hk.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hk.png
new file mode 100644
index 0000000..0bb8ceb
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hk.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/hm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hm.png
new file mode 100644
index 0000000..e78c454
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/hn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hn.png
new file mode 100644
index 0000000..c7e8f78
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/hr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hr.png
new file mode 100644
index 0000000..197ac97
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ht.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ht.alt.png
new file mode 100644
index 0000000..cc46032
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ht.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ht.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ht.png
new file mode 100644
index 0000000..968b331
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ht.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/hu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hu.png
new file mode 100644
index 0000000..2f7aec3
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/hy.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hy.png
new file mode 100644
index 0000000..1a5afaa
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/hy.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/id.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/id.png
new file mode 100644
index 0000000..3e06638
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/id.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ie.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ie.png
new file mode 100644
index 0000000..67cc759
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ie.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/il.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/il.png
new file mode 100644
index 0000000..097a517
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/il.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/im.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/im.png
new file mode 100644
index 0000000..f23f043
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/im.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/in.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/in.png
new file mode 100644
index 0000000..9e69653
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/in.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/io.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/io.png
new file mode 100644
index 0000000..7792b41
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/io.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/iq.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/iq.png
new file mode 100644
index 0000000..44e76f9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/iq.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ir.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ir.png
new file mode 100644
index 0000000..960e8e5
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ir.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/is.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/is.png
new file mode 100644
index 0000000..a3f7ec6
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/is.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/it.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/it.png
new file mode 100644
index 0000000..18edfe4
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/it.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ja.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ja.png
new file mode 100644
index 0000000..f49fbad
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ja.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/je.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/je.png
new file mode 100644
index 0000000..3823105
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/je.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/jm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/jm.png
new file mode 100644
index 0000000..eb742b4
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/jm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/jo.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/jo.png
new file mode 100644
index 0000000..71f219b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/jo.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/jp.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/jp.png
new file mode 100644
index 0000000..f49fbad
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/jp.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ke.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ke.png
new file mode 100644
index 0000000..3e581b1
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ke.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/kg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kg.png
new file mode 100644
index 0000000..b500a17
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/kh.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kh.png
new file mode 100644
index 0000000..56323bd
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kh.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ki.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ki.png
new file mode 100644
index 0000000..d838b31
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ki.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/km.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/km.png
new file mode 100644
index 0000000..6988d7d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/km.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/kn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kn.png
new file mode 100644
index 0000000..4b10243
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ko.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ko.png
new file mode 100644
index 0000000..4b5be36
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ko.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/kp.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kp.png
new file mode 100644
index 0000000..70a166b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kp.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/kr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kr.png
new file mode 100644
index 0000000..4b5be36
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ku.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ku.png
new file mode 100644
index 0000000..02b1c9b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ku.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/kw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kw.png
new file mode 100644
index 0000000..dd51256
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ky.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ky.png
new file mode 100644
index 0000000..fb7cbe8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ky.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/kz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kz.png
new file mode 100644
index 0000000..61fe983
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/kz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/la.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/la.png
new file mode 100644
index 0000000..572491f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/la.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/lb.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lb.png
new file mode 100644
index 0000000..f95124a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lb.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/lc.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lc.png
new file mode 100644
index 0000000..4264fb9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lc.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/li.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/li.png
new file mode 100644
index 0000000..68183e7
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/li.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/lk.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lk.png
new file mode 100644
index 0000000..eee913f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lk.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/lr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lr.png
new file mode 100644
index 0000000..ea4c546
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ls.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ls.png
new file mode 100644
index 0000000..2a67458
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ls.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/lt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lt.png
new file mode 100644
index 0000000..9a4cb93
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/lu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lu.png
new file mode 100644
index 0000000..c7320ba
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/lv.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lv.png
new file mode 100644
index 0000000..af056c4
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/lv.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ly.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ly.png
new file mode 100644
index 0000000..94310ec
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ly.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ma.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ma.png
new file mode 100644
index 0000000..4cd4515
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ma.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mc.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mc.png
new file mode 100644
index 0000000..d18e847
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mc.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/md.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/md.png
new file mode 100644
index 0000000..71f82f8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/md.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/me.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/me.png
new file mode 100644
index 0000000..427f5b1
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/me.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mg.png
new file mode 100644
index 0000000..912d61e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mh.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mh.png
new file mode 100644
index 0000000..17fe571
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mh.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mk.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mk.png
new file mode 100644
index 0000000..91badb4
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mk.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ml.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ml.png
new file mode 100644
index 0000000..c726417
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ml.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mm.png
new file mode 100644
index 0000000..f7d114e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mn.png
new file mode 100644
index 0000000..87db0fa
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mo.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mo.png
new file mode 100644
index 0000000..615e8d4
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mo.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mp.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mp.png
new file mode 100644
index 0000000..1a0c3a3
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mp.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mq.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mq.png
new file mode 100644
index 0000000..b70610c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mq.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mr.png
new file mode 100644
index 0000000..e5d6d54
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ms.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ms.png
new file mode 100644
index 0000000..62c06e8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ms.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mt.png
new file mode 100644
index 0000000..abb043c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mu.png
new file mode 100644
index 0000000..ff084e2
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mv.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mv.png
new file mode 100644
index 0000000..e4edb89
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mv.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mw.png
new file mode 100644
index 0000000..07e7f7d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mx.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mx.png
new file mode 100644
index 0000000..563457f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mx.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/my.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/my.png
new file mode 100644
index 0000000..3875e9e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/my.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/mz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mz.png
new file mode 100644
index 0000000..7a83aa7
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/mz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/na.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/na.png
new file mode 100644
index 0000000..7c06080
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/na.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/nb.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nb.png
new file mode 100644
index 0000000..3042d52
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nb.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/nc.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nc.png
new file mode 100644
index 0000000..6258268
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nc.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ne.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ne.png
new file mode 100644
index 0000000..7d2299e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ne.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/nf.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nf.png
new file mode 100644
index 0000000..e229c9d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nf.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ng.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ng.png
new file mode 100644
index 0000000..e62540d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ng.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ni.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ni.alt.png
new file mode 100644
index 0000000..1890f25
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ni.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ni.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ni.png
new file mode 100644
index 0000000..39af7b9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ni.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/nil.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nil.png
new file mode 100644
index 0000000..e34a25e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nil.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/nl.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nl.png
new file mode 100644
index 0000000..3d7afb2
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nl.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/no.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/no.png
new file mode 100644
index 0000000..3042d52
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/no.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/np.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/np.png
new file mode 100644
index 0000000..610bff1
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/np.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/nr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nr.png
new file mode 100644
index 0000000..6764c3a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/nu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nu.png
new file mode 100644
index 0000000..6e43a39
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/nz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nz.png
new file mode 100644
index 0000000..600bfef
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/nz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/om.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/om.png
new file mode 100644
index 0000000..6fc2b3e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/om.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pa.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pa.png
new file mode 100644
index 0000000..d37c3ad
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pa.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pe.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pe.png
new file mode 100644
index 0000000..46a37d8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pe.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pf.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pf.alt.png
new file mode 100644
index 0000000..5ae8dea
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pf.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pf.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pf.png
new file mode 100644
index 0000000..598bf57
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pf.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pg.png
new file mode 100644
index 0000000..c8abf5c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ph.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ph.png
new file mode 100644
index 0000000..e00ea47
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ph.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pk.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pk.png
new file mode 100644
index 0000000..782fe94
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pk.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pl.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pl.png
new file mode 100644
index 0000000..e35d633
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pl.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pm.png
new file mode 100644
index 0000000..598bf57
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pn.png
new file mode 100644
index 0000000..ea7618b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pr.png
new file mode 100644
index 0000000..0b08336
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ps.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ps.png
new file mode 100644
index 0000000..ec4bca3
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ps.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt-br.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt-br.png
new file mode 100644
index 0000000..e761b6f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt-br.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt-pt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt-pt.png
new file mode 100644
index 0000000..0843f33
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt-pt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt.png
new file mode 100644
index 0000000..0843f33
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/pw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pw.png
new file mode 100644
index 0000000..ee9188f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/pw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/py.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/py.png
new file mode 100644
index 0000000..45f1273
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/py.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/qa.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/qa.png
new file mode 100644
index 0000000..ecd8033
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/qa.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/re.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/re.png
new file mode 100644
index 0000000..598bf57
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/re.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ro.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ro.png
new file mode 100644
index 0000000..5ea0330
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ro.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ru.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ru.png
new file mode 100644
index 0000000..4efd00c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ru.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/rw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/rw.png
new file mode 100644
index 0000000..5ccb913
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/rw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sa.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sa.png
new file mode 100644
index 0000000..93b753d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sa.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sb.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sb.png
new file mode 100644
index 0000000..6da8c86
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sb.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sc.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sc.png
new file mode 100644
index 0000000..832aaeb
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sc.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sd.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sd.png
new file mode 100644
index 0000000..0783a25
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sd.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sg.png
new file mode 100644
index 0000000..4534fe4
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sh.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sh.png
new file mode 100644
index 0000000..aba66cf
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sh.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/si.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/si.png
new file mode 100644
index 0000000..8238515
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/si.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sj.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sj.png
new file mode 100644
index 0000000..3042d52
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sj.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sl-wrong.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sl-wrong.png
new file mode 100644
index 0000000..be8f6ef
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sl-wrong.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sl.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sl.png
new file mode 100644
index 0000000..92c6fd5
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sl.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sm.png
new file mode 100644
index 0000000..3230cfb
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sn.png
new file mode 100644
index 0000000..bdff9dd
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/so.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/so.png
new file mode 100644
index 0000000..d75b71e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/so.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sq.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sq.png
new file mode 100644
index 0000000..468af2f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sq.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sr.png
new file mode 100644
index 0000000..86b11a1
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/st.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/st.png
new file mode 100644
index 0000000..b28733d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/st.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sv.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sv.png
new file mode 100644
index 0000000..4736ec4
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sv.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sy.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sy.png
new file mode 100644
index 0000000..cfafea5
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sy.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/sz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sz.png
new file mode 100644
index 0000000..ec5dfe2
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/sz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ta.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ta.png
new file mode 100644
index 0000000..49db0c3
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ta.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tc.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tc.png
new file mode 100644
index 0000000..5ce2c4d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tc.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/td.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/td.png
new file mode 100644
index 0000000..b836b07
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/td.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tf.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tf.png
new file mode 100644
index 0000000..6258268
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tf.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tg.png
new file mode 100644
index 0000000..c4856f8
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/th.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/th.png
new file mode 100644
index 0000000..230fc6b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/th.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tj.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tj.png
new file mode 100644
index 0000000..6913f85
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tj.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tk.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tk.png
new file mode 100644
index 0000000..0a7f86b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tk.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tl.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tl.png
new file mode 100644
index 0000000..a82ff8a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tl.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tm.png
new file mode 100644
index 0000000..ebc4f80
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tn.png
new file mode 100644
index 0000000..49db0c3
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/to.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/to.png
new file mode 100644
index 0000000..6a2e263
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/to.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tr.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tr.png
new file mode 100644
index 0000000..0e1a4fd
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tr.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tt.png
new file mode 100644
index 0000000..6dc6794
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tv.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tv.png
new file mode 100644
index 0000000..2c596eb
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tv.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tw.png
new file mode 100644
index 0000000..a0c6cb2
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/tz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tz.png
new file mode 100644
index 0000000..2cb8a4d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/tz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ug.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ug.png
new file mode 100644
index 0000000..2b1370a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ug.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/uk.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/uk.png
new file mode 100644
index 0000000..0c167c9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/uk.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/uk_.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/uk_.png
new file mode 100644
index 0000000..9afcef0
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/uk_.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/um.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/um.png
new file mode 100644
index 0000000..a7b1c5b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/um.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ur.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ur.png
new file mode 100644
index 0000000..782fe94
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ur.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/us.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/us.png
new file mode 100644
index 0000000..df0bff2
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/us.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/uy.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/uy.png
new file mode 100644
index 0000000..fb03073
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/uy.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/uz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/uz.png
new file mode 100644
index 0000000..61fa072
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/uz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/va.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/va.png
new file mode 100644
index 0000000..aa63a6d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/va.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/vc.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vc.png
new file mode 100644
index 0000000..d698edf
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vc.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ve.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ve.png
new file mode 100644
index 0000000..80a5837
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ve.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/vg.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vg.png
new file mode 100644
index 0000000..9312c74
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vg.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/vi.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vi.png
new file mode 100644
index 0000000..6951143
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vi.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/vn.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vn.png
new file mode 100644
index 0000000..41c7992
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vn.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/vu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vu.png
new file mode 100644
index 0000000..de3f3a0
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/vu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/wf.alt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/wf.alt.png
new file mode 100644
index 0000000..1b84d7f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/wf.alt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/wf.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/wf.png
new file mode 100644
index 0000000..6258268
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/wf.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ws.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ws.png
new file mode 100644
index 0000000..b04789e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ws.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/ye.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ye.png
new file mode 100644
index 0000000..eb2cc9c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/ye.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/yi.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/yi.png
new file mode 100644
index 0000000..097a517
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/yi.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/yt.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/yt.png
new file mode 100644
index 0000000..598bf57
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/yt.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/yu.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/yu.png
new file mode 100644
index 0000000..8864e32
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/yu.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/za.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/za.png
new file mode 100644
index 0000000..b647b0f
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/za.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/zh-hans.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zh-hans.png
new file mode 100644
index 0000000..1cc62eb
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zh-hans.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/zh-hant.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zh-hant.png
new file mode 100644
index 0000000..1cc62eb
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zh-hant.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/zm.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zm.png
new file mode 100644
index 0000000..2d6470d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zm.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/zw.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zw.png
new file mode 100644
index 0000000..42a300e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zw.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/flags/zz.png b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zz.png
new file mode 100644
index 0000000..b4c5191
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/flags/zz.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/add_translation.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/add_translation.png
new file mode 100644
index 0000000..3ad9375
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/add_translation.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/ajax-loader.gif b/wp-content/plugins/sitepress-multilingual-cms/res/img/ajax-loader.gif
new file mode 100644
index 0000000..d0bce15
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/ajax-loader.gif differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/alert.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/alert.png
new file mode 100644
index 0000000..9ed6449
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/alert.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/documents.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/documents.png
new file mode 100644
index 0000000..3d12108
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/documents.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/dollar1.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/dollar1.png
new file mode 100644
index 0000000..4cfbe3b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/dollar1.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/dollar2.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/dollar2.png
new file mode 100644
index 0000000..46ce8ac
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/dollar2.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/edit_translation.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/edit_translation.png
new file mode 100644
index 0000000..f3c6514
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/edit_translation.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/icon.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/icon.png
new file mode 100644
index 0000000..46183e3
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/icon.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/icon16.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/icon16.png
new file mode 100644
index 0000000..bc382d6
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/icon16.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/icon_adv.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/icon_adv.png
new file mode 100755
index 0000000..5894abb
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/icon_adv.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/icon_color_picker.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/icon_color_picker.png
new file mode 100644
index 0000000..9273bdd
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/icon_color_picker.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/info.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/info.png
new file mode 100644
index 0000000..fc0605d
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/info.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/nav-arrow-down.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/nav-arrow-down.png
new file mode 100644
index 0000000..63a734b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/nav-arrow-down.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/notes.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/notes.png
new file mode 100644
index 0000000..0842259
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/notes.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/ok.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/ok.png
new file mode 100644
index 0000000..f6ce8f0
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/ok.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/question-green.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/question-green.png
new file mode 100644
index 0000000..722df92
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/question-green.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/question1.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/question1.png
new file mode 100644
index 0000000..917df29
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/question1.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/question2.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/question2.png
new file mode 100644
index 0000000..9614771
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/question2.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/sun-solid.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/sun-solid.png
new file mode 100644
index 0000000..1155095
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/sun-solid.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/view-in-page.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/view-in-page.png
new file mode 100755
index 0000000..888d719
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/view-in-page.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/view-in-source.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/view-in-source.png
new file mode 100755
index 0000000..91ce8e9
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/view-in-source.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/web_logo_large.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/web_logo_large.png
new file mode 100644
index 0000000..2675d1c
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/web_logo_large.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/web_logo_small.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/web_logo_small.png
new file mode 100644
index 0000000..fdc1470
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/web_logo_small.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/img/yes.png b/wp-content/plugins/sitepress-multilingual-cms/res/img/yes.png
new file mode 100644
index 0000000..2f86f0a
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/res/img/yes.png differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/absolute-links.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/absolute-links.js
new file mode 100644
index 0000000..bf46000
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/absolute-links.js
@@ -0,0 +1,54 @@
+jQuery(document).ready(function(){    
+    jQuery('a[href="#revert-links"]').click(function(){
+        jQuery('#icl_ajax_loader_alp').html(icl_ajxloaderimg);
+        jQuery('#icl_alp_wrap').load(location.href + ' #icl_alp_wrap',{icl_enable_alp:1,ilc_enable_alp_onetime:1}, function(){
+            jQuery('#icl_ajax_loader_alp').html('');
+            alp_do_revert_urls();
+        });
+    });
+    
+    jQuery('#icl_enable_absolute_links,#icl_disable_absolute_links').click(iclToggleAbsoluteLinks);
+    jQuery('#icl_save_sl_options').submit(iclSaveForm);
+    
+});
+
+function alp_do_revert_urls(){
+    jQuery('#alp_revert_urls').attr('disabled','disabled');
+    jQuery('#alp_revert_urls').attr('value','Running');
+    jQuery.ajax({
+        type: "POST",
+        url: location.href,
+        data: "alp_ajx_action=alp_revert_urls",
+        success: function(msg){                                                    
+            if(-1==msg || msg==0){
+                jQuery('#alp_ajx_ldr_2').fadeOut();
+                jQuery('#alp_rev_items_left').html('');
+                window.clearTimeout(req_rev_timer);
+                jQuery('#alp_revert_urls').removeAttr('disabled');                            
+                jQuery('#alp_revert_urls').attr('value','Start');                            
+                jQuery('#icl_alp_wrap').load(location.href + ' #icl_alp_wrap',{icl_enable_alp:0}, function(){jQuery('#icl_ajax_loader_alp').html('');});
+            }else{
+                jQuery('#alp_rev_items_left').html(msg + ' items left');
+                req_rev_timer = window.setTimeout(alp_do_revert_urls,3000);
+                jQuery('#alp_ajx_ldr_2').fadeIn();
+            }                            
+        },
+        error: function (msg){
+            //alert('Something went wrong');
+        }                                                            
+    });
+    return false;
+}
+
+function iclToggleAbsoluteLinks(){
+    var val = jQuery(this).attr('id')=='icl_enable_absolute_links'?1:0;
+    if(!val && !confirm(jQuery('#icl_toggle_ct_confirm_message').html())){
+        return false;
+    }else{
+        if(val){
+            jQuery('#icl_alp_wrap').load(location.href + ' #icl_alp_wrap',{icl_enable_alp:1}, function(){jQuery('#icl_ajax_loader_alp').html('');location.reload()});
+        }else{
+            jQuery('#icl_alp_wrap').load(location.href + ' #icl_alp_wrap',{icl_enable_alp:0}, function(){jQuery('#icl_ajax_loader_alp').html('');location.href=jQuery('#icl_overview_url').html()});
+        }
+    }
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/affiliate-info.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/affiliate-info.js
new file mode 100644
index 0000000..fc8f4ff
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/affiliate-info.js
@@ -0,0 +1,23 @@
+jQuery(document).ready(function(){
+    jQuery('#icl_affiliate_info_check').submit(iclAffiliateInfoCheck);    
+});
+
+function iclAffiliateInfoCheck(){
+    var thisf = jQuery(this);
+    thisf.find('.icl_cyan_box').hide();
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            dataType: 'json',
+            data: "icl_ajx_action=affiliate_info_check&" + thisf.serialize(),
+            success: function(msg){
+                if(msg.error){
+                    thisf.find('.icl_error_text').fadeIn();
+                }else{
+                    thisf.find('.icl_valid_text').fadeIn();
+                }
+            }
+        });        
+    
+    return false;
+}
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/categories.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/categories.js
new file mode 100644
index 0000000..8caf817
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/categories.js
@@ -0,0 +1,68 @@
+jQuery(document).ready(function(){  
+    /* preWP3 compatibility  - start */
+    if(jQuery('form[name="addcat"]').length || jQuery('form[name="editcat"]').length){
+        if(jQuery('form[name="addcat"]').html()){
+            jQuery('form[name="addcat"] p[class="submit"]').before(jQuery('#icl_tax_menu').html());    
+        }else{
+            jQuery('form[name="editcat"] table[class="form-table"]').append(jQuery('form[name="editcat"] table[class="form-table"] tr:last').clone());    
+            jQuery('form[name="editcat"] table[class="form-table"] tr:last th:first').html('&nbsp;');
+            jQuery('form[name="editcat"] table[class="form-table"] tr:last td:last').html(jQuery('#icl_tax_menu').html());
+        }    
+    }else
+    /* preWP3 compatibility  - end */
+    {
+        if(jQuery('#addtag').html()){
+            jQuery('#addtag p[class="submit"]').before(jQuery('#icl_category_menu').html());    
+        }else{
+            jQuery('#edittag table[class="form-table"]').append(jQuery('form[name="editcat"] table[class="form-table"] tr:last').clone());    
+            jQuery('#edittag table[class="form-table"] tr:last th:first').html('&nbsp;');
+            jQuery('#edittag table[class="form-table"] tr:last td:last').html(jQuery('#icl_category_menu').html());
+        }    
+    }
+    
+    jQuery('#icl_tax_menu').remove();
+   
+   jQuery('select[name="icl_category_language"]').change(function(){
+    
+        var lang = jQuery(this).val();
+        var ajx = location.href.replace(/#(.*)$/,'');
+        ajx = ajx.replace(/pagenum=([0-9]+)/,'');
+        if(-1 == location.href.indexOf('?')){
+            url_glue='?';
+        }else{
+            url_glue='&';
+        }
+        
+        if(icl_this_lang != lang){
+            jQuery('#icl_translate_options').fadeOut();
+        }else{
+            jQuery('#icl_translate_options').fadeIn();
+        }
+        
+        jQuery('#posts-filter').parent().load(ajx+url_glue+'lang='+lang + ' #posts-filter', {}, function(resp){
+            strt = resp.indexOf('<span id="icl_subsubsub">');
+            endd = resp.indexOf('</span>\'', strt);
+            lsubsub = resp.substr(strt,endd-strt+7);
+            jQuery('table.widefat').before(lsubsub);            
+                         
+            start_sel = resp.indexOf('<select name=\'category_parent\' id=\'category_parent\' class=\'postform\' >');
+            end_sel = resp.indexOf('</select>', start_sel);
+            sel_sel = resp.substr(start_sel+70, end_sel-start_sel-70);            
+            jQuery('#category_parent').html(sel_sel)
+            
+        });        
+   })
+   
+});
+
+/*
+ jQuery(function($) {
+	var addAfter3 = function( r, settings ) {
+            jQuery('#icon-edit').remove();
+	}
+        
+	$('#the-list').wpList( { addAfter: addAfter3} );
+        
+
+});
+*/
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/comments-translation.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/comments-translation.js
new file mode 100644
index 0000000..14d81c3
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/comments-translation.js
@@ -0,0 +1,82 @@
+jQuery(document).ready(function(){
+    jQuery('#icl_ct_user_pref').submit(iclSaveForm);
+    
+    jQuery('.icl_original_comment_link').live('click', iclShowOriginalComment);
+    var icl_preload_ajx_img = new Image(16,16);
+    icl_preload_ajx_img.src = icl_ajxloaderimg_src;
+});
+
+var icl_anchor_original_text = 0;
+function iclShowOriginalComment(){
+    var cid = jQuery(this).attr('href').replace(/#c/,'');
+    
+    if(jQuery('#comment-'+cid).length){
+        var ctr = jQuery('#comment-'+cid);    
+    }else if(jQuery('.comments-box').length){
+        var ctr = jQuery('.comments-box');    
+    }
+    
+    if(ctr.find('#submitted-on').next().length){
+        var icl_comment_place = ctr.find('#submitted-on').next();
+    }else if(ctr.find('.dashboard-comment-wrap blockquote')){
+        var icl_comment_place = ctr.find('.dashboard-comment-wrap blockquote');
+    }
+    
+    icl_comment_place.html(icl_ajxloaderimg);    
+    
+    jthis = jQuery(this);
+    if(!icl_anchor_original_text){
+        icl_anchor_original_text = jthis.html();
+    }    
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        dataType: 'json',
+        data: "icl_ajx_action=get_original_comment&comment_id="+cid,
+        success: function(ret){
+
+            icl_comment_place.html(ret['comment_content']);
+            
+            var edit_link = ctr.find('.row-actions span.edit a');
+            edit_link.attr('href', edit_link.attr('href').replace(/&c=[0-9]+/,'&c='+ret['comment_ID']));
+            
+            var quick_edit_link = ctr.find('.quickedit a');
+            quick_edit_link.unbind('click');
+            quick_edit_link.bind('click', function(){ commentReply.open(ret['comment_ID'],ret['comment_post_ID'],'edit');return false;});
+            
+            var reply_link = ctr.find('.reply a');
+            reply_link.unbind('click');
+            reply_link.bind('click', function(){ commentReply.open(ret['comment_ID'],ret['comment_post_ID']);return false;});
+            
+            jQuery('#inline-'+cid+' textarea.comment').val(ret['comment_content']);
+            jQuery('#comment-'+cid).attr('id', 'comment-'+ret['comment_ID']);
+            jQuery('#inline-'+cid).attr('id', 'inline-'+ret['comment_ID']);
+            jthis.attr('href','#c'+ret['comment_ID'])
+            
+            if(ret['translated_version']){                
+                jthis.html(icl_anchor_original_text);                
+                //jQuery('#replysubmit input[name="icl_translate_reply"]').removeAttr('disabled').parent().show();
+            }else{
+                jthis.html(ret['anchor_text']);
+                //jQuery('#replysubmit input[name="icl_translate_reply"]').attr('disabled','disabled').parent().hide();
+            }
+            
+            jQuery('#replycontainer').prepend('<input type="hidden" name="icl_comment_language_'+ret['comment_ID']+'" value="'+ret['language_code']+'" />');
+        }
+    });    
+    return false;
+}
+
+function icl_retry_mtr(a){
+    var id = a.getAttribute('id');
+    spl = id.split('_');
+    var loc = location.href.replace(/#(.*)$/,'').replace(/(&|\?)(retry_mtr)=([0-9]+)/g,'').replace(/&nonce=([0-9a-z]+)(&|$)/g,'');
+    if(-1 == loc.indexOf('?')){
+        url_glue='?';
+    }else{
+        url_glue='&';
+    }    
+    location.href=loc+url_glue+'retry_mtr='+spl[3]+'&nonce='+spl[4];
+    return false;
+}
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/content-translation.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/content-translation.js
new file mode 100644
index 0000000..f889d89
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/content-translation.js
@@ -0,0 +1,253 @@
+var icl_language_pairs_updated = false;
+
+addLoadEvent(function(){         
+    jQuery('.icl_language_pairs .icl_tr_from').change(toggleTranslationPairsSub);
+    jQuery('.icl_language_pairs .icl_tr_from').change(iclShowNextButtonStep1);
+    jQuery('.icl_tr_to').change(iclShowNextButtonStep1);
+    jQuery('#icl_save_language_pairs').click(saveLanguagePairs);    
+    jQuery('#icl_save_site_description').click(saveSiteDescription);    
+    jQuery('#icl_save_account_transfer').click(doAccountTransfer);    
+    jQuery('form[name="icl_more_options"]').submit(iclSaveForm);
+    jQuery('form[name="icl_more_options"]').submit(iclSaveMoreOptions);
+    jQuery('form[name="icl_editor_account"]').submit(iclSaveForm);    
+    jQuery('#icl_enable_content_translation,#icl_disable_content_translation').click(iclToggleContentTranslation);
+    jQuery('a[href="#icl-ct-advanced-options"]').click(iclToggleAdvancedOptions);        
+    jQuery('a[href="#icl-show_disabled_langs"]').click(iclToggleMoreLanguages);        
+    jQuery('input[name="icl_content_trans_setup_cancel"]').click(iclWizardCancel)
+    
+    jQuery('.handlediv').click(function(){
+        if(jQuery(this).parent().hasClass('closed')){
+            jQuery(this).parent().removeClass('closed');
+        }else{
+            jQuery(this).parent().addClass('closed');
+        }
+    })
+    
+    if (jQuery('input[name="icl_content_trans_setup_next_1"]').length > 0) {
+        iclShowNextButtonStep1();
+    }
+    
+    jQuery('#icl_save_language_pairs').click(function(){icl_language_pairs_updated = true});    
+    jQuery('.icl_cost_estimate_toggle').click(function(){jQuery('#icl_cost_estimate').slideToggle()});
+    jQuery('.icl_account_setup_toggle').click(icl_toggle_account_setup);
+    
+    if (location.href.indexOf("show_config=1") != -1) {
+        icl_toggle_account_setup();
+        location.href = location.href.replace("&show_config=1", "")
+        location.href = location.href.replace("?show_config=1&", "&")
+        location.href = location.href.replace("?show_config=1", "")
+        location.href = location.href + '#icl_account_setup';
+    }
+
+    
+    
+});
+
+function icl_toggle_account_setup(){
+    if(jQuery('#icl_languages_translators_stats').is(':visible')){
+        jQuery('#icl_languages_translators_stats').slideUp();
+    }else{
+        if(icl_language_pairs_updated){
+            jQuery('#icl_languages_translators_stats').html('<div align="left" style="margin-bottom:5px;">'+icl_ajxloaderimg+"</div>").fadeIn();
+            location.href = location.href.replace(/#(.*)$/g,'');    
+            /*                
+            jQuery('#icl_languages_translators_stats').load(location.href + ' #icl_languages_translators_stats > *', {}, function(){
+                    icl_tb_init('a.icl_thickbox');
+                    icl_tb_set_size('a.icl_thickbox');
+            });
+            */
+        }else{
+            jQuery('#icl_languages_translators_stats').slideDown();
+        }
+    }
+    jQuery('#icl_account_setup').slideToggle();
+    jQuery('.icl_account_setup_toggle_main').toggle();
+};
+
+function iclSaveMoreOptions() {
+    jQuery('input[name="icl_translator_choice"]:checked').each(function(){
+        if (this.value == '1') {
+            jQuery('#icl_own_translators_message').css("display", "");
+        } else {
+            jQuery('#icl_own_translators_message').css("display", "none");
+        }
+    });
+}
+
+function iclWizardCancel() {
+    if(!confirm(jQuery('#icl_toggle_ct_confirm_message').html())){
+        return false;
+    }
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=toggle_content_translation&new_val=0",
+        success: function(msg){
+            location.href=location.href;
+        }
+    });         
+    
+}
+
+function iclShowNextButtonStep1() {
+    // See if we have a language pair selected and enable the button if we have.
+    var found = false;
+    
+    jQuery('.icl_tr_from:checked').each(function(){
+        var from = this.id.substring(13);
+        jQuery('.icl_tr_to:checked').each(function(){
+            if (this.id.substr(13, 2) == from){
+                found = true;
+            }
+        })
+    });
+    
+    if (found) {
+        jQuery('input[name="icl_content_trans_setup_next_1"]').attr("disabled", "");
+    } else {
+        jQuery('input[name="icl_content_trans_setup_next_1"]').attr("disabled", "disabled");
+    }
+}
+
+function toggleTranslationPairsSub(){
+    var code = jQuery(this).attr('name').split('_').pop();
+    if(jQuery(this).attr('checked')){
+        jQuery('#icl_tr_pair_sub_'+code).slideDown();
+    }else{
+        // we should leave any to languages checked.
+        //jQuery('#icl_tr_pair_sub_'+code+' input[type="checkbox"]').removeAttr('checked');
+        
+        //jQuery('#icl_tr_pair_sub_'+code).slideUp();
+        // NOTE:
+        // slideup is not working in wp2.8.4 so set display to none instead.
+        jQuery('#icl_tr_pair_sub_'+code).css("display", "none");
+    }            
+}
+
+function saveLanguagePairs(){
+    fadeInAjxResp('#icl_ajx_response', icl_ajxloaderimg);
+    var qargs = new Array();
+    qargs.push(jQuery('#icl_language_pairs_form').serialize());
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=save_language_pairs&"+qargs.join('&'),
+        success: function(msg){
+            spl = msg.split('|');
+            if(spl[0]=='1'){
+                url = location.href;
+                url = url.replace(/&icl_refresh_langs=1/g, '');
+                url = url.replace(/&show_config=1/g, '');
+                url = url.replace(/#.*/,'');
+                url += "&icl_refresh_langs=1&show_config=1";
+
+                location.href = url;
+            }else{                        
+                fadeInAjxResp('#icl_ajx_response',icl_ajx_error + spl[1],true);
+            }  
+        }
+    }); 
+    
+}
+
+function saveSiteDescription(){
+    fadeInAjxResp('#icl_ajx_response_site', icl_ajxloaderimg);
+    var qargs = new Array();
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=save_site_description&"+jQuery('#icl_site_description').serialize(),
+        success: function(msg){
+            spl = msg.split('|');
+            if(spl[0]=='1'){
+                fadeInAjxResp('#icl_ajx_response_site',spl[1],true);
+            }else{                        
+                fadeInAjxResp('#icl_ajx_response_site',icl_ajx_error + spl[1],true);
+            }  
+        }
+    }); 
+    
+}
+
+function doAccountTransfer(){
+    fadeInAjxResp('#icl_ajx_response_account', icl_ajxloaderimg);
+    jQuery('#icl_account_errors').hide();
+    jQuery('#icl_account_success').hide();
+    var qargs = new Array();
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=do_account_transfer&"+jQuery('#icl_configure_account_transfer').serialize(),
+        success: function(msg){
+            spl = msg.split('|');
+            if(spl[0]=='1'){
+                fadeInAjxResp('#icl_ajx_response_account',spl[1],true);
+                jQuery('#icl_account_success').text(spl[1]);
+                jQuery('#icl_account_success').fadeIn();
+            }else{
+                jQuery('#icl_account_errors').text(spl[1]);
+                jQuery('#icl_account_errors').fadeIn();
+                
+                fadeInAjxResp('#icl_ajx_response_account',spl[1],true);
+            }  
+        }
+    }); 
+    
+}
+
+function iclToggleContentTranslation(){
+    var val = jQuery(this).attr('id')=='icl_enable_content_translation'?1:0;
+    if(!val && !confirm(jQuery('#icl_toggle_ct_confirm_message').html())){
+        return false;
+    }
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=toggle_content_translation&new_val="+val,
+        success: function(msg){
+            location.href = location.href.replace(/#.*/,'');
+        }
+    });         
+}
+
+function iclToggleAdvancedOptions(){    
+    jqthis = jQuery(this);
+    if(jQuery('#icl-content-translation-advanced-options').css('display')=='none'){
+        jQuery('#icl-content-translation-advanced-options').fadeIn('fast',function(){
+            jqthis.children().toggle();
+        });        
+    }else{
+        jQuery('#icl-content-translation-advanced-options').fadeOut('fast',function(){
+            jqthis.children().toggle();
+        });
+    }    
+}
+
+function iclToggleMoreLanguages(){    
+    jqthis = jQuery(this);
+    if(jQuery('#icl_languages_disabled').css('display')=='none'){
+        jQuery('#icl_languages_disabled').fadeIn('fast',function(){
+            jqthis.children().toggle();
+        });        
+    }else{
+        /* NOTE:
+            this fade out is not working in wp 2.8.4. set the display to none instead.
+        jQuery('#icl_languages_disabled').fadeOut('fast',function(){
+            jqthis.children().toggle();
+        });
+        */
+        
+        jQuery('#icl_languages_disabled').css('display', 'none');
+        jqthis.children().toggle();
+    }    
+}
+
+
+
+
+//jQuery('#TB_window').live('unload', function(){
+//    location.href=location.href.replace(/#(.+)$/,'');    
+//});
+
+
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/icl_reminders.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/icl_reminders.js
new file mode 100644
index 0000000..3a625d9
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/icl_reminders.js
@@ -0,0 +1,176 @@
+jQuery(document).ready(function(){
+    // put the reminders after the "advanced switch" if it exists.
+    if (jQuery('.icl_advanced_switch').length > 0) {
+        jQuery('#icl_reminder_message').insertAfter('.icl_advanced_switch');
+        if (jQuery('#icl_update_message').length > 0) {
+            jQuery('#icl_update_message').insertAfter('.icl_advanced_switch');
+        }
+    }
+    
+    jQuery('#icl_reminder_show').click(icl_show_hide_reminders);
+
+    jQuery('#icl_reminder_message').css({'margin-bottom' : '5px'});
+    jQuery('#icl_reminder_message').css({'padding-bottom' : '2px'});
+    jQuery('#icl_reminder_message h4').css({'margin-bottom' : '0px'});
+    jQuery('#icl_reminder_message h4').css({'margin-top' : '0px'});
+    
+    if (location.href.indexOf('&icl_refresh_langs') != -1) {
+        do_message_refresh = true;
+    }
+    show_messages();    
+    do_message_refresh = false;
+	
+	// Added box resize for regular 'thickbox'
+	icl_tb_set_size('a.icl_regular_thickbox');
+});
+
+var do_message_refresh = false;
+function show_messages() {
+    var command = "icl_ajx_action=icl_messages";
+    if (do_message_refresh) {
+        command += "&refresh=1";
+        do_message_refresh = false;
+    }
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: command,
+        cache: false,
+        dataType: 'json',                
+        success: function(resp){ 
+            if(resp.messages > 0){
+                jQuery('#icl_show_text').html(resp.reminder_text);
+                jQuery('#icl_reminder_list').html(resp.output);
+                jQuery('#icl_reminder_message').fadeIn();
+                icl_tb_init('a.icl_thickbox');
+                icl_tb_set_size('a.icl_thickbox');
+            } else {
+                jQuery('#icl_reminder_message').fadeOut();                
+            }  
+        }
+    }); 
+
+}
+
+function icl_tb_init(domChunk) {
+    // copied from thickbox.js
+    // add code so we can detect closure of popup
+	
+    jQuery(domChunk).unbind('click');
+	icl_support_view_ticket();
+    
+    jQuery(domChunk).click(function(){
+    var t = this.title || this.name || "ICanLocalize Reminder";
+    var a = this.href || this.alt;
+    var g = this.rel || false;
+    tb_show(t,a,g);
+    
+    do_message_refresh = true;
+    jQuery('#TB_window').bind('unload', function(){
+        url = location.href;
+        if (url.indexOf('content-translation.php') != -1) {
+        
+            url = url.replace(/&icl_refresh_langs=1/g, '');
+            url = url.replace(/&show_config=1/g, '');
+            url = url.replace(/#.*/,'');
+            if(jQuery('#icl_account_setup').is(':visible')) {
+                location.href = url + "&icl_refresh_langs=1&show_config=1"
+            } else {
+                location.href = url + "&icl_refresh_langs=1"
+            }
+        } else if (url.indexOf('support.php') != -1) {
+			location.href = url;
+		} else {           
+            if (t == "ICanLocalize Reminder" && do_message_refresh) {
+                
+                // do_message_refresh will only be true if we close the popup.
+                // if the dismiss link is clicked then do_message_refresh is set to false before closing the popup.
+                
+                jQuery('#icl_reminder_list').html('Refreshing messages  ' + icl_ajxloaderimg);
+                show_messages();
+                }
+            
+            if(a.indexOf('after=refresh_langs') != -1) {
+            
+                icl_refresh_translator_not_available_links();
+            }
+        }        
+        });
+    
+    this.blur();
+    return false;
+    });
+}
+
+
+function icl_tb_set_size(domChunk) {
+    if (typeof(tb_getPageSize) != 'undefined') {
+
+        var pagesize = tb_getPageSize();
+        jQuery(domChunk).each(function() {
+            var url = jQuery(this).attr('href');
+            url += '&width=' + (pagesize[0] - 150);
+            url += '&height=' + (pagesize[1] - 150);
+            url += '&tb_avail=1'; // indicate that thickbox is available.
+            jQuery(this).attr('href', url);
+        });
+    }
+}
+
+function dismiss_message(message_id) {
+    do_message_refresh = false;
+    jQuery('#icl_reminder_list').html('Refreshing messages  ' + icl_ajxloaderimg);
+    tb_remove();
+    
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=icl_delete_message&message_id=" + message_id,
+        async: false,
+        success: function(msg){
+        }
+    }); 
+    
+    show_messages();
+}
+
+function icl_show_hide_reminders() {
+    jqthis = jQuery(this);
+    if(jQuery('#icl_reminder_list').css('display')=='none'){
+        jQuery('#icl_reminder_list').fadeIn();
+        jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=icl_show_reminders&state=show",
+            async: true,
+            success: function(msg){
+            }
+        }); 
+    } else {
+        jQuery('#icl_reminder_list').fadeOut();
+        jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=icl_show_reminders&state=hide",
+            async: true,
+            success: function(msg){
+            }
+        }); 
+        
+    }
+    jqthis.children().toggle();    
+}
+
+
+function icl_support_view_ticket() {
+		jQuery('#icl_support_table a.icl_support_viewed').bind('click',function(){
+			jQuery.ajax({
+				type: "POST",
+				url: icl_ajx_url,
+				data: "icl_ajx_action=icl_support_update_ticket&ticket=" + jQuery(this).attr('id'),
+				async: false,
+				success: function(msg){
+				}
+			}); 
+		});
+	}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/icl_sidebar.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/icl_sidebar.js
new file mode 100644
index 0000000..286dafc
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/icl_sidebar.js
@@ -0,0 +1,73 @@
+jQuery(document).ready(function(){
+    
+    display_side_bar_if_required();
+    show_help_links();
+    
+    jQuery('#icl_sidebar_hide').click(icl_hide_sidebar);
+    jQuery('#icl_sidebar_show').click(icl_show_sidebar);
+    
+});
+
+function show_help_links() {
+    var command = "icl_ajx_action=icl_help_links";
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: command,
+        cache: false,
+        success: function(msg){
+            spl = msg.split('|');
+            if(spl[0] == '1'){
+                jQuery('#icl_help_links').html(spl[1]);
+                display_side_bar_if_required();
+            } else {
+                jQuery('.icl_sidebar').fadeOut();
+            }
+        }
+    });
+}
+
+function display_side_bar_if_required() {
+
+    if(jQuery('#icl_sidebar_full').css('display')=='none') {
+        jQuery('#icl_sidebar').css({'width': '16px'});
+    } else {
+        jQuery('#icl_sidebar').css({'width': '207px'});
+    }
+    
+    jQuery('#icl_sidebar').fadeIn();
+    
+}
+
+function icl_show_sidebar() {
+
+    jQuery('#icl_sidebar_hide_div').fadeOut();
+    jQuery('#icl_sidebar_full').fadeIn(display_side_bar_if_required);
+    
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=icl_show_sidebar&state=show",
+        async: true,
+        success: function(msg){
+        }
+    }); 
+    
+    
+}
+
+function icl_hide_sidebar() {
+    
+    jQuery('#icl_sidebar_full').fadeOut(display_side_bar_if_required);
+    jQuery('#icl_sidebar_hide_div').fadeIn();
+
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=icl_show_sidebar&state=hide",
+        async: true,
+        success: function(msg){
+        }
+    }); 
+    
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/languages.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/languages.js
new file mode 100644
index 0000000..e1a1bc1
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/languages.js
@@ -0,0 +1,840 @@
+addLoadEvent(function(){     
+    jQuery('#icl_change_default_button').click(editingDefaultLanguage);
+    jQuery('#icl_save_default_button').click(saveDefaultLanguage);
+    jQuery('#icl_cancel_default_button').click(doneEditingDefaultLanguage);
+    jQuery('#icl_add_remove_button').click(showLanguagePicker);            
+    jQuery('#icl_cancel_language_selection').click(hideLanguagePicker);
+    jQuery('#icl_save_language_selection').click(saveLanguageSelection);                        
+    jQuery('#icl_enabled_languages input').attr('disabled','disabled');    
+    jQuery('#icl_save_language_negotiation_type').submit(iclSaveLanguageNegotiationType);    
+    jQuery('#icl_save_language_switcher_options').submit(iclSaveForm);    
+    jQuery('#icl_admin_language_options').submit(iclSaveForm);    
+    jQuery('#icl_lang_more_options').submit(iclSaveForm);    
+    jQuery('#icl_blog_posts').submit(iclSaveForm);        
+    jQuery('#icl_hide_languages').submit(iclHideLanguagesCallback);    
+    jQuery('#icl_hide_languages').submit(iclSaveForm);    
+    jQuery('#icl_adjust_ids').submit(iclSaveForm);    
+    jQuery('input[name="icl_language_negotiation_type"]').change(iclLntDomains);
+    jQuery('#icl_dismiss_translate_help').click(iclDismissTranslateHelp);
+    jQuery('#icl_setup_back_1').click(iclSetupStep1);
+    jQuery('#icl_setup_back_2').click(iclSetupStep2);
+    jQuery('#icl_setup_back_3').click(iclSetupStep3);
+    jQuery('#icl_setup_next_1').click(saveLanguageSelection);
+    
+    jQuery('#icl_avail_languages_picker li input:checkbox').click(function(){             
+        if(jQuery('#icl_avail_languages_picker li input:checkbox:checked').length > 1){
+            jQuery('#icl_setup_next_1').removeAttr('disabled');
+        }else{
+            jQuery('#icl_setup_next_1').attr('disabled', 'disabled');
+        }
+    });
+	             
+    icl_lp_flag = jQuery('.iclflag:visible').length > 0;    
+	icl_lp_footer_flag = jQuery('.iclflag:visible').length > 0;     
+    
+	jQuery('#icl_lang_preview_config input').each(iclUpdateLangSelQuickPreview);
+	jQuery('#icl_lang_preview_config_footer input').each(iclUpdateLangSelQuickPreviewFooter);
+	// Picker align
+	jQuery(".pick-show").click(function () {
+		var set = jQuery(this).offset();
+   		jQuery("#colorPickerDiv").css({"top":set.top+25,"left":set.left});
+	});
+    jQuery('#icl_translate_help_collapsed').click(iclDismissTranslateHelp);
+    jQuery('form[name="icl_promote_form"] input[name="icl_promote"]').change(function(){
+        jQuery.post(icl_ajx_url, 'icl_ajx_action=icl_promote&icl_promote='+jQuery(this).attr('checked'));
+    });    
+    
+    jQuery('#icl_lang_preview_config input').keyup(iclUpdateLangSelQuickPreview);
+	jQuery('#icl_lang_preview_config_footer input').keyup(iclUpdateLangSelQuickPreviewFooter);
+	  
+    jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_flags"]').change(function(){
+        if(jQuery(this).attr('checked')){
+            jQuery('#lang_sel .iclflag').show();
+			jQuery('#lang_sel_list .iclflag').show();
+			jQuery('#lang_sel_footer .iclflag').show();
+        }else{
+			jQuery('#lang_sel .iclflag').hide();	
+			jQuery('#lang_sel_list .iclflag').hide();	
+			jQuery('#lang_sel_footer .iclflag').hide();	
+            /*if(jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_display_lang"]').attr('checked')
+                || jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_native_lang"]').attr('checked')){
+                jQuery('#lang_sel .iclflag').hide();
+            }else{
+                jQuery(this).attr('checked','checked');
+                return false;
+            }*/
+        }
+    });
+    
+    jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_native_lang"]').change(function(){
+        if(jQuery(this).attr('checked')){
+            jQuery('.icl_lang_sel_native').show();
+        }else{
+            if(jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_display_lang"]').attr('checked')){
+                jQuery('.icl_lang_sel_native').hide();
+                if(!jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_display_lang"]').attr('checked')){
+                    jQuery('.icl_lang_sel_current').hide();
+                }
+            }else{
+                jQuery(this).attr('checked','checked');
+                return false;
+            }
+        }
+    });
+
+    jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_display_lang"]').change(function(){
+        if(jQuery(this).attr('checked')){
+            jQuery('.icl_lang_sel_translated').show();
+        }else{
+            if(jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_native_lang"]').attr('checked')){
+                jQuery('.icl_lang_sel_translated').hide();
+                if(!jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_native_lang"]').attr('checked')){
+                    jQuery('.icl_lang_sel_current').hide();
+                }                
+            }else{
+                jQuery(this).attr('checked','checked');
+                return false;
+            }
+        }
+    });
+    
+    jQuery('#icl_lang_sel_color_scheme').change(iclUpdateLangSelColorScheme);
+	jQuery('#icl_lang_sel_footer_color_scheme').change(iclUpdateLangSelColorSchemeFooter);
+    
+    //jQuery('#icl_lang_preview_config input').change(iclUpdateLangSelPreview);  
+	
+	jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lang_sel_footer"]').change(function(){
+        if(jQuery(this).attr('checked')){
+            jQuery('#icl_lang_sel_footer_preview_wrap').show();
+			jQuery('#icl_lang_sel_footer_preview_link').show();
+			//jQuery('#icl_lang_preview_config_footer_editor_wrapper').show();
+        }else{
+			jQuery('#icl_lang_sel_footer_preview_wrap').hide();		
+			jQuery('#icl_lang_sel_footer_preview_link').hide();	
+			jQuery('#icl_lang_preview_config_footer_editor_wrapper').hide();
+        }
+    });
+	
+	var icl_arrow_img = icl_ajxloaderimg_src.replace("ajax-loader.gif", "nav-arrow-down.png");
+	jQuery('#icl_save_language_switcher_options :radio[name="icl_lang_sel_type"]').change(function(){
+        if(jQuery(this).val() == 'dropdown'){
+			//jQuery('#lang_sel_list').css('visibility','hidden');
+			jQuery('#lang_sel_list').hide();
+			//jQuery('#lang_sel').css('visibility','visible');
+			jQuery('#lang_sel').show();
+			/*jQuery('#lang_sel ul ul').css('visibility','hidden');
+			jQuery('#lang_sel a.lang_sel_sel').css('background-image','url('+icl_arrow_img+')');
+			jQuery('#lang_sel ul').hover(
+				function(){
+					jQuery('#lang_sel ul ul').css('visibility','visible');
+				},
+				function(){
+					jQuery('#lang_sel ul ul').css('visibility','hidden');
+				}
+			);*/
+        }else{
+			//jQuery('#lang_sel').css('visibility','hidden');
+			jQuery('#lang_sel').hide();
+			//jQuery('#lang_sel_list').css('visibility','visible');
+			jQuery('#lang_sel_list').show();
+			/*jQuery('#lang_sel a.lang_sel_sel').css('background-image','url()');
+			jQuery('#lang_sel ul').hover(function(){jQuery('#lang_sel ul ul').css('visibility','visible');}, function(){jQuery('#lang_sel ul ul').css('visibility','visible');});
+			jQuery('#lang_sel ul ul').css('visibility','visible');*/
+        }
+    });
+    
+    jQuery('#icl_reset_languages').click(icl_reset_languages);
+    
+    jQuery(':radio[name=icl_translation_option]').change(function(){
+        jQuery('#icl_enable_content_translation').removeAttr('disabled');
+    });    
+    jQuery('#icl_enable_content_translation, .icl_noenable_content_translation').click(iclEnableContentTranslation);    
+        
+});
+function editingDefaultLanguage(){
+    jQuery('#icl_change_default_button').hide();
+    jQuery('#icl_save_default_button').show();
+    jQuery('#icl_cancel_default_button').show();
+    jQuery('#icl_enabled_languages input').css('visibility','visible');
+    jQuery('#icl_enabled_languages input').removeAttr('disabled');
+    jQuery('#icl_add_remove_button').hide();
+    
+}
+function doneEditingDefaultLanguage(){
+    jQuery('#icl_change_default_button').show();
+    jQuery('#icl_save_default_button').hide();
+    jQuery('#icl_cancel_default_button').hide();
+    jQuery('#icl_enabled_languages input').css('visibility','hidden');
+    jQuery('#icl_enabled_languages input').attr('disabled','disabled');
+    jQuery('#icl_add_remove_button').show();
+}        
+function saveDefaultLanguage(){
+    var arr = jQuery('#icl_enabled_languages input[type="radio"]');            
+    var def_lang;
+    jQuery.each(arr, function() {                
+        if(this.checked){
+            def_lang = this.value;    
+        }                
+    });             
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=set_default_language&lang="+def_lang,
+        success: function(msg){
+            spl = msg.split('|');
+            if(spl[0]=='1'){
+                fadeInAjxResp(icl_ajx_saved);                         
+                jQuery('#icl_avail_languages_picker input[value="'+spl[1]+'"]').removeAttr('disabled');
+                jQuery('#icl_avail_languages_picker input[value="'+def_lang+'"]').attr('disabled','disabled');
+                jQuery('#icl_enabled_languages li').removeClass('default_language');
+                jQuery('#icl_enabled_languages li input[value="'+def_lang+'"]').parent().parent().attr('class','default_language');
+                jQuery('#icl_enabled_languages li input[value="'+def_lang+'"]').parent().append(' ('+icl_default_mark+')');
+                jQuery('#icl_enabled_languages li input').removeAttr('checked');
+                jQuery('#icl_enabled_languages li input[value="'+def_lang+'"]').attr('checked','checked');
+                jQuery('#icl_enabled_languages input[value="'+spl[1]+'"]').parent().html(jQuery('#icl_enabled_languages input[value="'+spl[1]+'"]').parent().html().replace('('+icl_default_mark+')',''));
+                doneEditingDefaultLanguage();                     
+                fadeInAjxResp('#icl_ajx_response',icl_ajx_saved);                  
+                if(spl[2]){
+                    jQuery('#icl_ajx_response').html(spl[2]);
+                }else{                    
+                    location.href = location.href.replace(/#.*/,'')+'&setup=2';
+                }                
+            }else{                        
+                fadeInAjxResp('#icl_ajx_response',icl_ajx_error);                                         
+            }                    
+        }
+    });
+    
+}        
+function showLanguagePicker(){
+    jQuery('#icl_avail_languages_picker').slideDown();
+    jQuery('#icl_add_remove_button').fadeOut();
+    jQuery('#icl_change_default_button').fadeOut();
+}
+function hideLanguagePicker(){
+    jQuery('#icl_avail_languages_picker').slideUp();
+    jQuery('#icl_add_remove_button').fadeIn();
+    jQuery('#icl_change_default_button').fadeIn();
+} 
+function saveLanguageSelection(){
+    fadeInAjxResp('#icl_ajx_response', icl_ajxloaderimg);
+    var arr = jQuery('#icl_avail_languages_picker ul input[type="checkbox"]');            
+    var sel_lang = new Array();
+    jQuery.each(arr, function() {
+        if(this.checked){
+            sel_lang.push(this.value);
+        }                
+    }); 
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=set_active_languages&langs="+sel_lang.join(','),
+        success: function(msg){
+            spl = msg.split('|');
+            if(spl[0]=='1'){
+                fadeInAjxResp('#icl_ajx_response', icl_ajx_saved);                         
+                jQuery('#icl_enabled_languages').html(spl[1]);
+            }else{                        
+                fadeInAjxResp('#icl_ajx_response', icl_ajx_error,true);
+            } 
+            if(spl[2]=='1'){
+                location.href = location.href.replace(/#.*/,'');
+            }else if(spl[2]=='-1'){
+                location.href = location.href.replace(/#.*/,'');
+            }else {
+                location.href = location.href.replace(/(#|&).*/,'');
+            }                   
+
+        }
+    });
+    hideLanguagePicker();
+}   
+
+function iclLntDomains(){
+    if(jQuery(this).attr('checked') && jQuery(this).attr('id')=='icl_lnt_domains'){
+        jQuery(this).parent().parent().append('<div id="icl_lnt_domains_box"></div>');
+        jQuery('#icl_lnt_domains_box').html(icl_ajxloaderimg);
+        jQuery('#icl_save_language_negotiation_type input[type="submit"]').attr('disabled','disabled');
+        jQuery('#icl_lnt_domains_box').load(icl_ajx_url, {icl_ajx_action:'language_domains'}, function(resp){
+            jQuery('#icl_save_language_negotiation_type input[type="submit"]').removeAttr('disabled');
+        })
+    }else{
+        if(jQuery('#icl_lnt_domains_box').length){
+            jQuery('#icl_lnt_domains_box').fadeOut('fast', function(){jQuery('#icl_lnt_domains_box').remove()});        
+        }        
+    }
+    
+}
+
+function iclSaveLanguageNegotiationType(){
+    var formname = jQuery(this).attr('name');
+    var form_errors = false;
+    jQuery('form[name="'+formname+'"] .icl_form_errors').html('').hide();
+    jQuery('form[name="'+formname+'"] input').css('color','#000');
+    ajx_resp = jQuery('form[name="'+formname+'"] .icl_ajx_response').attr('id');
+    fadeInAjxResp('#'+ajx_resp, icl_ajxloaderimg);
+    jQuery.ajaxSetup({async: false});
+    var used_urls = new Array(jQuery('#icl_ln_home').html());
+    jQuery('.validate_language_domain').each(function(){        
+        if(jQuery(this).attr('checked')){
+            var lang = jQuery(this).attr('value');
+            jQuery('#ajx_ld_'+lang).html(icl_ajxloaderimg);
+            var lang_td = jQuery('#icl_validation_result_'+lang);
+            var lang_domain_input = jQuery('#language_domain_'+lang); 
+            if(used_urls.indexOf(lang_domain_input.attr('value')) != -1 ){
+                jQuery('#ajx_ld_'+lang).html('');
+                lang_domain_input.css('color','#f00');
+                form_errors = true;
+            }else{
+                used_urls.push(lang_domain_input.attr('value'));            
+                lang_domain_input.css('color','#000');
+                jQuery('#ajx_ld_'+lang).load(icl_ajx_url, 
+                    {icl_ajx_action:'validate_language_domain',url:lang_domain_input.attr('value')}, 
+                    function(resp){
+                        jQuery('#ajx_ld_'+lang).html('');
+                        if(resp=='0'){
+                            lang_domain_input.css('color','#f00');
+                            form_errors = true;
+                            
+                        }
+                });
+            }
+        }        
+    });
+    jQuery.ajaxSetup({async: true});
+    if(form_errors){        
+        fadeInAjxResp('#'+ajx_resp, icl_ajx_error,true);
+        return false;
+    }    
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action="+jQuery(this).attr('name')+"&"+jQuery(this).serialize(),
+        success: function(msg){
+            spl = msg.split('|');
+            if(spl[0]=='1'){
+                fadeInAjxResp('#'+ajx_resp, icl_ajx_saved);                                         
+            }else{                        
+                jQuery('form[name="'+formname+'"] .icl_form_errors').html(spl[1]);
+                jQuery('form[name="'+formname+'"] .icl_form_errors').fadeIn()
+                fadeInAjxResp('#'+ajx_resp, icl_ajx_error,true);
+            }  
+        }
+    });
+    return false;     
+}
+
+function iclDismissTranslateHelp(){
+    var thisa = jQuery(this);
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=dismiss_translate_help",
+            success: function(msg){
+                if(jQuery('#icl_translate_help').css('display') == 'none'){
+                    thisa.hide();
+                    jQuery('#icl_translate_help').fadeIn();
+                }else{
+                    thisa.parent().fadeOut('fast',function(){jQuery('#icl_translate_help_collapsed').fadeIn();});                    
+                }
+            }
+    });    
+    return false;
+}
+
+function iclSetupStep1(){
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=setup_got_to_step1",
+            success: function(msg){
+                location.href = location.href.replace(/#.*/,'');
+            }
+    });    
+    return false;
+}
+function iclSetupStep2(){
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=setup_got_to_step2",
+            success: function(msg){
+                location.href = location.href.replace(/#.*/,'');
+            }
+    });    
+    return false;
+}
+
+function iclSetupStep3(){
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=setup_got_to_step3",
+            success: function(msg){
+                location.href = location.href.replace(/#.*/,'');
+            }
+    });    
+    return false;
+}
+
+function iclUpdateLangSelPreview(){
+    jQuery('#icl_lang_sel_preview_wrap').html(icl_ajxloaderimg);
+    jQuery('#icl_lang_sel_preview_wrap').load(location.href + ' #icl_lang_sel_preview');
+}
+
+var icl_lp_font_current_normal = false;
+var icl_lp_font_current_hover = false;
+var icl_lp_background_current_normal = false;
+var icl_lp_background_current_hover = false;
+var icl_lp_font_other_normal = false;
+var icl_lp_font_other_hover = false;
+var icl_lp_background_other_normal = false;
+var icl_lp_background_other_hover = false;
+var icl_lp_border = false;
+var icl_lp_flag = false;
+
+
+function iclUpdateLangSelQuickPreview(){
+    name = jQuery(this).attr('name');
+    value = jQuery(this).val();
+    switch(name){
+        case 'icl_lang_sel_config[font-current-normal]':
+            icl_lp_font_current_normal = value;
+            break;
+        case 'icl_lang_sel_config[font-current-hover]':
+            icl_lp_font_current_hover = value;
+            break;                
+        case 'icl_lang_sel_config[background-current-normal]':
+            icl_lp_background_current_normal = value;
+            break;
+        case 'icl_lang_sel_config[background-current-hover]':
+            icl_lp_background_current_hover = value;
+            break;                
+        case 'icl_lang_sel_config[font-other-normal]':
+            icl_lp_font_other_normal = value;
+            break;
+        case 'icl_lang_sel_config[font-other-hover]':
+            icl_lp_font_other_hover = value;
+            break;                
+        case 'icl_lang_sel_config[background-other-normal]':
+            icl_lp_background_other_normal = value;
+            break;
+        case 'icl_lang_sel_config[background-other-hover]':
+            icl_lp_background_other_hover = value;
+            break;                
+        case 'icl_lang_sel_config[border]':
+            icl_lp_border = value;
+            break;            
+        case 'icl_lso_flags':
+            icl_lp_flag = jQuery(this).attr('checked');
+            break;            
+            
+    }
+    iclRenderLangPreview();
+}
+
+function iclRenderLangPreview(){
+                                                                                                               
+    if(icl_lp_font_other_normal){
+        jQuery('#lang_sel li ul a').css('color', icl_lp_font_other_normal); 
+		jQuery('#lang_sel_list ul a').css('color', icl_lp_font_other_normal);
+    }    
+    if(icl_lp_font_other_hover){
+        jQuery('#lang_sel li ul a').unbind('hover');
+        jQuery('#lang_sel li ul a').hover(
+            function(){jQuery(this).css('color',icl_lp_font_other_hover)},
+            function(){jQuery(this).css('color',icl_lp_font_other_normal)}
+            );
+		jQuery('#lang_sel_list ul a').unbind('hover');
+        jQuery('#lang_sel_list ul a').hover(
+            function(){jQuery(this).css('color',icl_lp_font_other_hover)},
+            function(){jQuery(this).css('color',icl_lp_font_other_normal)}
+            );
+    }
+
+    if(icl_lp_background_other_normal){
+        jQuery('#lang_sel li ul a').css('background-color', icl_lp_background_other_normal) ; 
+        jQuery('#lang_sel li ul a').unbind('hover');
+        jQuery('#lang_sel li ul a').hover(
+            function(){jQuery(this).css('background-color', '')},
+            function(){jQuery(this).css('background-color', icl_lp_background_other_normal)}
+            );   
+		
+		jQuery('#lang_sel_list ul a').css('background-color', icl_lp_background_other_normal) ; 
+        jQuery('#lang_sel_list ul a').unbind('hover');
+        jQuery('#lang_sel_list ul a').hover(
+            function(){jQuery(this).css('background-color', '')},
+            function(){jQuery(this).css('background-color', icl_lp_background_other_normal)}
+            );     
+    }    
+    if(icl_lp_background_other_hover){
+        jQuery('#lang_sel li ul a').unbind('hover');
+        jQuery('#lang_sel li ul a').hover(
+            function(){jQuery(this).css('background-color', icl_lp_background_other_hover)},
+            function(){jQuery(this).css('background-color', icl_lp_background_other_normal)}
+            );
+		jQuery('#lang_sel_list ul a').unbind('hover');
+        jQuery('#lang_sel_list ul a').hover(
+            function(){jQuery(this).css('background-color', icl_lp_background_other_hover)},
+            function(){jQuery(this).css('background-color', icl_lp_background_other_normal)}
+            );
+    }
+    
+    if(icl_lp_border){
+        jQuery('#lang_sel a').css('border-color', icl_lp_border);
+		jQuery('#lang_sel ul ul').css('border-color', icl_lp_border);
+		
+		jQuery('#lang_sel_list a').css('border-color', icl_lp_border);
+		jQuery('#lang_sel_list ul').css('border-color', icl_lp_border);
+    }
+    
+    if(jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_flags"]').attr('checked')){
+        jQuery('#lang_sel .iclflag').show();
+		jQuery('#lang_sel_list .iclflag').show();
+    }else{
+        jQuery('#lang_sel .iclflag').hide();
+		jQuery('#lang_sel_list .iclflag').hide();
+    }
+	
+	if(icl_lp_font_current_normal){                                                                          
+        jQuery('#lang_sel a:first').css('color',icl_lp_font_current_normal) ; 
+		jQuery('#lang_sel_list a.lang_sel_sel').css('color',icl_lp_font_current_normal) ; 
+    }    
+    if(icl_lp_font_current_hover){
+        jQuery('#lang_sel a:first, #lang_sel a.lang_sel_sel').unbind('hover');
+        jQuery('#lang_sel a:first, #lang_sel a.lang_sel_sel').hover(
+            function(){jQuery(this).css('color',icl_lp_font_current_hover)},
+            function(){
+                jQuery(this).css('color',icl_lp_font_current_normal);
+                jQuery('#lang_sel a.lang_sel_sel').css('color',icl_lp_font_current_normal);
+                }
+            );
+		jQuery('#lang_sel_list a.lang_sel_sel').unbind('hover');
+        jQuery('#lang_sel_list a.lang_sel_sel').hover(
+            function(){jQuery(this).css('color',icl_lp_font_current_hover)},
+            function(){
+                jQuery(this).css('color',icl_lp_font_current_normal);
+                jQuery('#lang_sel_list a.lang_sel_sel').css('color',icl_lp_font_current_normal);
+                }
+            );
+    }
+	
+	if(icl_lp_background_current_normal){
+        jQuery('#lang_sel a:first').css('background-color', icl_lp_background_current_normal); 
+		jQuery('#lang_sel_list a.lang_sel_sel').css('background-color', icl_lp_background_current_normal);
+        
+        jQuery('#lang_sel a:first').unbind('hover');
+        jQuery('#lang_sel a:first').hover(
+            function(){jQuery(this).css('background-color', '')},
+            function(){jQuery(this).css('background-color', icl_lp_background_current_normal)}
+            );
+		
+		jQuery('#lang_sel_list a.lang_sel_sel').unbind('hover');
+        jQuery('#lang_sel_list a.lang_sel_sel').hover(
+            function(){jQuery(this).css('background-color', '')},
+            function(){jQuery(this).css('background-color', icl_lp_background_current_normal)}
+            );
+        
+    }
+    
+    if(icl_lp_background_current_hover){                                                          
+        jQuery('#lang_sel a:first').unbind('hover');
+        jQuery('#lang_sel a:first').hover(
+            function(){jQuery(this).css('background-color', icl_lp_background_current_hover)},
+            function(){jQuery(this).css('background-color', icl_lp_background_current_normal)}
+            );
+		jQuery('#lang_sel_list a.lang_sel_sel').unbind('hover');
+        jQuery('#lang_sel_list a.lang_sel_sel').hover(
+            function(){jQuery(this).css('background-color', icl_lp_background_current_hover)},
+            function(){jQuery(this).css('background-color', icl_lp_background_current_normal)}
+            );
+    }
+    
+}
+
+function iclUpdateLangSelColorScheme(){
+    scheme = jQuery(this).val();
+    if(scheme && confirm(jQuery(this).next().html())){
+        jQuery('#icl_lang_preview_config input[type="text"]').each(function(){
+            thisn = jQuery(this).attr('name').replace('icl_lang_sel_config[','').replace(']','');
+            value = jQuery('#icl_lang_sel_config_alt_'+scheme+'_'+thisn).val();
+            jQuery(this).val(value);
+                        
+            switch(jQuery(this).attr('name')){
+                case 'icl_lang_sel_config[font-current-normal]':
+                    icl_lp_font_current_normal = value;
+                    break;
+                case 'icl_lang_sel_config[font-current-hover]':
+                    icl_lp_font_current_hover = value;
+                    break;                
+                case 'icl_lang_sel_config[background-current-normal]':
+                    icl_lp_background_current_normal = value;
+                    break;
+                case 'icl_lang_sel_config[background-current-hover]':
+                    icl_lp_background_current_hover = value;
+                    break;                
+                case 'icl_lang_sel_config[font-other-normal]':
+                    icl_lp_font_other_normal = value;
+                    break;
+                case 'icl_lang_sel_config[font-other-hover]':
+                    icl_lp_font_other_hover = value;
+                    break;                
+                case 'icl_lang_sel_config[background-other-normal]':
+                    icl_lp_background_other_normal = value;
+                    break;
+                case 'icl_lang_sel_config[background-other-hover]':
+                    icl_lp_background_other_hover = value;
+                    break;                
+                case 'icl_lang_sel_config[border]':
+                    icl_lp_border = value;
+                    break;            
+            }            
+            
+        });
+        
+        iclRenderLangPreview();
+        
+    }
+}
+
+
+
+
+
+
+// FOOTER
+
+
+var icl_lp_footer_font_current_normal = false;
+var icl_lp_footer_font_current_hover = false;
+var icl_lp_footer_background_current_normal = false;
+var icl_lp_footer_background_current_hover = false;
+var icl_lp_footer_font_other_normal = false;
+var icl_lp_footer_font_other_hover = false;
+var icl_lp_footer_background_other_normal = false;
+var icl_lp_footer_background_other_hover = false;
+var icl_lp_footer_border = false;
+var icl_lp_footer_flag = false;
+var icl_lp_footer_background = false;
+
+
+function iclUpdateLangSelQuickPreviewFooter(){
+    name = jQuery(this).attr('name');
+    value = jQuery(this).val();
+    switch(name){
+        case 'icl_lang_sel_footer_config[font-current-normal]':
+            icl_lp_footer_font_current_normal = value;
+            break;
+        case 'icl_lang_sel_footer_config[font-current-hover]':
+            icl_lp_footer_font_current_hover = value;
+            break;                
+        case 'icl_lang_sel_footer_config[background-current-normal]':
+            icl_lp_footer_background_current_normal = value;
+            break;
+        case 'icl_lang_sel_footer_config[background-current-hover]':
+            icl_lp_footer_background_current_hover = value;
+            break;                
+        case 'icl_lang_sel_footer_config[font-other-normal]':
+            icl_lp_footer_font_other_normal = value;
+            break;
+        case 'icl_lang_sel_footer_config[font-other-hover]':
+            icl_lp_footer_font_other_hover = value;
+            break;                
+        case 'icl_lang_sel_footer_config[background-other-normal]':
+            icl_lp_footer_background_other_normal = value;
+            break;
+        case 'icl_lang_sel_footer_config[background-other-hover]':
+            icl_lp_footer_background_other_hover = value;
+            break;                
+        case 'icl_lang_sel_footer_config[border]':
+            icl_lp_footer_border = value;
+            break;            
+        case 'icl_lso_footer_flags':
+            icl_lp_footer_flag = jQuery(this).attr('checked');
+            break;            
+        case 'icl_lang_sel_footer_config[background]':
+            icl_lp_footer_background = value;
+            break;  
+    }
+    iclRenderLangPreviewFooter();
+}
+
+function iclRenderLangPreviewFooter(){
+   
+    
+                                                                                                               
+    if(icl_lp_footer_font_other_normal){
+        jQuery('#lang_sel_footer ul a').css('color', icl_lp_footer_font_other_normal); 
+    }    
+    if(icl_lp_footer_font_other_hover){
+        jQuery('#lang_sel_footer ul a').unbind('hover');
+        jQuery('#lang_sel_footer ul a').hover(
+            function(){jQuery(this).css('color',icl_lp_footer_font_other_hover)},
+            function(){jQuery(this).css('color',icl_lp_footer_font_other_normal)}
+            );
+    }
+
+    if(icl_lp_footer_background_other_normal){
+        jQuery('#lang_sel_footer ul a').css('background-color', icl_lp_footer_background_other_normal) ; 
+        jQuery('#lang_sel_footer ul a').unbind('hover');
+        jQuery('#lang_sel_footer ul a').hover(
+            function(){jQuery(this).css('background-color', '')},
+            function(){jQuery(this).css('background-color', icl_lp_footer_background_other_normal)}
+            );        
+    }    
+    if(icl_lp_footer_background_other_hover){
+        jQuery('#lang_sel_footer ul a').unbind('hover');
+        jQuery('#lang_sel_footer ul a').hover(
+            function(){jQuery(this).css('background-color', icl_lp_footer_background_other_hover)},
+            function(){jQuery(this).css('background-color', icl_lp_footer_background_other_normal)}
+            );
+    }
+    
+    if(icl_lp_footer_border){
+        jQuery('#lang_sel_footer').css('border-color', icl_lp_footer_border);
+    }
+	
+	if(icl_lp_footer_background){
+        jQuery('#lang_sel_footer').css('background-color', icl_lp_footer_background);
+    }
+    
+    if(jQuery('#icl_save_language_switcher_options :checkbox[name="icl_lso_flags"]').attr('checked')){
+        jQuery('#lang_sel_footer .iclflag').show();
+    }else{
+        jQuery('#lang_sel_footer .iclflag').hide();
+    }
+	
+	if(icl_lp_footer_font_current_normal){                                                                     
+        jQuery('#lang_sel_footer a:first').css('color',icl_lp_footer_font_current_normal) ; 
+    } 
+	
+	if(icl_lp_footer_font_current_hover){
+        jQuery('#lang_sel_footer a:first, #lang_sel_footer a.lang_sel_sel').unbind('hover');
+        jQuery('#lang_sel_footer a:first, #lang_sel_footer a.lang_sel_sel').hover(
+            function(){jQuery(this).css('color',icl_lp_footer_font_current_hover)},
+            function(){
+                jQuery(this).css('color',icl_lp_footer_font_current_normal);
+                jQuery('#lang_sel_footer a.lang_sel_sel').css('color',icl_lp_footer_font_current_normal);
+                }
+            );
+    }
+    
+    if(icl_lp_footer_background_current_normal){
+        jQuery('#lang_sel_footer a:first').css('background-color', icl_lp_footer_background_current_normal); 
+        
+        jQuery('#lang_sel_footer a:first').unbind('hover');
+        jQuery('#lang_sel_footer a:first').hover(
+            function(){jQuery(this).css('background-color', '')},
+            function(){jQuery(this).css('background-color', icl_lp_footer_background_current_normal)}
+            );
+        
+    }
+    
+    if(icl_lp_footer_background_current_hover){                                                          
+        jQuery('#lang_sel_footer a:first').unbind('hover');
+        jQuery('#lang_sel_footer a:first').hover(
+            function(){jQuery(this).css('background-color', icl_lp_footer_background_current_hover)},
+            function(){jQuery(this).css('background-color', icl_lp_footer_background_current_normal)}
+            );
+    }
+    
+}
+
+function iclUpdateLangSelColorSchemeFooter(){
+    scheme = jQuery(this).val();
+    if(scheme && confirm(jQuery(this).next().html())){
+        jQuery('#icl_lang_preview_config_footer input[type="text"]').each(function(){
+            thisn = jQuery(this).attr('name').replace('icl_lang_sel_footer_config[','').replace(']','');
+            value = jQuery('#icl_lang_sel_footer_config_alt_'+scheme+'_'+thisn).val();
+            jQuery(this).val(value);
+                        
+            switch(jQuery(this).attr('name')){
+                case 'icl_lang_sel_footer_config[font-current-normal]':
+                    icl_lp_footer_font_current_normal = value;
+                    break;
+                case 'icl_lang_sel_footer_config[font-current-hover]':
+                    icl_lp_footer_font_current_hover = value;
+                    break;                
+                case 'icl_lang_sel_footer_config[background-current-normal]':
+                    icl_lp_footer_background_current_normal = value;
+                    break;
+                case 'icl_lang_sel_footer_config[background-current-hover]':
+                    icl_lp_footer_background_current_hover = value;
+                    break;                
+                case 'icl_lang_sel_footer_config[font-other-normal]':
+                    icl_lp_footer_font_other_normal = value;
+                    break;
+                case 'icl_lang_sel_footer_config[font-other-hover]':
+                    icl_lp_footer_font_other_hover = value;
+                    break;                
+                case 'icl_lang_sel_footer_config[background-other-normal]':
+                    icl_lp_footer_background_other_normal = value;
+                    break;
+                case 'icl_lang_sel_footer_config[background-other-hover]':
+                    icl_lp_footer_background_other_hover = value;
+                    break;                
+                case 'icl_lang_sel_footer_config[border]':
+                    icl_lp_footer_border = value;
+                    break;
+				case 'icl_lang_sel_footer_config[background]':
+                    icl_lp_footer_background = value;
+                    break;             
+            }            
+            
+        });
+        
+        iclRenderLangPreviewFooter();
+        
+    }
+}
+
+
+
+
+// Picker f
+var cp = new ColorPicker();
+function pickColor(color) {
+			jQuery('#'+icl_cp_target).val(color);
+			jQuery('#'+icl_cp_target).trigger('keyup');
+		}
+cp.writeDiv();
+
+function iclHideLanguagesCallback(){
+    iclSaveForm_success_cb.push(function(frm,res){
+        jQuery('#icl_hidden_languages_status').html(res[1]);
+    });
+}
+
+function icl_reset_languages(){
+    var thisb = jQuery(this);
+    if(confirm(thisb.next().html())){
+        thisb.attr('disabled','disabled').next().html(icl_ajxloaderimg).fadeIn();
+        jQuery.ajax({
+                type: "POST",
+                url: icl_ajx_url,
+                data: "icl_ajx_action=reset_languages",
+                success: function(msg){location.href=location.pathname+location.search}
+        });    
+        
+        
+    }
+}
+
+function iclEnableContentTranslation(){
+    var val = jQuery(':radio[name=icl_translation_option]:checked').val();
+    jQuery(this).attr('disabled','disabled');
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=toggle_content_translation&wizard=1&new_val="+val,
+        success: function(msg){
+            spl = msg.split('|');
+            if(spl[1]){
+                location.href = spl[1];
+            }else{
+                location.href = location.href.replace(/#.*/,'');
+            }
+        }
+    });
+    return false;         
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/navigation.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/navigation.js
new file mode 100644
index 0000000..e627dde
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/navigation.js
@@ -0,0 +1,25 @@
+addLoadEvent(function(){         
+    jQuery('#icl_navigation_show_cat_menu').change(function(){
+        if(jQuery(this).attr('checked')){
+            jQuery('#icl_cat_menu_contents').fadeIn();
+        }else{
+            jQuery('#icl_cat_menu_contents').fadeOut();
+        }
+    })
+    jQuery('#icl_navigation_form').submit(iclSaveForm);
+
+    jQuery('#icl_navigation_caching_clear').click(clearNavigationCache);    
+    
+});
+
+function clearNavigationCache() {
+    fadeInAjxResp('#icl_ajx_response_clear_cache', icl_ajxloaderimg);
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=icl_clear_nav_cache",
+        success: function(msg){
+            fadeInAjxResp('#icl_ajx_response_clear_cache', icl_ajx_cache_cleared);                                         
+        }
+    });
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/overview.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/overview.js
new file mode 100644
index 0000000..857d2b1
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/overview.js
@@ -0,0 +1,9 @@
+jQuery(document).ready(function(){
+    jQuery('.handlediv').click(function(){
+        if(jQuery(this).parent().hasClass('closed')){
+            jQuery(this).parent().removeClass('closed');
+        }else{
+            jQuery(this).parent().addClass('closed');
+        }
+    })
+});
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/scripts.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/scripts.js
new file mode 100644
index 0000000..fcfdf63
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/scripts.js
@@ -0,0 +1,481 @@
+jQuery(document).ready(function(){
+    if(jQuery('#category-adder').html()){
+        jQuery('#category-adder').prepend('<p>'+icl_cat_adder_msg+'</p>');
+    }
+    jQuery('select[name="icl_post_language"]').change(iclPostLanguageSwitch);
+    jQuery('#noupdate_but input[type="button"]').click(iclSetDocumentToDate);
+    jQuery('select[name="icl_translation_of"]').change(function(){jQuery('#icl_translate_options').fadeOut();});
+    jQuery('#icl_dismiss_help').click(iclDismissHelp);
+    jQuery('#icl_dismiss_upgrade_notice').click(iclDismissUpgradeNotice);
+    jQuery('#icl_dismiss_page_estimate_hint').click(iclDismissPageEstimateHint);
+    jQuery('#icl_show_page_estimate_hint').click(iclShowPageEstimateHint);
+    jQuery('a.icl_toggle_show_translations').click(iclToggleShowTranslations);
+    
+    icl_tn_initial_value   = jQuery('#icl_post_note textarea').val();
+    jQuery('#icl_post_add_notes h4 a').live('click', iclTnOpenNoteBox);
+    jQuery('#icl_post_note textarea').live('keyup', iclTnClearButtonState);
+    jQuery('#icl_tn_clear').live('click', function(){jQuery('#icl_post_note textarea').val(''); jQuery(this).attr('disabled','disabled')});
+    jQuery('#icl_tn_save').live('click', iclTnCloseNoteBox);
+    
+    jQuery('#icl_pt_hide').click(iclHidePTControls);
+    jQuery('#icl_pt_show').click(iclShowPTControls);
+    
+    jQuery('#icl_pt_controls ul li :checkbox').live('change', function(){
+        if(jQuery('#icl_pt_controls ul li :checkbox:checked').length){
+            jQuery('#icl_pt_send').removeAttr('disabled');
+        }else{
+            jQuery('#icl_pt_send').attr('disabled', 'disabled');
+        }
+        iclPtCostEstimate();
+    });
+    jQuery('#icl_pt_send').live('click', iclPTSend);
+    
+});
+
+var icl_tn_initial_value   = '';
+
+window.onbeforeunload = function() { 
+    if(icl_tn_initial_value != jQuery('#icl_post_note textarea').val()){
+        return jQuery('#icl_tn_cancel_confirm').val();
+    }
+}
+
+
+
+
+
+function fadeInAjxResp(spot, msg, err){
+    if(err != undefined){
+        col = jQuery(spot).css('color');
+        jQuery(spot).css('color','red');
+    }
+    jQuery(spot).html('<span>'+msg+'<span>');
+    jQuery(spot).fadeIn();
+    window.setTimeout(fadeOutAjxResp, 3000, spot);
+    if(err != undefined){
+        jQuery(spot).css('color',col);
+    }
+}
+
+function fadeOutAjxResp(spot){
+    jQuery(spot).fadeOut();
+}
+
+var icl_ajxloaderimg = '<img src="'+icl_ajxloaderimg_src+'" alt="loading" width="16" height="16" />';
+
+var iclHaltSave = false; // use this for multiple 'submit events'
+var iclSaveForm_success_cb = new Array();
+function iclSaveForm(){
+    
+    if(iclHaltSave){
+        return false;
+    }
+    var formname = jQuery(this).attr('name');
+    jQuery('form[name="'+formname+'"] .icl_form_errors').html('').hide();
+    ajx_resp = jQuery('form[name="'+formname+'"] .icl_ajx_response').attr('id');
+    fadeInAjxResp('#'+ajx_resp, icl_ajxloaderimg);
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action="+jQuery(this).attr('name')+"&"+jQuery(this).serialize(),
+        success: function(msg){
+            spl = msg.split('|');
+            if(parseInt(spl[0]) == 1){
+                fadeInAjxResp('#'+ajx_resp, icl_ajx_saved);                                         
+                for(i=0;i<iclSaveForm_success_cb.length;i++){
+                    iclSaveForm_success_cb[i](jQuery('form[name="'+formname+'"]'), spl);    
+                }
+            }else{                        
+                jQuery('form[name="'+formname+'"] .icl_form_errors').html(spl[1]);
+                jQuery('form[name="'+formname+'"] .icl_form_errors').fadeIn()
+                fadeInAjxResp('#'+ajx_resp, icl_ajx_error,true);
+            }  
+        }
+    });
+    return false;     
+}
+
+function iclPostLanguageSwitch(){
+    var lang = jQuery(this).attr('value');
+    var ajx = location.href.replace(/#(.*)$/,'');
+    if(-1 == location.href.indexOf('?')){
+        url_glue='?';
+    }else{
+        url_glue='&';
+    }
+    
+    if(icl_this_lang != lang){
+        jQuery('#icl_translate_options').fadeOut();
+    }else{
+        jQuery('#icl_translate_options').fadeIn();
+    }
+    
+    if(jQuery('#parent_id').length > 0){
+        jQuery('#parent_id').load(ajx+url_glue+'lang='+lang + ' #parent_id option',{lang_switch:jQuery('#post_ID').attr('value')}, function(resp){
+            tow1 = resp.indexOf('<div id="translation_of_wrap">');
+            tow2 = resp.indexOf('</div><!--//translation_of_wrap-->');            
+            jQuery('#translation_of_wrap').html(resp.substr(tow1+31, tow2-tow1-31));                   
+            if(-1 == jQuery('#parent_id').html().indexOf('selected="selected"')){
+                jQuery('#parent_id').attr('value','');
+            }        
+        });
+    }else if(jQuery('#categorydiv').length > 0){
+        jQuery('.categorydiv').hide();
+        var ltlhlpr = document.createElement('div');
+        ltlhlpr.setAttribute('style','display:none');
+        ltlhlpr.setAttribute('id','icl_ltlhlpr');
+        jQuery(this).after(ltlhlpr);
+        jQuery('#categorydiv').slideUp();        
+        jQuery('#icl_ltlhlpr').load(ajx+url_glue+'icl_ajx=1&lang='+lang + ' #categorydiv',{}, function(resp){ 
+            tow1 = resp.indexOf('<div id="translation_of_wrap">');
+            tow2 = resp.indexOf('</div><!--//translation_of_wrap-->');            
+            jQuery('#translation_of_wrap').html(resp.substr(tow1+31, tow2-tow1-31));           
+            jQuery('#icl_ltlhlpr').html(jQuery('#icl_ltlhlpr').html().replace('categorydiv',''));
+            jQuery('#categorydiv').html(jQuery('#icl_ltlhlpr div').html());
+            jQuery('#categorydiv').slideDown();            
+            jQuery('#icl_ltlhlpr').remove();    
+            jQuery('#category-adder').prepend('<p>'+icl_cat_adder_msg+'</p>');
+            
+            var tx = '';
+            jQuery('.categorydiv').each(function(){
+                var id = jQuery(this).attr('id');            
+                var tx = id.replace(/^taxonomy-/,'');
+
+                if(id != 'taxonomy-category'){                    
+                    jQuery('#'+tx+'div').html(jQuery(resp).find('#'+tx+'div').html());
+                }
+                
+                
+                /* WP scrap */
+                jQuery(".categorydiv").each(function () {
+                    var this_id = jQuery(this).attr("id"),
+                        noSyncChecks = false,
+                        syncChecks, catAddAfter, taxonomyParts, taxonomy, settingName;
+                    taxonomyParts = this_id.split("-");
+                    taxonomyParts.shift();
+                    taxonomy = taxonomyParts.join("-");
+                    settingName = taxonomy + "_tab";
+                    if (taxonomy == "category") {
+                        settingName = "cats"
+                    }
+                    jQuery("a", "#" + taxonomy + "-tabs").click(function () {
+                        var t = jQuery(this).attr("href");
+                        jQuery(this).parent().addClass("tabs").siblings("li").removeClass("tabs");
+                        jQuery("#" + taxonomy + "-tabs").siblings(".tabs-panel").hide();
+                        jQuery(t).show();
+                        if ("#" + taxonomy + "-all" == t) {
+                            deleteUserSetting(settingName)
+                        } else {
+                            setUserSetting(settingName, "pop")
+                        }
+                        return false
+                    });
+                    if (getUserSetting(settingName)) {
+                        jQuery('a[href="#' + taxonomy + '-pop"]', "#" + taxonomy + "-tabs").click()
+                    }
+                    jQuery("#new" + taxonomy).one("focus", function () {
+                        jQuery(this).val("").removeClass("form-input-tip")
+                    });
+                    jQuery("#" + taxonomy + "-add-submit").click(function () {
+                        jQuery("#new" + taxonomy).focus()
+                    });
+                    syncChecks = function () {
+                        if (noSyncChecks) {
+                            return
+                        }
+                        noSyncChecks = true;
+                        var th = jQuery(this),
+                            c = th.is(":checked"),
+                            id = th.val().toString();
+                        jQuery("#in-" + taxonomy + "-" + id + ", #in-" + taxonomy + "-category-" + id).attr("checked", c);
+                        noSyncChecks = false
+                    };
+                    catAddBefore = function (s) {
+                        if (!jQuery("#new" + taxonomy).val()) {
+                            return false
+                        }
+                        s.data += "&" + jQuery(":checked", "#" + taxonomy + "checklist").serialize();
+                        return s
+                    };
+                    catAddAfter = function (r, s) {
+                        var sup, drop = jQuery("#new" + taxonomy + "_parent");
+                        if ("undefined" != s.parsed.responses[0] && (sup = s.parsed.responses[0].supplemental.newcat_parent)) {
+                            drop.before(sup);
+                            drop.remove()
+                        }
+                    };
+                    jQuery("#" + taxonomy + "checklist").wpList({
+                        alt: "",
+                        response: taxonomy + "-ajax-response",
+                        addBefore: catAddBefore,
+                        addAfter: catAddAfter
+                    });
+                    jQuery("#" + taxonomy + "-add-toggle").click(function () {
+                        jQuery("#" + taxonomy + "-adder").toggleClass("wp-hidden-children");
+                        jQuery('a[href="#' + taxonomy + '-all"]', "#" + taxonomy + "-tabs").click();
+                        return false
+                    });
+                    jQuery("#" + taxonomy + "checklist li.popular-category :checkbox, #" + taxonomy + "checklist-pop :checkbox").live("click", function () {
+                        var t = jQuery(this),
+                            c = t.is(":checked"),
+                            id = t.val();
+                        if (id && t.parents("#taxonomy-" + taxonomy).length) {
+                            jQuery("#in-" + taxonomy + "-" + id + ", #in-popular-" + taxonomy + "-" + id).attr("checked", c)
+                        }
+                    })
+                });         
+                /* WP scrap - end */    
+                
+            }); 
+            jQuery('.categorydiv').show();                
+            
+
+            
+            
+        });    
+        
+    }
+}
+
+function iclSetDocumentToDate(){
+    var thisbut = jQuery(this);
+    if(!confirm(jQuery('#noupdate_but_wm').html())) return;
+    thisbut.attr('disabled','disabled');
+    thisbut.css({'background-image':"url('"+icl_ajxloaderimg_src+"')", 'background-position':'center right', 'background-repeat':'no-repeat'});
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=set_post_to_date&post_id="+jQuery('#post_ID').val(),
+            success: function(msg){
+                spl = msg.split('|');
+                thisbut.removeAttr('disabled');
+                thisbut.css({'background-image':'none'});
+                thisbut.parent().remove();
+                var st = jQuery('#icl_translations_status td.icl_translation_status_msg');
+                st.each(function(){
+                    jQuery(this).html(jQuery(this).html().replace(spl[0],spl[1]))                     
+                })
+                jQuery('#icl_minor_change_box').fadeIn();
+            }
+        });        
+}
+
+function iclDismissHelp(){
+    var thisa = jQuery(this);
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=dismiss_help",
+            success: function(msg){
+                thisa.closest('#message').fadeOut();    
+            }
+    });    
+    return false;
+}
+
+function iclDismissUpgradeNotice(){
+    var thisa = jQuery(this);
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=dismiss_upgrade_notice",
+            success: function(msg){
+                thisa.parent().parent().fadeOut();    
+            }
+    });    
+    return false;
+}
+
+var iclShowPageEstimateHint_img = false;
+function iclDismissPageEstimateHint(){
+    var thisa = jQuery(this);
+    if(!iclShowPageEstimateHint_img){
+        iclShowPageEstimateHint_img = jQuery('#icl_dismiss_page_estimate_hint').parent().find('img').attr('src');        
+    }
+    jQuery('#icl_show_page_estimate_hint').find('img').attr('src', iclShowPageEstimateHint_img);
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=dismiss_page_estimate_hint",
+            success: function(msg){
+                thisa.parent().fadeOut(function(){jQuery('#icl_show_page_estimate_hint').fadeIn()});                    
+            }
+    });    
+    return false;
+} 
+
+function iclShowPageEstimateHint(){
+    var thisa = jQuery(this);
+    iclShowPageEstimateHint_img = thisa.find('img').attr('src');
+    thisa.find('img').attr('src', icl_ajxloaderimg_src);
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=dismiss_page_estimate_hint",
+            success: function(msg){
+                thisa.fadeOut(function(){jQuery('#icl_dismiss_page_estimate_hint').parent().fadeIn();});                    
+            }
+    });    
+    return false;    
+}
+
+function iclToggleShowTranslations(){
+    jQuery('a.icl_toggle_show_translations').toggle();
+    jQuery('#icl_translations_table').toggle();
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=toggle_show_translations"
+    });        
+    return false;
+}
+
+function iclTnOpenNoteBox(){
+    jQuery('#icl_post_add_notes #icl_post_note').slideDown();
+    jQuery('#icl_post_note textarea').focus();
+    return false;
+}
+function iclTnClearButtonState(){
+    if(jQuery.trim(jQuery(this).val())){
+        jQuery('#icl_tn_clear').removeAttr('disabled');
+    }else{
+        jQuery('#icl_tn_clear').attr('disabled', 'disabled');
+    }  
+}
+function iclTnCloseNoteBox(){
+    jQuery('#icl_post_add_notes #icl_post_note').slideUp('fast', function(){
+        if(icl_tn_initial_value != jQuery('#icl_post_note textarea').val()){
+            jQuery('#icl_tn_not_saved').fadeIn();
+        }else{
+            jQuery('#icl_tn_not_saved').fadeOut();
+        }
+    });
+}
+
+function iclShowPTControls(){
+    var thisa = jQuery(this);
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=toggle_pt_controls&value=0",
+            success: function(msg){
+                jQuery('#icl_pt_controls').slideDown();
+                thisa.fadeOut(function(){jQuery('#icl_pt_hide').fadeIn();});                    
+            }
+    });
+    return false;    
+}
+
+function iclHidePTControls(){
+    var thisa = jQuery(this);
+    jQuery.ajax({
+            type: "POST",
+            url: icl_ajx_url,
+            data: "icl_ajx_action=toggle_pt_controls&value=1",
+            success: function(msg){
+                thisa.fadeOut(function(){
+                    jQuery('#icl_pt_controls').slideUp(function(){
+                        jQuery('#icl_pt_show').fadeIn()
+                    });
+                });
+            }
+    }); 
+    return false;   
+}
+
+function iclPtCostEstimate(){    
+    var estimate = 0;
+    var words = parseInt(jQuery('#icl_pt_wc').val());
+    jQuery('#icl_pt_controls ul li :checkbox:checked').each(
+        function(){
+            lang = jQuery(this).attr('id').replace(/^icl_pt_to_/,'');
+            rate = jQuery('#icl_pt_rate_'+lang).val();
+            estimate += words * rate;
+        }
+    )
+    if(estimate < 1){
+        precision = Math.floor(estimate).toString().length + 1;    
+    }else{
+        precision = Math.floor(estimate).toString().length + 2;
+    }
+    
+    jQuery('#icl_pt_cost_estimate').html(estimate.toPrecision(precision));
+}
+
+function iclPTSend(){
+    jQuery('#icl_pt_error, #icl_pt_success').hide();
+    jQuery('#icl_pt_send').attr('disabled', 'disabled');
+    
+    if(jQuery('#icl_pt_controls ul li :checkbox:checked').length==0) return false;
+    
+    target_languages = new Array();
+    jQuery('#icl_pt_controls ul li :checkbox:checked').each(function(){
+        target_languages.push(jQuery(this).val());
+    });
+    
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        dataType: 'json',
+        data: "icl_ajx_action=send_translation_request&post_ids=" + jQuery('#icl_pt_post_id').val() 
+            + '&icl_post_type['+ jQuery('#icl_pt_post_id').val() + ']=' + jQuery('#icl_pt_post_type').val() 
+            + '&target_languages='+target_languages.join('#')
+            + '&tn_note_'+jQuery('#icl_pt_post_id').val()+'=' + jQuery('#icl_pt_tn_note').val(),
+        success: function(msg){
+            for(i in msg){
+                p = msg[i];    
+            }
+            if(p.status > 0){
+                location.href = location.href.replace(/#(.+)/,'')+'&icl_message=success';
+            }else{
+                jQuery('#icl_pt_error').fadeIn();
+            }
+        }
+    });
+    
+    
+}
+
+function icl_pt_reload_translation_box(){
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        dataType: 'json',
+        data: "icl_ajx_action=get_translator_status",
+        success: function(){
+            jQuery('#icl_pt_hide').hide();
+            jQuery('#icl_pt_controls').html(icl_ajxloaderimg+'<br class="clear" />');    
+            jQuery.get(location.href, {rands:Math.random()}, function(data){
+                jQuery('#icl_pt_controls').html(jQuery(data).find('#icl_pt_controls').html());
+                icl_tb_init('a.icl_thickbox');
+                icl_tb_set_size('a.icl_thickbox');
+                jQuery('#icl_pt_hide').show();
+                
+            })
+        }
+    });
+}
+
+function icl_pt_reload_translation_options(){
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        dataType: 'json',
+        data: "icl_ajx_action=get_translator_status",
+        success: function(){
+            jQuery('#icl-tr-opt').html(icl_ajxloaderimg+'<br class="clear" />');    
+            jQuery.get(location.href, {rands:Math.random()}, function(data){
+                jQuery('#icl-tr-opt').html(jQuery(data).find('#icl-tr-opt').html());
+                icl_tb_init('a.icl_thickbox');
+                icl_tb_set_size('a.icl_thickbox');
+            })
+        }
+    });
+    
+}
+
+
+//jQuery('#TB_window').live('unload', function(){
+//    console.log(jQuery(this).find('iframe').attr('src'));
+//});
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/sitepress.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/sitepress.js
new file mode 100644
index 0000000..aa8f552
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/sitepress.js
@@ -0,0 +1,37 @@
+function addLoadEvent(func) {
+  var oldonload = window.onload;
+  if (typeof window.onload != 'function') {
+    window.onload = func;
+  } else {
+    window.onload = function() {
+      if (oldonload) {
+        oldonload();
+      }
+      func();
+    }
+  }  
+}
+addLoadEvent(function(){
+    var lhid = document.createElement('input');
+    lhid.setAttribute('type','hidden');
+    lhid.setAttribute('name','lang');
+    lhid.setAttribute('value',icl_lang);     
+    src = document.getElementById('searchform');   
+    if(src){
+        src.appendChild(lhid);
+        src.action=icl_home; 
+    }
+});
+
+function icl_retry_mtr(a){
+    var id = a.getAttribute('id');
+    spl = id.split('_');
+    var loc = location.href.replace(/#(.*)$/,'').replace(/(&|\?)(retry_mtr)=([0-9]+)/g,'').replace(/&nonce=([0-9a-z]+)(&|$)/g,'');
+    if(-1 == loc.indexOf('?')){
+        url_glue='?';
+    }else{
+        url_glue='&';
+    }    
+    location.href=loc+url_glue+'retry_mtr='+spl[3]+'&nonce='+spl[4];
+    return false;
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/string-translation.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/string-translation.js
new file mode 100644
index 0000000..8a9ea24
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/string-translation.js
@@ -0,0 +1,361 @@
+jQuery(document).ready(function(){
+    jQuery('a[href="#icl-st-toggle-translations"]').click(icl_st_toggler);
+    jQuery('.icl-st-inline textarea').focus(icl_st_monitor_ta);
+    jQuery('.icl-st-inline textarea').keyup(icl_st_monitor_ta_check_modifications);
+    jQuery(".icl_st_form").submit(icl_st_submit_translation);
+    jQuery('select[name="icl_st_filter_status"]').change(icl_st_filter_status);
+    jQuery('select[name="icl_st_filter_context"]').change(icl_st_filter_context);
+    jQuery('#icl_st_filter_search_sb').click(icl_st_filter_search);    
+    jQuery('#icl_st_filter_search_remove').click(icl_st_filter_search_remove);    
+    
+    jQuery('.check-column input').click(icl_st_select_all);
+    jQuery('#icl_st_delete_selected').click(icl_st_delete_selected);
+    jQuery('#icl_st_send_need_translation').click(icl_st_send_need_translation);
+    jQuery('#icl_st_do_send_strings').submit(icl_st_do_send_strings);
+    
+    jQuery('#icl_st_po_translations').click(function(){
+        if(jQuery(this).attr('checked')){
+            jQuery('#icl_st_po_language').removeAttr('disabled').fadeIn();
+        }else{
+            jQuery('#icl_st_po_language').attr('disabled','disabled').fadeOut();
+        }
+    });
+    jQuery('#icl-tr-opt :checkbox').click(icl_st_update_languages);
+    jQuery('.icl_st_row_cb, .check-column :checkbox').click(icl_st_update_checked_elements);
+    jQuery('.icl_htmlpreview_link').click(icl_st_show_html_preview);
+    jQuery('#icl_st_po_form').submit(icl_validate_po_upload);
+    jQuery('#icl_st_review_strings').submit(icl_st_review_strings);
+    
+    jQuery('.handlediv').click(function(){
+        if(jQuery(this).parent().hasClass('closed')){
+            jQuery(this).parent().removeClass('closed');
+        }else{
+            jQuery(this).parent().addClass('closed');
+        }
+    })
+    
+    jQuery('#icl_st_more_options').submit(iclSaveForm);
+    
+    jQuery('#icl_st_option_write_form').submit(icl_st_admin_options_form_submit);
+    jQuery('#icl_st_option_write_form').submit(iclSaveForm);
+    
+    jQuery('.icl_stow_toggler').click(icl_st_admin_strings_toggle_strings);
+    
+    jQuery('#icl_st_ow_export').click(icl_st_ow_export_selected);
+    jQuery('#icl_st_ow_export_close').click(icl_st_ow_export_close);
+    
+    
+        
+    // Picker align
+    jQuery(".pick-show").click(function () {
+        var set = jQuery(this).offset();
+           jQuery("#colorPickerDiv").css({"top":set.top-180,"left":set.left, "z-index":99});
+    });
+    
+});
+
+function icl_st_toggler(){
+    jQuery(".icl-st-inline").slideUp();
+    var inl = jQuery(this).parent().next().next();
+    if(inl.css('display') == 'none'){
+        inl.slideDown();            
+    }else{
+        inl.slideUp();            
+    }
+    icl_st_show_html_preview_close();
+}
+
+var icl_st_ta_cache = new Array();
+var icl_st_cb_cache = new Array();
+function icl_st_monitor_ta(){
+    var id = jQuery(this).attr('id').replace(/^icl_st_ta_/,'');
+    if(icl_st_ta_cache[id] == undefined){
+        icl_st_ta_cache[id] = jQuery(this).val();        
+        icl_st_cb_cache[id] = jQuery('#icl_st_cb_'+id).attr('checked');
+    }    
+}
+
+function icl_st_monitor_ta_check_modifications(){
+    var id = jQuery(this).attr('id').replace(/^icl_st_ta_/,'');
+    if(icl_st_ta_cache[id] != jQuery(this).val()){
+        jQuery('#icl_st_cb_'+id).removeAttr('checked');
+    }else{
+        if(icl_st_cb_cache[id]){
+            jQuery('#icl_st_cb_'+id).attr('checked','checked');
+        }
+    }
+    icl_st_show_html_preview_close();
+}
+
+function icl_st_submit_translation(){
+    var thisf = jQuery(this);
+    var postvars = thisf.serialize();
+    postvars += '&icl_ajx_action=icl_st_save_translation';
+    thisf.contents().find('textarea, input').attr('disabled','disabled');
+    thisf.contents().find('.icl_ajx_loader').fadeIn();
+    var string_id = thisf.find('input[name="icl_st_string_id"]').val();
+    jQuery.post(icl_ajx_url, postvars, function(msg){
+        thisf.contents().find('textarea, input').removeAttr('disabled');
+        thisf.contents().find('.icl_ajx_loader').fadeOut();
+        spl = msg.split('|');
+        jQuery('#icl_st_string_status_'+string_id).html(spl[1]);
+    })
+    return false;
+}
+
+function icl_st_filter_status(){
+    var qs = jQuery(this).val() != '' ? '&status=' + jQuery(this).val() : '';
+    location.href=location.href.replace(/#(.*)$/,'').replace(/&paged=([0-9]+)/,'').replace(/&updated=true/,'').replace(/&status=([0-9])/g,'') + qs;
+}
+function icl_st_filter_context(){
+    var qs = jQuery(this).val() != '' ? '&context=' + jQuery(this).val() : '';
+    location.href=location.href.replace(/#(.*)$/,'').replace(/&paged=([0-9]+)/,'').replace(/&updated=true/,'').replace(/&context=(.*)/g,'') + qs;
+}
+function icl_st_filter_search(){
+    var val = jQuery('#icl_st_filter_search').val();
+    var exact_match = jQuery('#icl_st_filter_search_em').attr('checked');
+    var qs = val != '' ? '&search=' + val : '';
+     qs = qs.replace(/&em=1/g,'');
+    if(exact_match){
+        qs += '&em=1';
+    }
+    location.href=location.href.replace(/#(.*)$/,'').replace(/&paged=([0-9]+)/,'').replace(/&updated=true/,'').replace(/&search=(.*)/g,'') + qs;
+}
+function icl_st_filter_search_remove(){
+    location.href=location.href.replace(/#(.*)$/,'').replace(/&search=(.*)/g,'').replace(/&em=1/g,'');
+}
+
+function icl_st_select_all(){
+    if(jQuery(this).attr('checked')){
+        jQuery('.icl_st_row_cb, .check-column input').attr('checked','checked');
+    }else{
+        jQuery('.icl_st_row_cb, .check-column input').removeAttr('checked');
+    }
+}
+
+function icl_st_delete_selected(){
+    if(!jQuery('.icl_st_row_cb:checked').length || !confirm(jQuery(this).next().html())){
+        return false;
+    }
+    var delids = [];
+    jQuery('.icl_st_row_cb:checked').each(function(){
+        delids.push(jQuery(this).val());        
+    });
+    if(delids){
+        postvars = 'icl_ajx_action=icl_st_delete_strings&value='+delids.join(',');
+        jQuery.post(icl_ajx_url, postvars, function(){
+            for(i=0; i < delids.length; i++){
+                jQuery('.icl_st_row_cb[value="'+delids[i]+'"]').parent().parent().fadeOut('fast', function(){jQuery(this).remove()});
+            }
+        })
+    }
+    return false;
+}
+
+function icl_st_review_strings(){
+    if(!jQuery('.icl_st_row_cb:checked').length){
+        return false;
+    }
+    var sendids = [];
+    jQuery('.icl_st_row_cb:checked').each(function(){
+        sendids.push(jQuery(this).val());        
+    });
+    var trlangs = [];
+    jQuery('#icl-tr-opt input:checked').each(function(){trlangs.push(jQuery(this).val())});
+    
+    if(!sendids.length || !trlangs.length){
+        return false;
+    }
+    jQuery('#icl_st_review_strings input[name="strings"]').val(sendids.join(','));
+    jQuery('#icl_st_review_strings input[name="langs"]').val(trlangs.join(','));
+    
+    return true;
+    
+}
+
+function icl_st_send_need_translation(){
+    var trlangs = [];
+    jQuery('#icl-tr-opt input:checked').each(function(){trlangs.push(jQuery(this).val())});
+    if(!trlangs.length){
+        return false;
+    }
+    jQuery('#icl_st_review_strings input[name="strings"]').val('need');
+    jQuery('#icl_st_review_strings input[name="langs"]').val(trlangs.join(','));
+    document.getElementById('icl_st_review_strings').submit();
+    return false;
+}
+
+function icl_st_do_send_strings(){    
+    thisf = jQuery(this);        
+    var buttons = thisf.contents().find('input:submit, input:button');
+    if(jQuery('input[name="strings"]').val() == 'need'){
+        var all = '_all';
+    }else{
+        var all = '';   
+    }    
+    buttons.attr('disabled','disabled');
+    jQuery('#icl_st_send_progress').fadeIn();
+    postvars = 'icl_ajx_action=icl_st_send_strings'+all+'&' + thisf.serialize();
+    jQuery.post(icl_ajx_url, postvars, function(msg){
+        if(msg==1) buttons.removeAttr('disabled');
+        jQuery('#icl_st_send_progress').fadeOut('fast', function(){location.href=location.href.replace(/#(.*)$/,'')});
+    });
+    return false;
+}
+
+
+
+function icl_st_update_languages(){
+    if(!jQuery('#icl-tr-opt :checkbox:checked').length){
+        jQuery('#icl_st_send_selected, #icl_st_send_need_translation').attr('disabled','disabled');
+    }else{
+        if(jQuery('.icl_st_row_cb:checked, .check-column :checkbox:checked').length){
+            jQuery('#icl_st_send_selected').removeAttr('disabled');            
+        }
+        jQuery('#icl_st_send_need_translation').removeAttr('disabled');            
+    }
+}
+
+function icl_st_update_checked_elements(){    
+    if(!jQuery('.icl_st_row_cb:checked, .check-column :checkbox:checked').length){
+        jQuery('#icl_st_delete_selected, #icl_st_send_selected').attr('disabled','disabled');
+    }else{        
+        jQuery('#icl_st_delete_selected').removeAttr('disabled');
+        if(!jQuery('#icl-tr-opt').length || jQuery('#icl-tr-opt :checkbox:checked').length){
+            jQuery('#icl_st_send_selected').removeAttr('disabled');
+        }
+    }
+}
+
+function icl_st_show_html_preview(){
+    var parent = jQuery(this).parent();    
+    var textarea = parent.parent().prev().find('textarea[name="icl_st_translation"]');
+    if(parent.find('.icl_html_preview').css('display')=='none'){
+        parent.find('.icl_html_preview').html(textarea.val()).slideDown();
+    }else{
+        parent.find('.icl_html_preview').slideUp();
+    }
+    
+    return false;
+}
+
+function icl_st_show_html_preview_close(){
+    jQuery('.icl_html_preview').slideUp();
+}
+
+function icl_validate_po_upload(){
+    cont = jQuery(this).contents();
+    cont.find('.icl_error_text').hide();
+    if(!jQuery('#icl_po_file').val()){
+        cont.find('#icl_st_err_po').fadeIn();
+        return false;
+    }    
+    if(!cont.find('select[name="icl_st_i_context"]').val() && !cont.find('input[name="icl_st_i_context_new"]').val()){
+        cont.find('#icl_st_err_domain').fadeIn();
+        return false;
+    }
+    
+}
+
+var icl_show_in_source_scroll_once = false;
+jQuery('#icl_show_source_wrap').live('mouseover', function(){
+    if(icl_show_in_source_scroll_once){
+        icl_show_in_source(0, icl_show_in_source_scroll_once);
+        icl_show_in_source_scroll_once = false;
+    }
+})
+function icl_show_in_source(tabfile, line){
+    
+    if(icl_show_in_source_scroll_once){
+        if(line > 40){
+            line = line - 10;
+            location.href=location.protocol+'//'+location.host+location.pathname+location.search+'#icl_source_line_'+tabfile+'_'+line;
+        }
+    }else{
+        jQuery('.icl_string_track_source').fadeOut(
+            function(){
+                jQuery('#icl_string_track_source_'+tabfile).fadeIn(
+                    function(){
+                        
+                        if(line > 40){
+                            line = line - 10;
+                            location.href=location.protocol+'//'+location.host+location.pathname+location.search+'#icl_source_line_'+tabfile+'_'+line;
+                        }
+                        
+                        /*
+                        var divOffset = jQuery('#TB_ajaxContent').offset().top;
+                        var pOffset = jQuery('#icl_source_line_'+tabfile+'_'+line).offset().top;
+                        var pScroll = pOffset - divOffset - 90;                    
+                        jQuery('#TB_ajaxContent').animate({scrollTop: '+=' + pScroll}, 1000);
+                        */
+                        
+                    }
+                );
+            }
+        );
+    }
+    return false;
+}
+
+var cp = new ColorPicker();
+function pickColor(color) {
+            jQuery('#icl_st_hl_color').val(color).css('background-color',color);
+        }
+cp.writeDiv();
+
+function iclResizeIframe(){
+    jQuery('#icl_string_track_frame_wrap iframe').attr('height',jQuery('#TB_ajaxContent').height()-20);
+    jQuery('#icl_string_track_frame_wrap iframe').attr('width',jQuery('#TB_ajaxContent').width());
+}
+
+function icl_st_admin_options_form_submit(frm,msg){
+    if(jQuery('input:checkbox.icl_st_has_translations[checked!=true]').length){
+        c = confirm(jQuery('#icl_st_options_write_confirm').html());
+        if(c){
+            iclHaltSave = false;
+        }else{
+            iclHaltSave = true;
+        }
+    }
+    iclSaveForm_success_cb.push(function(){
+        jQuery('#icl_st_options_write_success').fadeIn();
+    });
+}
+
+
+function icl_st_admin_strings_toggle_strings(){
+    var thisa = jQuery(this);
+    jQuery(this).parent().next().slideToggle(function(){
+        if(thisa.html().charAt(0)=='+'){
+            thisa.html(thisa.html().replace(/^\+/,'-'));
+        }else{
+            thisa.html(thisa.html().replace(/^-/,'+'));
+        }
+    });
+    return false;
+}
+
+function icl_st_ow_export_selected(){
+    jQuery('#icl_st_ow_export').attr('disabled','disabled');
+    jQuery('#icl_st_option_writes .ajax_loader').fadeIn();
+    jQuery.ajax({
+        type: "POST",
+        dataType: 'json',
+        url: icl_ajx_url,
+        data: "icl_ajx_action=icl_st_ow_export&"+jQuery('#icl_st_option_write_form').serialize(),
+        success: function(res){            
+            jQuery('#icl_st_ow_export_out').html(res.message).slideDown();
+            jQuery('#icl_st_option_writes .ajax_loader').fadeOut(
+                function(){
+                    jQuery('#icl_st_ow_export_close').fadeIn();            
+                }
+            );
+            
+        }
+    });
+}
+
+function icl_st_ow_export_close(){
+    jQuery('#icl_st_ow_export_out').slideUp(function(){jQuery('#icl_st_ow_export_close').fadeOut()});
+    jQuery('#icl_st_ow_export').removeAttr('disabled');
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/tags.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/tags.js
new file mode 100644
index 0000000..92c0e05
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/tags.js
@@ -0,0 +1,45 @@
+jQuery(document).ready(function(){  
+    if(jQuery('form input[name="action"]').attr('value')=='add-tag'){
+        jQuery('.form-wrap p[class="submit"]').before(jQuery('#icl_tax_menu').html());    
+    }else{
+        jQuery('#edittag table[class="form-table"]').append(jQuery('#edittag table[class="form-table"] tr:last').clone());    
+        jQuery('#edittag table[class="form-table"] tr:last th:first').html('&nbsp;');
+        jQuery('#edittag table[class="form-table"] tr:last td:last').html(jQuery('#icl_tax_menu').html());        
+    }    
+    jQuery('#icl_tax_menu').remove();
+       
+   jQuery('select[name="icl_tag_language"]').change(function(){
+        var icl_subsubsub_save = jQuery('#icl_subsubsub').html();
+        var lang = jQuery(this).val();
+        var ajx = location.href.replace(/#(.*)$/,'');
+        ajx = ajx.replace(/pagenum=([0-9]+)/,'');
+        if(-1 == location.href.indexOf('?')){
+            url_glue='?';
+        }else{
+            url_glue='&';
+        }   
+
+        if(icl_this_lang != lang){
+            jQuery('#icl_translate_options').fadeOut();
+        }else{
+            jQuery('#icl_translate_options').fadeIn();
+        }
+        
+
+        jQuery('#posts-filter').parent().load(ajx+url_glue+'lang='+lang + ' #posts-filter', {}, function(resp){
+            strt = resp.indexOf('<span id="icl_subsubsub">');
+            endd = resp.indexOf('</span>\'', strt);
+            lsubsub = resp.substr(strt,endd-strt+7);
+            jQuery('table.widefat').before(lsubsub);            
+                                                                         
+            tag_start = resp.indexOf('<div class="tagcloud">');
+            tag_end  = resp.indexOf('</div>', tag_start);            
+            tag_cloud = resp.substr(tag_start+22,tag_end-tag_start-22);
+            jQuery('.tagcloud').html(tag_cloud);
+        });        
+        
+   })     
+    
+        
+});
+
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/theme-localization.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/theme-localization.js
new file mode 100644
index 0000000..14da34b
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/theme-localization.js
@@ -0,0 +1,92 @@
+addLoadEvent(function(){     
+    jQuery('#icl_theme_localization').submit(iclSaveThemeLocalization);
+    jQuery('#icl_theme_localization_type').submit(iclSaveThemeLocalizationType);
+    jQuery('#icl_tl_rescan').click(iclThemeLocalizationRescan);
+    jQuery('#icl_tl_rescan_p').submit(iclThemeLocalizationRescanP);
+    
+    jQuery('.check-column :checkbox').live('change', iclCheckColumn);
+});
+
+function iclSaveThemeLocalization(){
+    var ajx = location.href.replace(/#(.*)$/,'');
+    if(-1 == location.href.indexOf('?')){
+        url_glue='?';
+    }else{
+        url_glue='&';
+    }
+    spl = jQuery(this).serialize().split('&');    
+    var parameters = {};
+    for(var i=0; i< spl.length; i++){        
+        var par = spl[i].split('=');
+        eval('parameters.' + par[0] + ' = par[1]');
+    }    
+    jQuery('#icl_theme_localization_wrap').load(location.href + ' #icl_theme_localization_subwrap', parameters, function(){
+        fadeInAjxResp('#icl_ajx_response_fn', icl_ajx_saved);                                                 
+    }); 
+    return false;   
+}
+
+function iclSaveThemeLocalizationType(){
+    
+    var formname = jQuery(this).attr('name');
+    ajx_resp = jQuery('form[name="'+formname+'"] .icl_ajx_response').attr('id');
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action="+jQuery(this).attr('name')+"&"+jQuery(this).serialize(),
+        success: function(msg){
+            spl = msg.split('|');
+            location.href=location.href.replace(/#(.*)$/,'');
+        }
+    });
+    return false;         
+}
+
+function iclThemeLocalizationRescan(){
+    var thisb = jQuery(this);
+    thisb.next().fadeIn();
+    var data = "icl_ajx_action=icl_tl_rescan";
+    if(jQuery('#icl_load_mo_themes').attr('checked')){
+        data += '&icl_load_mo=1';
+    }
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: data,
+        success: function(msg){
+            thisb.next().fadeOut();
+            spl = msg.split('|');
+            jQuery('#icl_tl_scan_stats').html(spl[1]).fadeIn();
+            jQuery("#icl_strings_in_theme_wrap").load(location.href.replace(/#(.*)$/,'') + ' #icl_strings_in_theme');
+        }
+    });    
+    return false;
+}
+
+function iclThemeLocalizationRescanP(){
+    var thisf = jQuery(this);
+    thisf.contents().find('.icl_ajx_loader_p').fadeIn();
+    thisf.contents().find('input:submit').attr('disabled','disabled');
+
+    jQuery.ajax({
+        type: "POST",
+        url: icl_ajx_url,
+        data: "icl_ajx_action=icl_tl_rescan_p&"+thisf.serialize(),
+        success: function(msg){
+            thisf.contents().find('.icl_ajx_loader_p').fadeOut();
+            thisf.contents().find('input:submit').removeAttr('disabled');
+            spl = msg.split('|');
+            jQuery('#icl_tl_scan_stats_p').html(spl[1]).fadeIn();
+            jQuery("#icl_strings_in_plugins_wrap").load(location.href.replace(/#(.*)$/,'') + ' #icl_strings_in_plugins');
+        }
+    });    
+    return false;
+}
+
+function iclCheckColumn(){
+    if(jQuery(this).attr('checked')){
+        jQuery('#icl_strings_in_plugins :checkbox').attr('checked','checked');
+    }else{
+        jQuery('#icl_strings_in_plugins :checkbox').removeAttr('checked');
+    }    
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/translation-synchronization.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/translation-synchronization.js
new file mode 100644
index 0000000..8bcf3b5
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/translation-synchronization.js
@@ -0,0 +1,6 @@
+jQuery(document).ready(function(){
+    jQuery('#icl_page_sync_options').submit(iclSaveForm);    
+    jQuery('form[name="icl_plugins_texts"]').submit(iclSaveForm);
+    jQuery('form[name="icl_custom_tax_sync_options"]').submit(iclSaveForm);
+    jQuery('form[name="icl_custom_posts_sync_options"]').submit(iclSaveForm);
+})
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/js/wp-nav-menus.js b/wp-content/plugins/sitepress-multilingual-cms/res/js/wp-nav-menus.js
new file mode 100644
index 0000000..d9ba5f5
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/js/wp-nav-menus.js
@@ -0,0 +1,19 @@
+jQuery(document).ready(function(){
+    jQuery('#icl_menu_language').live('change', icl_wp_nav_language_change);
+});
+
+function icl_wp_nav_language_change(){
+    var thiss = jQuery(this);
+    thiss.attr('disabled', 'disabled');
+    var trid = jQuery('#icl_nav_menu_trid').val();
+    data = {icl_wp_nav_menu_ajax:'translation_of', lang:jQuery(this).val(), trid:trid}
+    jQuery.ajax({
+        type: 'POST',
+        data: data,
+        url: location.href,
+        success: function(res){
+            jQuery('#icl_translation_of_wrap').html(res);
+            thiss.removeAttr('disabled');
+        }
+    });
+}
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/languages.csv b/wp-content/plugins/sitepress-multilingual-cms/res/languages.csv
new file mode 100644
index 0000000..4a4664c
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/languages.csv
@@ -0,0 +1,64 @@
+"english_name","id","major","English","Spanish","German","French","Arabic","Bosnian","Bulgarian","Catalan","Czech","Slavic","Welsh","Danish","Greek","Esperanto","Estonian","Basque","Persian","Finnish","Irish","Hebrew","Hindi","Croatian","Hungarian","Armenian","Indonesian","Icelandic","Italian","Japanese","Korean","Kurdish","Latin","Latvian","Lithuanian","Macedonian","Maltese","Moldavian","Mongolian","Nepali","Dutch","Norwegian Bokmål","Punjabi","Polish","Portuguese, Portugal","Portuguese, Brazil","Quechua","Romanian","Russian","Slovenian","Somali","Albanian","Serbian","Swedish","Tamil","Thai","Turkish","Ukrainian","Urdu","Uzbek","Vietnamese","Yiddish","Chinese (Simplified)","Zulu","Chinese (Traditional)"
+"English",1,1,"English","Inglés","Englisch","Anglais","اÙ?Ø¥Ù?جÙ?Ù?زÙ?Ø©",,,,,"AngliÄ?tina",,,"Î?γγλικα",,,,,"englanti",,"×?× ×?×?×?ת",,,"angol",,,,"Inglese","è?±èª?","ì??ì?´",,,,,,,,,,"Engels",,,"angielski","Inglês","Inglês",,"EnglezÄ?","Ð?нглийÑ?кий",,,,,"Engelska",,"อัà¸?à¸?ฤษ","Ä°ngilizce",,,,,,"è?±è¯­",,"è?±èª?"
+"Spanish",2,1,"Spanish","Español","Spanisch","Espagnol","اÙ?أسباÙ?Ù?Ø©",,,,,"Å panielÄ?ina",,,"Î?Ï?Ï?ανικα",,,,,"espanja",,"ספר×?×?ת",,,"spanyol",,,,"Spagnolo","ã?¹ã??ã?¤ã?³èª?","ì?¤í??ì?¸ì?´",,,,,,,,,,"Spaans",,,"hiszpaÅ?ski","Espanhol","Espanhol",,"SpaniolÄ?","Ð?Ñ?панÑ?кий",,,,,"Spanska",,"สà¹?à¸?à¸?","Ä°spanyolca",,,,,,"西ç?­ç??语",,"西ç?­ç??èª?"
+"German",3,1,"German","Alemán","Deutsch","Allemand","اÙ?Ø£Ù?Ù?اÙ?Ù?Ø©",,,,,"NemÄ?ina",,,"Î?εÏ?μανικα",,,,,"saksa",,"×?ר×?× ×?ת",,,"német",,,,"Tedesco","ã??ã?¤ã??èª?","ë??ì?´",,,,,,,,,,"Duits",,,"niemiecki","Alemão","Alemão",,"GermanÄ?","Ð?емеÑ?кий",,,,,"Tyska",,"à¹?ยอรมัà¸?","Almanca",,,,,,"德语",,"å¾·èª?"
+"French",4,1,"French","Francés","Französisch","Français","اÙ?Ù?رÙ?سÙ?Ø©",,,,,"FrancúzÅ¡tina",,,"Î?αλλικα",,,,,"ranska",,"צרפת×?ת",,,"francia",,,,"Francese","ã??ã?©ã?³ã?¹èª?","ë¶?ì?´",,,,,,,,,,"Frans",,,"francuski","Francês","Francês",,"FrancezÄ?","ФÑ?анÑ?Ñ?зÑ?кий",,,,,"Franska",,"à¸?รัà¹?à¸?à¹?ศส","Fransızca",,,,,,"æ³?语",,"æ³?èª?"
+"Arabic",5,,"Arabic","Ã?rabe","Arabisch","Arabe","اÙ?عربÙ?Ø©",,,,,"ArabÄ?ina",,,"Î?Ï?αβικα",,,,,"arabia",,"ער×?×?ת",,,"arab",,,,"Arabo","ã?¢ã?©ã??ã?¢èª?","ì??ë??ì?´",,,,,,,,,,"Arabisch",,,"arabski","Ã?rabe","Ã?rabe",,"ArabicÄ?","Ð?Ñ?абÑ?кий",,,,,"Arabiska",,"อารà¸?ิà¸?","Arapça",,,,,,"é?¿æ??伯语",,"é?¿æ??伯èª?"
+"Bosnian",6,,"Bosnian","Bosnio","Bosnisch","Bosnien","اÙ?بÙ?سÙ?Ù?Ø©",,,,,"BosniaÄ?tina",,,"Î?οÏ?νιακα",,,,,"bosnia",,"Bosnian",,,"bosnyák",,,,"Bosniaco","ã??ã?¹ã??ã?¢èª?","ë³´ì¦?ë??ì??ì?´",,,,,,,,,,"Bosnisch",,,"boÅ?niacki","Bósnio","Bósnio",,"BosniacÄ?","Ð?оÑ?нийÑ?кий",,,,,"Bosniska",,"à¸?อสà¹?à¸?ียà¸?","BoÅ?nakça",,,,,,"æ³¢æ?¯å°¼äº?语",,"波士尼äº?èª?"
+"Bulgarian",7,,"Bulgarian","Búlgaro","Bulgarisch","Bulgare","اÙ?بÙ?غارÙ?Ø©",,,,,"BulharÄ?ina",,,"Î?οÏ?λγαÏ?ικα",,,,,"bulgaria",,"Bulgarian",,,"bolgár",,,,"Bulgaro","ã??ã?«ã?¬ã?ªã?¢èª?","ë¶?ê°?리ì??ì?´",,,,,,,,,,"Bulgaars",,,"buÅ?garski","Búlgaro","Búlgaro",,"BulgarÄ?","Ð?олгаÑ?Ñ?кий",,,,,"Bulgariska",,"à¸?ัลà¹?à¸?à¹?รียà¸?","Bulgarca",,,,,,"ä¿?å? å?©äº?语",,"ä¿?å? å?©äº?èª?"
+"Catalan",8,,"Catalan","Catalán","Katalanisch","Catalan","اÙ?Ù?اتاÙ?Ù?Ù?Ù?Ù?Ø©",,,"Català",,"KatalánÄ?ina",,,"Î?αÏ?αλανικα",,,,,"katalaani",,"Catalan",,,"katalán",,,,"Catalano","ã?«ã?¿ã?«ã?¼ã??ã?£èª?","ì¹´í??ë¡?ë??ì??ì?´",,,,,,,,,,"Catalaans",,,"kataloÅ?ski","Catalão","Catalão",,"CatalanÄ?","Ð?аÑ?аланÑ?кий",,,,,"Katalanska",,"à¸?ะà¸?ะลาà¸?","Katalan dili",,,,,,"å? æ³°ç½?å°¼äº?语",,"å? æ³°ç¾?å°¼äº?èª?"
+"Czech",9,,"Czech","Checo","Tschechisch","Tchèque","اÙ?تشÙ?Ù?Ù?Ø©",,,,"Ä?eÅ¡tina","Ä?eÅ¡tina",,,"ΤÏ?εÏ?ικη",,,,,"tsekki",,"Czech",,,"cseh",,,,"Ceco","ã??ã?§ã?³èª?","ì²´ì½?ì?¬ë¡?ë°?í?¤ì??ì?´",,,,,,,,,,"Tsjechisch",,,"czeski","Checa","Checa",,"CehÄ?","ЧеÑ?Ñ?кий",,,,,"Tjeckiska",,"à¹?à¸?à¹?à¸?","Ã?ekçe",,,,,,"æ?·å??语",,"æ?·å??èª?"
+"Slavic",10,,"Slavic","Eslavo","Slawisch","Slave","اÙ?سÙ?اÙ?Ù?Ø©",,,,,"SlávÄ?ina",,,"Σλαβικη",,,,,"slaavi",,"Slavic",,,"szláv",,,,"Slavo","ã?¹ã?©ã?´èª?æ´¾","ì?¬ë?¼ë¸?ì?´",,,,,,,,,,"Slavisch",,,"sÅ?owiaÅ?ski","Eslava","Eslava",,"SlavÄ?","СлавÑ?нÑ?кий",,,,,"Slavisk",,"สลาวิà¸?","Slav dili",,,,,,"æ?¯æ??夫语",,"æ?¯æ??夫èª?"
+"Welsh",11,,"Welsh","Galés","Walisisch","Gallois","اÙ?Ù?Ù?زÙ?Ø©",,,,,"WelÅ¡tina","Cymraeg",,"Welsh",,,,,"kymri",,"Welsh",,,"vels",,,,"Gallese","ã?¦ã?§ã?¼ã?«ã?ºèª?","ì?¨ì?¼ì¦?ì?´",,,,,,,,,,"Welsh",,,"walijski","Welsh","Welsh",,"GalezÄ?","Ð?аллийÑ?кий",,,,,"Walesiska",,"à¹?วลà¸?à¹?","Galce",,,,,,"å¨?å°?士语",,"å¨?ç?¾å£«èª?"
+"Danish",12,1,"Danish","Danés","Dänisch","Danois","اÙ?داÙ?Ù?ارÙ?Ù?Ø©",,,,,"DánÄ?ina",,"Dansk","Î?ανεζικα",,,,,"tanska",,"×?× ×?ת",,,"dán",,,,"Danese","ã??ã?³ã??ã?¼ã?¯èª?","ë?´ë§?í?¬ì?´",,,,,,,,,,"Deens",,,"duÅ?ski","Dinamarquês","Dinamarquês",,"DanezÄ?","Ð?аÑ?Ñ?кий",,,,,"Danska",,"à¹?à¸?à¸?มารà¹?à¸?","Danca",,,,,,"丹麦语",,"丹麥èª?"
+"Greek",13,,"Greek","Griego","Griechisch","Grec moderne","اÙ?Ù?Ù?Ù?اÙ?Ù?Ø©",,,,,"GréÄ?tina",,,"Î?λληνικα",,,,,"kreikka",,"×?×?×?× ×?ת",,,"görög",,,,"Greco","ã?®ã?ªã?·ã?¢èª?","그리ì?¤ì?´",,,,,,,,,,"Grieks",,,"grecki","Grego","Grego",,"GreacÄ?","Ð?Ñ?еÑ?еÑ?кий",,,,,"Grekiska",,"à¸?รีà¸?","Yunanca",,,,,,"å¸?è??语",,"å¸?è??èª?"
+"Esperanto",14,,"Esperanto","Esperanto","Esperanto","Espéranto","اÙ?اسبراÙ?تÙ? ",,,,,"Esperanto",,,"Î?Ï?Ï?εÏ?ανÏ?ο",,,,,"esperanto",,"Esperanto",,,"eszperantó",,,,"Esperanto","ã?¨ã?¹ã??ã?©ã?³ã??èª?","ì??ì?¤í??ë??í? ì?´",,,,,,,,,,"Esperanto",,,"esperanto","Esperanto","Esperanto",,"Esperanto","ЭÑ?пеÑ?анÑ?о",,,,,"Esperanto",,"à¹?อสà¹?à¸?อรัà¸?à¹?à¸?","Esperanto",,,,,,"ä¸?ç??语",,"ä¸?ç??èª?"
+"Estonian",15,,"Estonian","Estonio","Estnisch","Estonien","اÙ?أستÙ?Ù?Ù?Ø©",,,,,"EstónÄ?ina",,,"Î?Ï?θονικα",,"Eesti",,,"eesti",,"Estonian",,,"észt",,,,"Estone","ã?¨ã?¹ã??ã??ã?¢èª?","ì??ì?¤í? ë??ì??ì?´",,,,,,,,,,"Ests",,,"estoÅ?ski","Estoniano","Estoniano",,"EstonianÄ?","ЭÑ?Ñ?онÑ?кий",,,,,"Estniska",,"à¹?อสà¹?à¸?à¹?à¸?ียà¸?","Estonya dili",,,,,,"ç?±æ²?å°¼äº?语",,"æ??æ²?å°¼äº?èª?"
+"Basque",16,,"Basque","Vasco","Baskisch","Basque","Ù?غة اÙ?باسÙ?",,,,,"BaskiÄ?tina",,,"Î?αÏ?κικα",,,,,"baski",,"Basque",,,"baszk",,,,"Basco","ã??ã?¹ã?¯èª?","ë°?ì?¤í?¬ì?´",,,,,,,,,,"Baskisch",,,"baskijski","Basco","Basco",,"BascÄ?","Ð?аÑ?кÑ?кий",,,,,"Baskiska",,"à¸?าสà¸?à¹?","Bask dili",,,,,,"å·´æ?¯å??语",,"å·´æ?¯å??èª?"
+"Persian",17,,"Persian","Persa","Persisch","Perse","اÙ?Ù?ارسÙ?Ø©",,,,,"PerzÅ¡tina",,,"ΠεÏ?Ï?ικοÏ?",,,,"پارسÛ? ","persia",,"פרס×?ת",,,"perzsa",,,,"Persiano","ã??ã?«ã?·ã?¢èª?","í??르ì??ì??ì?´",,,,,,,,,,"Perzisch",,,"perski","Persa","Persa",,"PersanÄ?","Ð?еÑ?Ñ?идÑ?кий",,,,,"Persiska",,"à¹?à¸?อรà¹?à¹?à¸?ียà¸?","Farsça",,,,,,"æ³¢æ?¯è¯­",,"æ³¢æ?¯èª?"
+"Finnish",18,,"Finnish","Finlandés","Finnisch","Finnois","اÙ?Ù?Ù?Ù?Ù?دÙ?Ø©",,,,,"FínÅ¡tina",,,"Φινλανδικη",,,,,"suomi",,"פ×?× ×?ת",,,"finn",,,,"Finlandese","ã??ã?£ã?³ã?©ã?³ã??èª?","í??ë??ë??ì?´",,,,,,,,,,"Fins",,,"fiÅ?ski","Finlandês","Finlandês",,"FinlandezÄ?","ФинÑ?кий",,,,,"Finska",,"à¸?ิà¸?à¸?ิà¸?","Fince",,,,,,"è?¬å?°è¯­",,"è?¬è?­èª?"
+"Irish",19,,"Irish","Irlandés","Irisch","Irlandais","اÙ?Ø£Ù?رÙ?Ù?دÙ?Ø©",,,,,"Ã?rÅ¡tina",,,"Î?Ï?λανδικα",,,,,"iiri","Gaeilge","×?×?ר×?ת",,,"ír",,,,"Irlandese","ã?¢ã?¤ã?«ã?©ã?³ã??èª?","ì??ì?¼ë??ë??ì?´",,,,,,,,,,"Iers",,,"irlandzki","Irlandês","Irlandês",,"IrlandezÄ?","Ð?Ñ?ландÑ?кий",,,,,"Irländska",,"à¹?อริà¸?","Ä°rlanda dili",,,,,,"ç?±å°?å?°è¯­",,"æ??ç?¾è?­èª?"
+"Hebrew",20,,"Hebrew","Hebreo","Hebräisch","Hébreu","اÙ?عبرÙ?Ø©",,,,,"HebrejÄ?ina",,,"Î?βÏ?αικα",,,,,"heprea",,"×¢×?ר×?ת",,,"héber",,,,"Ebraico","ã??ã??ã?©ã?¤èª?","í??ë¸?리ì?´",,,,,,,,,,"Hebreeuws",,,"hebrajski","Hebraico","Hebraico",,"EbraicÄ?","Ð?вÑ?иÑ?",,,,,"Hebreiska",,"ฮิà¸?รู","Ä°branice",,,,,,"å¸?伯æ?¥è¯­",,"å¸?伯ä¾?èª?"
+"Hindi",21,,"Hindi","Hindi","Hindi","Hindi","اÙ?Ù?Ù?دÙ?Ø©",,,,,"HindÄ?ina",,,"Î?νδικα",,,,,"hindi",,"×?×?×?×?ת","हिनà¥?दà¥?",,"hindi",,,,"Hindi","ã??ã?³ã??ã?£ã?¼èª?","í??ë??ì?´",,,,,,,,,,"Hindi",,,"hindi","Hindi","Hindi",,"Hindi","Хинди",,,,,"Hindi",,"ฮิà¸?à¸?ิ","Hintçe",,,,,,"å?°å?°è¯­",,"å?°å?°èª?"
+"Croatian",22,,"Croatian","Croata","Kroatisch","Croate","اÙ?Ù?رÙ?اتÙ?Ø©",,,,,"ChorvátÅ¡tina",,,"Î?Ï?οαÏ?ικα",,,,,"kroatia",,"קר×?×?×?×?ת",,"Hrvatski","horvát",,,,"Croato","ã?¯ã?­ã?¢ã??ã?¢èª?","í?¬ë¡?ì??ì??ì??ì?´",,,,,,,,,,"Kroatisch",,,"chorwacki","Croata","Croata",,"CroatÄ?","ХоÑ?ваÑ?Ñ?кий",,,,,"Kroatiska",,"à¹?à¸?รà¹?อà¹?à¸?ีย","Hırvatça",,,,,,"å??ç½?å?°äº?语",,"å??ç¾?å?°äº?èª?"
+"Hungarian",23,,"Hungarian","Húngaro","Ungarisch","Hongrois","اÙ?Ù?Ù?غارÙ?Ø©",,,,,"MaÄ?arÄ?ina",,,"Î?Ï?γγÏ?ικα",,,,,"unkari",,"×?×?× ×?ר×?ת",,,"Magyar",,,,"Ungherese","ã??ã?³ã?¬ã?ªã?¼èª?","í??ê°?리ì?´",,,,,,,,,,"Hongaars",,,"wÄ?gierski","Húngaro","Húngaro",,"UngarÄ?","Ð?енгеÑ?Ñ?кий",,,,,"Ungerska",,"ฮัà¸?à¸?ารี","Macarca",,,,,,"å??ç??å?©è¯­",,"å??ç??å?©èª?"
+"Armenian",24,,"Armenian","Armenio","Armenisch","Arménien","اÙ?أرÙ?Ù?Ù?Ù?Ø©",,,,,"ArménÄ?ina",,,"Î?Ï?μενικα",,,,,"armenia",,"Armenian",,,"örmény",,,,"Armeno","ã?¢ã?«ã?¡ã??ã?¢èª?","ì??르ë©?ë??ì??ì?´",,,,,,,,,,"Armeens",,,"ormiaÅ?ski","Arménio","Arménio",,"ArmeanÄ?","Ð?Ñ?мÑ?нÑ?кий",,,,,"Armeniska",,"อารà¹?à¹?มà¹?à¸?ีย","Ermenice",,,,,,"äº?ç¾?å°¼äº?语",,"äº?ç¾?å°¼äº?èª?"
+"Indonesian",25,,"Indonesian","Indonesio","Indonesisch","Indonésien","اÙ?Ø£Ù?دÙ?Ù?Ù?سÙ?Ø©",,,,,"IndonézÄ?ina",,,"Î?νδονηÏ?ιακα",,,,,"indonesia",,"Indonesian",,,"indonéz",,"Indonesia",,"Indonesiano","ã?¤ã?³ã??ã??ã?·ã?¢èª?","ì?¸ë??ë?¤ì??ì??ì?´",,,,,,,,,,"Indonesisch",,,"indonezyjski","Indonésio","Indonésio",,"IndonezianÄ?","Ð?ндонезийÑ?кий",,,,,"Indonesiska",,"อิà¸?à¹?à¸?à¸?ีà¹?à¸?ีย","Endonezya dili",,,,,,"å?°åº¦å°¼è¥¿äº?语",,"å?°å°¼èª?"
+"Icelandic",26,,"Icelandic","Islandés","Isländisch","Islandais","اÙ?Ø£Ù?سÙ?اÙ?دÙ?Ø©",,,,,"IslanÄ?ina",,,"Î?Ï?λανδικα",,,,,"islanti",,"Icelandic",,,"izlandi",,,"Ã?slenska","Islandese","ã?¢ã?¤ã?¹ã?©ã?³ã??èª?","ì??ì?´ì?¬ë??ë??ì?´",,,,,,,,,,"Ijslands",,,"islandzki","Islandês","Islandês",,"IslandezÄ?","Ð?Ñ?ландÑ?кий",,,,,"Isländska",,"à¹?อà¸?à¹?à¹?ลà¸?à¸?à¹?","Ä°zlandaca",,,,,,"å?°å²?语",,"å?°å³¶èª?"
+"Italian",27,1,"Italian","Italiano","Italienisch","Italien","اÙ?Ø¥Ù?طاÙ?Ù?Ø©",,,,,"TalianÄ?ina",,,"Î?Ï?αλικα",,,,,"italia",,"×?×?×?×?ק×?ת",,,"olasz",,,,"Italiano","ã?¤ã?¿ã?ªã?¢èª?","ì?´í??리ì?´",,,,,,,,,,"Italiaans",,,"wÅ?oski","Italiano","Italiano",,"ItalianÄ?","Ð?Ñ?алÑ?Ñ?нÑ?кий",,,,,"Italienska",,"อิà¸?าลี","Ä°talyanca",,,,,,"æ??大å?©è¯­",,"義大å?©èª?"
+"Japanese",28,1,"Japanese","Japonés","Japanisch","Japonais","اÙ?Ù?اباÙ?Ù?Ø©",,,,,"JaponÅ¡tina",,,"Î?αÏ?Ï?νικα",,,,,"japani",,"×?פנ×?ת",,,"japán",,,,"Giapponese","æ?¥æ?¬èª?","ì?¼ì?´",,,,,,,,,,"Japans",,,"japoÅ?ski","Japonês","Japonês",,"JaponezÄ?","ЯпонÑ?кий",,,,,"Japanska",,"à¸?ีà¹?à¸?ุà¹?à¸?","Japonca",,,,,,"æ?¥è¯­",,"æ?¥èª?"
+"Korean",29,,"Korean","Coreano","Koreanisch","Coréen","اÙ?Ù?Ù?رÙ?Ø©",,,,,"KórejÄ?ina",,,"Î?οÏ?εαÏ?ικα",,,,,"korea",,"ק×?ר×?× ×?ת",,,"koreai",,,,"Coreano","é??å?½èª?","í??êµ­ì?´",,,,,,,,,,"Koreaans",,,"koreaÅ?ski","Korean","Korean",,"CoreanÄ?","Ð?оÑ?ейÑ?кий",,,,,"Koreanska",,"à¹?à¸?าหลี","Kore dili",,,,,,"é?©è¯­",,"é??èª?"
+"Kurdish",30,,"Kurdish","Kurdo","Kurdisch","Kurde","اÙ?Ù?ردÙ?Ø©",,,,,"KurdÅ¡tina",,,"Î?οÏ?Ï?δικα",,,,,"kurdi",,"Kurdish",,,"kurd",,,,"Curdo","ã?¯ã?«ã??èª?","쿠르ë??ì?´",,,,,,,,,,"Koerdish",,,"kurdyjski","Curdo","Curdo",,"KurdÄ?","Ð?Ñ?Ñ?дÑ?кий",,,,,"Kurdiska",,"à¹?à¸?อรà¹?à¸?ิà¸?","Kürtçe",,,,,,"åº?å°?德语",,"庫ç?¾å¾·èª?"
+"Latin",31,,"Latin","Latín","Latein","Latin","اÙ?Ù?اتÙ?Ù?Ù?Ø©",,,,,"LatinÄ?ina",,,"Î?αÏ?ινικη",,,,,"latina",,"×?×?×?× ×?ת",,,"latin",,,,"Latino","ã?©ã??ã?³èª?","ë?¼í?´ì?´",,,,,,,,,,"Latijn",,,"Å?aciÅ?ski","Latina","Latina",,"LatinÄ?","Ð?аÑ?инÑ?кий",,,,,"Latin",,"ละà¸?ิà¸?","Latince",,,,,,"æ??ä¸?语",,"æ??ä¸?èª?"
+"Latvian",32,,"Latvian","Letón","Lettisch","Letton","اÙ?Ù?اتÙ?Ù?Ø©",,,,,"LotyÅ¡tina",,,"Î?εÏ?ονικα",,,,,"latvia",,"Latvian",,,"lett",,,,"Lettone","ã?©ã??ã??ã?¢èª?","ë?¼í?¸ë¹?ì??ì?´",,,"LatvieÅ¡u ",,,,,,,"Lets",,,"Å?otewski","Letão","Letão",,"LetonianÄ?","лаÑ?Ñ?Ñ?Ñ?кий ",,,,,"Lettiska",,"ลัà¸?à¹?วีย","Letonca",,,,,,"æ??è?±ç»´äº?语",,"æ??è?«ç¶­äº?èª?"
+"Lithuanian",33,,"Lithuanian","Lituano","Litauisch","Lituanien","اÙ?Ù?تÙ?اÙ?Ù?Ø©",,,,,"LitovÄ?ina",,,"Î?ιθοÏ?ανικα",,,,,"liettua",,"Lithuanian",,,"litván",,,,"Lituano","ã?ªã??ã?¢ã??ã?¢èª?","리í?¬ì??ë??ì??ì?´",,,,,,,,,,"Litouws",,,"litewski","Lituano","Lituano",,"LituanianÄ?","Ð?иÑ?овÑ?кий",,,,,"Litauiska",,"ลิà¸?ัวà¹?à¸?ีย","Litvanyaca",,,,,,"ç«?é?¶å®?语",,"ç«?é?¶å®?èª?"
+"Macedonian",34,,"Macedonian","Macedonio","Mazedonisch","Macédonien","اÙ?Ù?Ù?دÙ?Ù?Ù?Ø©",,,,,"MacedónÅ¡tina",,,"Î?ακεδονικο",,,,,"makedonia",,"Macedonian",,,"macedón",,,,"Macedone","ã??ã?±ã??ã??ã?¢èª?","ë§?ì¼?ë??ë??ì??ì?´",,,,,,,,,,"Macedonisch",,,"macedoÅ?ski","Macedônio","Macedônio",,"MacedonianÄ?","Ð?акедонÑ?кий",,,,,"Makedonska",,"มาà¸?ิà¹?à¸?à¹?à¸?ีย","Makedonyaca",,,,,,"马å?¶é¡¿è¯­",,"馬å?¶é ?èª?"
+"Maltese",35,,"Maltese","Maltés","Maltesisch","Maltais","اÙ?Ù?اÙ?Ø·Ù?Ø©",,,,,"MaltézÅ¡tina",,,"Î?αλÏ?εζικα",,,,,"malta",,"Maltese",,,"máltai",,,,"Maltese","ã??ã?«ã?¿èª?","몰í??ì?´",,,,,,,,,,"Maltees",,,"maltaÅ?ski","Maltês","Maltês",,"MaltezÄ?","Ð?алÑ?Ñ?ийÑ?кий",,,,,"Maltesiska",,"มอลà¸?ีส","Malta dili",,,,,,"马è?³ä»?语",,"馬ç?¾ä»?èª?"
+"Moldavian",36,,"Moldavian","Moldavo","Moldavisch","Moldave","اÙ?Ù?Ù?Ù?دÙ?Ù?Ù?Ø©",,,,,"MoldavÄ?ina",,,"Î?ολδαβικα",,,,,"moldavia",,"Moldavian",,,"moldovai",,,,"Moldavo","ã?¢ã?«ã??ã??ã?¢èª?","몰ë?¤ë¹?ì??ì?´",,,,,,,,,,"Moldavisch",,,"moÅ?dawski","Moldavo","Moldavo",,"MoldoveanÄ?","Ð?олдавÑ?кий",,,,,"Moldaviska",,"มอลà¸?าà¹?วียà¸?","Moldovyaca",,,,,,"æ?©å°?达维äº?语",,"æ?©ç?¾é??維äº?èª?"
+"Mongolian",37,,"Mongolian","Mongol","Mongolisch","Mongol","اÙ?Ù?Ù?غÙ?Ù?Ù?Ø©",,,,,"MongolÅ¡tina",,,"Î?ογγολικα",,,,,"mongoli",,"Mongolian",,,"mongol",,,,"Mongolo","ã?¢ã?³ã?´ã?«èª?","몽골ì?´",,,,,,,,,,"Mongools",,,"mongolski","Mongolian","Mongolian",,"MongolezÄ?","Ð?онголÑ?Ñ?кий",,,,,"Mongoliska",,"มอà¸?à¹?à¸?à¹?ลีย","Mongolca",,,,,,"è??å?¤è¯­",,"è??å?¤èª?"
+"Nepali",38,,"Nepali","Nepalí","Nepali","Népalais","اÙ?Ù?Ù?باÙ?Ù?Ø©",,,,,"NepálÄ?ina",,,"Î?εÏ?αλι",,,,,"nepali",,"Nepali",,,"nepáli",,,,"Nepalese","ã??ã??ã?¼ã?«èª?","ë?¤í??ì?´",,,,,,,,,,"Nepalees",,,"nepalski","Nepali","Nepali",,"NepalezÄ?","Ð?епалÑ?Ñ?кий",,,,,"Nepalesiska",,"à¹?à¸?à¸?าล","Nepal dili",,,,,,"å°¼æ³?å°?语",,"å°¼æ³?ç?¾èª?"
+"Dutch",39,1,"Dutch","Holandés","Holländisch","Néerlandais","اÙ?Ù?Ù?Ù?Ù?دÙ?Ø©",,,,,"HolandÄ?ina",,,"Î?λλανδικα",,,,,"hollanti",,"×?×?×?× ×?×?ת",,,"holland",,,,"Neerlandese","ã?ªã?©ã?³ã??èª?","í??ë??ì?´",,,,,,,,,,"Nederlands",,,"holenderski","Holandês","Holandês",,"OlanezÄ?","Ð?олландÑ?кий",,,,,"Nederländska",,"à¸?ัà¸?à¸?à¹?","Hollandaca",,,,,,"è?·å?°è¯­",,"è?·è?­èª?"
+"Norwegian BokmÃ¥l",40,,"Norwegian BokmÃ¥l","BokmÃ¥l","Norwegisch (Buchsprache)","Norvégien BokmÃ¥l","اÙ?بÙ?Ù?Ù?اÙ?Ù?Ø© اÙ?Ù?رÙ?Ù?جÙ?Ø©",,,,,"Nórsky jazyk BokmÃ¥l",,,"Î?οÏ?βηγικα",,,,,"kirjanorja",,"× ×?ר×?×?×?×?ת",,,"norvég bokmÃ¥l",,,,"Norvegese BokmÃ¥l","ã??ã?«ã?¦ã?§ã?¼ã?»ã??ã?¼ã?¯ã?¢ã?¼ã?«","ë?¸ë¥´ì?¨ì?´ ë³´í?¬ë§?ì?´",,,,,,,,,,"Noors BokmÃ¥l",,,"norweski bokmÃ¥l","Norueguês","Norueguês",,"BokmÃ¥l (norvegianÄ?)","Ð?оÑ?вежÑ?кий бÑ?кмол",,,,,"Norskt BokmÃ¥l",,"à¸?อรà¹?วิà¹?à¸?ียà¸?à¸?อà¸?มาล","Bokmal Norveç dili",,,,,,"æ?ªå¨?å¸?å??è?«å°?语",,"æ?ªå¨?å¸?å??è?«ç?¾èª?"
+"Punjabi",41,,"Punjabi","Panyabí ","Pandschabi","Panjabi","اÙ?بÙ?جابÙ?Ø©",,,,,"PandžábÄ?ina",,,"Panjabi",,,,,"pandzabi",,"Punjabi",,,"pandzsábi",,,,"Panjabi","ã??ã?³ã?¸ã?£ã?¼ã??èª?","í??ì??ë¸?ì?´",,,,,,,,,,"Punjabi",,,"pendżabi","Panjabi","Panjabi",,"Punjabi","Ð?анджаби",,,,,"Punjabi",,"à¸?ัà¸?à¸?าà¸?","Pencapça",,,,,,"æ??é?®æ?®è¯­",,"æ??é?®æ?®èª?"
+"Polish",42,,"Polish","Polaco","Polnisch","Polonais","اÙ?بÙ?Ù?Ù?دÙ?Ø©",,,,,"PolÅ¡tina",,,"ΠολÏ?νικα",,,,,"puola",,"פ×?×?× ×?ת",,,"lengyel",,,,"Polacco","ã??ã?¼ã?©ã?³ã??èª?","í?´ë??ë??ì?´",,,,,,,,,,"Pools",,,"polski","Polonês","Polonês",,"PolonezÄ?","Ð?олÑ?Ñ?кий",,,,,"Polska",,"à¹?à¸?à¹?ลà¸?à¸?à¹?","Polonyaca",,,,,,"æ³¢å?°è¯­",,"æ³¢è?­èª?"
+"Portuguese (Portugal)",43,,"Portuguese (Portugal)","Portugués, Portugal","Portugiesisch, Portugal","Portugais - du Portugal","اÙ?برتغاÙ?Ù?Ø© Ø? اÙ?برتغاÙ?",,,,,"PortugalÅ¡tina",,,"ΠοÏ?Ï?ογαλικα",,,,,"portugali",,"פ×?ר×?×?×?×?×?ת",,,"portugál",,,,"Portoghese, Portogallo","ã??ã?«ã??ã?¬ã?«èª?","í?¬ë¥´í?¬ê°? í?¬ë¥´í?¬ê°?ì?´",,,,,,,,,,"Portugees, Portugal",,,"portugalski, Portugalia","Português","Português",,"PortughezÄ? (Portugalia)","Ð?оÑ?Ñ?Ñ?галÑ?Ñ?кий, Ð?оÑ?Ñ?Ñ?галиÑ?",,,,,"Portugisiska, Portugal",,"à¹?à¸?รà¸?ุà¹?à¸?ส","Portekizce, Portekiz",,,,,,"è?¡è??ç??语ï¼?è?¡è??ç??ï¼?",,"è?¡è??ç??èª?ï¼?è?¡è??ç??ï¼?"
+"Portuguese (Brazil)",43,,"Portuguese (Brazil)","Portugués, Brasil","Portugiesisch, Brasilien","Portugais - du Brésil","اÙ?برتغاÙ?Ù?Ø© Ø?اÙ?برازÙ?Ù?",,,,,"Brazílska PortugalÅ¡tina",,,"ΠοÏ?Ï?ογαλικα",,,,,"Brasilian portugali",,"פ×?ר×?×?×?×?×?ת",,,"brazil",,,,"Portoghese, Brasile","ã??ã?«ã??ã?¬ã?«èª?ï¼?ã??ã?©ã?¸ã?«ï¼?","ë¸?ë?¼ì§? í?¬ë¥´í?¬ê°?ì?´",,,,,,,,,,"Portugees, Brazilië",,,"portugalski, Brazylia","Português","Português",,"PortughezÄ? (Brazilia)","Ð?оÑ?Ñ?Ñ?галÑ?Ñ?кий, Ð?Ñ?азилиÑ?",,,,,"Portugisiska, Brasilien",,"à¹?à¸?รà¸?ุà¹?à¸?สà¸?ราà¸?ิล","Portekizce, Brezilya",,,,,,"è?¡è??ç??语ï¼?巴西ï¼?",,"è?¡è??ç??èª?ï¼?巴西ï¼?"
+"Quechua",44,,"Quechua","Quechua","Quechua","Quechua","اÙ?Ù?Ù?Ù?تشÙ?ا",,,,,"Jazyk Quechua",,,"Î?εÏ?Ï?οÏ?α",,,,,"ketsua",,"Quechua",,,"quechua",,,,"Quechua","ã?±ã??ã?¥ã?¢èª?","ì¼?ì¶?ì??ì?´",,,,,,,,,,"Quechua",,,"keczua","Quechua","Quechua",,"QuechuanÄ?","Ð?еÑ?Ñ?а",,,,,"Quechua",,"à¸?ิวà¸?ัว","Quechua dili",,,,,,"ç??ä¸?äº?语",,"è??ä¸?äº?èª?"
+"Romanian",45,,"Romanian","Rumano","Rumänisch","Roumain","اÙ?رÙ?Ù?اÙ?Ù?Ø©",,,,,"RumunÄ?ina",,,"ΡοÏ?μανικα",,,,,"romania",,"ר×?×?× ×?ת",,,"román",,,,"Rumeno","ã?«ã?¼ã??ã??ã?¢èª?","ë¡?ë§?ë??ì??ì?´",,,,,,,,,,"Roemeens",,,"rumuÅ?ski","Romeno","Romeno",,"RomânÄ?","РÑ?мÑ?нÑ?кий",,,,,"Rumänska",,"à¹?รมาà¹?à¸?ีย","Rumence",,,,,,"ç½?马尼äº?语",,"ç¾?馬尼äº?èª?"
+"Russian",46,1,"Russian","Ruso","Russisch","Russe","اÙ?رÙ?سÙ?Ø©",,,,,"RuÅ¡tina",,,"ΡÏ?Ï?ικα",,,,,"venäjä",,"ר×?ס×?ת",,,"orosz",,,,"Russo","ã?­ã?·ã?¢èª?","ë?¬ì??ì??ì?´",,,,,,,,,,"Russisch",,,"rosyjski","Russo","Russo",,"RusÄ?","РÑ?Ñ?Ñ?кий",,,,,"Ryska",,"รัสà¹?à¸?ีย","Rusça",,,,,,"ä¿?语",,"ä¿?èª?"
+"Slovenian",47,,"Slovenian","Esloveno","Slowenisch","Slovène","اÙ?سÙ?Ù?Ù?اÙ?Ù?Ø©",,,,,"SlovinÄ?ina",,,"Σλοβενικα",,,,,"sloveeni",,"Slovenian",,,"szlovén",,,,"Sloveno","ã?¹ã?­ã??ã??ã?¢èª?","ì?¬ë¡?ë² ë??ì??ì?´",,,,,,,,,,"Sloveens",,,"sÅ?oweÅ?ski","Esloveno","Esloveno",,"SlovenÄ?","СловенÑ?кий",,,,,"Slovenska",,"สà¹?ลวีà¹?à¸?ียà¸?","Sloven dili",,,,,,"æ?¯æ´?æ??å°¼äº?语",,"æ?¯æ´?æ??å°¼äº?èª?"
+"Somali",48,,"Somali","Somalí","Somali","Somali","اÙ?صÙ?Ù?اÙ?Ù?Ø©",,,,,"SomálÄ?ina",,,"Somali",,,,,"somali",,"Somali",,,"szomáli",,,,"Somalo","ã?½ã??ã?ªèª?","ì??ë§?리ì??ì?´",,,,,,,,,,"Somalisch",,,"somalijski","Somali","Somali",,"SomalezÄ?","СомалийÑ?кий",,,,,"Somaliska",,"à¹?à¸?มาลี","Somalice",,,,,,"索马é??语",,"索馬é??èª?"
+"Albanian",49,,"Albanian","Albanés","Albanisch","Albanais","اÙ?Ø£Ù?باÙ?Ù?Ø©",,,,,"AlbánÄ?ina",,,"Î?λβανικα",,,,,"albania",,"Albanian",,,"albán",,,,"Albanese","ã?¢ã?«ã??ã??ã?¢èª?","ì??ë°?ë??ì??ì?´",,,,,,,,,,"Albaans",,,"albaÅ?ski","Albanês","Albanês",,"AlbanezÄ?","Ð?лбанÑ?кий",,,,,"Albanska",,"อัลà¹?à¸?à¹?à¸?ีย","Arnavutça",,,,,,"é?¿å°?å·´å°¼äº?语",,"é?¿ç?¾å·´å°¼äº?èª?"
+"Serbian",50,,"Serbian","Serbio","Serbisch","Serbe","اÙ?صربÙ?Ø©",,,,,"SrbÅ¡tina",,,"ΣεÏ?βικα",,,,,"serbia",,"Serbian",,,"szerb",,,,"Serbo","ã?»ã?«ã??ã?¢èª?","ì?¸ë¥´ë¹?ì??ì?´",,,,,,,,,,"Servisch",,,"serbski","Sérvio","Sérvio",,"SârbÄ?","СеÑ?бÑ?кий",,,,,"Serbiska",,"à¹?à¸?อรà¹?à¹?à¸?ีย","Sırpça",,,,,,"èµ?å°?ç»´äº?语",,"è³½ç?¾ç¶­äº?èª?"
+"Swedish",51,,"Swedish","Sueco","Schwedisch","Suédois","اÙ?سÙ?Ù?دÙ?Ø©",,,,,"Å védÅ¡tina",,,"ΣοÏ?ηδικη",,,,,"ruotsi",,"ש×?×?×?×?ת",,,"svéd",,,,"Svedese","ã?¹ã?¦ã?§ã?¼ã??ã?³èª?","ì?¤ì?¨ë?´ì?´",,,,,,,,,,"Zweeds",,,"szwedzki","Sueco","Sueco",,"SuedezÄ?","ШведÑ?кий",,,,,"Svenska",,"สวีà¹?à¸?à¸?","Ä°sveççe",,,,,,"ç??å?¸è¯­",,"ç??å?¸èª?"
+"Tamil",52,,"Tamil","Tamil","Tamil","Tamoul","اÙ?تاÙ?Ù?Ù?Ù?Ø©",,,,,"TamilÄ?ina",,,"Ταμιλ",,,,,"tamili",,"Tamil",,,"tamil",,,,"Tamil","ã?¿ã??ã?«èª?","í??ë°?ì?´",,,,,,,,,,"Tamil",,,"tamilski","Tamil","Tamil",,"TamilÄ?","ТамилÑ?Ñ?кий",,,,,"Tamil",,"à¸?มิฬ","Tamil dili",,,,,,"æ³°ç±³å°?语",,"æ³°ç±³ç?¾èª?"
+"Thai",53,,"Thai","Tailandés","Thai","Thaï","اÙ?تاÙ?Ù?Ù?دÙ?Ø©",,,,,"ThajÅ¡tina",,,"Thai",,,,,"thai",,"Thai",,,"tájföldi",,,,"Thai","ã?¿ã?¤èª?","í??êµ­ì?´",,,,,,,,,,"Thai",,,"tajski","Tailandês","Tailandês",,"TailandezÄ?","ТайÑ?кий",,,,,"Thailändska",,"à¹?à¸?ย","Tayca",,,,,,"泰语",,"æ³°èª?"
+"Turkish",54,,"Turkish","Turco","Türkisch","Turc","اÙ?ترÙ?Ù?Ø©",,,,,"TureÄ?tina",,,"ΤοÏ?Ï?κικα",,,,,"turkki",,"ת×?ר×?×?ת",,,"török",,,,"Turco","ã??ã?«ã?³èª?","í?°ì?´í?¤ì?´",,,,,,,,,,"Turks",,,"turecki","Turco","Turco",,"TurcÄ?","ТÑ?Ñ?еÑ?кий",,,,,"Turkiska",,"à¸?ุรà¸?ี","Türkçe",,,,,,"å??è?³å?¶è¯­",,"å??è?³å?¶èª?"
+"Ukrainian",55,,"Ukrainian","Ucraniano","Ukrainisch","Ukrainien","اÙ?Ø£Ù?Ù?راÙ?Ù?Ø©",,,,,"UkrajinÄ?ina",,,"Î?Ï?κÏ?ανικα",,,,,"ukraina",,"Ukrainian",,,"ukrán",,,,"Ucraino","ã?¦ã?¯ã?©ã?¤ã??èª?","ì?°í?¬ë?¼ì?´ë??ì?´",,,,,,,,,,"Oekraïens",,,"ukraiÅ?ski","Ucraniano","Ucraniano",,"UcrainianÄ?","УкÑ?аинÑ?кий",,,,,"Ukrainska",,"ยูà¹?à¸?รà¸?","Ukraynaca",,,,,,"ä¹?å??å?°è¯­",,"ç??å??è?­èª?"
+"Urdu",56,,"Urdu","Urdu","Urdu","Ourdu","اÙ?أردÙ?Ø©",,,,,"UrdÅ¡tina",,,"Î?Ï?Ï?νÏ?οÏ?",,,,,"urdu",,"Urdu",,,"urdu",,,,"Urdu","ã?¦ã?«ã??ã?¥ã?¼èª?","ì?°ë¥´ë??ì?´",,,,,,,,,,"Urdu",,,"urdu","Urdu","Urdu",,"Urdu","УÑ?дÑ?",,,,,"Urdu",,"อุรà¸?ู","Urduca",,,,,,"ä¹?å°?é?½è¯­",,"ç??ç?¾é?½èª?"
+"Uzbek",57,,"Uzbek","Uzbeko","Usbekisch","Ouzbek","اÙ?اÙ?زباÙ?Ù?Ø©",,,,,"UzbekÄ?ina",,,"Î?Ï?ζμÏ?εκικα",,,,,"uzbekki",,"Uzbek",,,"üzbég",,,,"Uzbeco","ã?¦ã?ºã??ã?¯èª?","ì?°ì¦?ë² í?¬ì?´",,,,,,,,,,"Oezbeeks",,,"uzbecki","Uzbeque","Uzbeque",,"UzbecÄ?","УзбекÑ?кий",,,,,"Uzbekiska",,"อุà¸?à¹?à¸?à¸?","Ã?zbekçe",,,,,,"ä¹?å?¹å?«å??语",,"ç??è?²å?¥å??èª?"
+"Vietnamese",58,,"Vietnamese","Vietnamita ","Vietnamesisch","Vietnamien","اÙ?Ù?Ù?تÙ?اÙ?Ù?Ø©",,,,,"VietnamÄ?ina",,,"Î?ιεÏ?ναμεζικα",,,,,"vietnam",,"Vietnamese",,,"vietnámi",,,,"Vietnamita","ã??ã??ã??ã? èª?","ë² í?¸ë?¨ì?´",,,,,,,,,,"Vietnamees",,,"wietnamski","Vietnamita","Vietnamita",,"VietnamezÄ?","Ð?Ñ?еÑ?намÑ?кий",,,,,"Vietnamesiska",,"à¹?วียà¸?à¸?าม","Vietnamca",,,,,,"è¶?å??语",,"è¶?å??èª?"
+"Yiddish",59,,"Yiddish","Yidis","Jiddisch","Yiddish","اÙ?Ù?دÙ?Ø´Ù?Ø©",,,,,"JidiÅ¡",,,"Î?ινÏ?ιÏ?",,,,,"jiddi",,"×?×?×?×?ש",,,"jiddis",,,,"Yiddish","ã?¤ã??ã?£ã??ã?·ã?¥èª?","ì?´ë??ì??ì?´",,,,,,,,,,"Jiddisch",,,"jidysz","Yiddish","Yiddish",,"IdiÅ?","Ð?диÑ?",,,,,"Jiddisch",,"ยิà¸?à¸?ิà¸?","Eski Ä°branice",,,,,,"ä¾?å?°è¯­",,"ä¾?å?°èª?"
+"Chinese (Simplified)",60,1,"Chinese (Simplified)","Chino simplificado","Vereinfachtes Chinesisch","Chinois simplifié","اÙ?صÙ?Ù?Ù?Ø© اÙ?Ù?بسطة",,,,,"ZjednoduÅ¡ená Ä?ínÅ¡tina",,,"Î?ινεζικα",,,,,"kiina",,"ס×?× ×?ת",,,"egyszerűsített kínai",,,,"Cinese semplificato","ç°¡ä½?中å?½èª?","ì¤?êµ­ì?´ ê°?ì²´",,,,,,,,,,"Vereenvoudigd Chinees",,,"chiÅ?ski uproszczony","Chinês","Chinês",,"Chineza simplificatÄ?","УпÑ?оÑ?еннÑ?й киÑ?айÑ?кий",,,,,"Förenklad kinesiska",,"à¸?ีà¸?à¸?ระยุà¸?à¸?à¹?","Modern Ã?ince",,,,,,"ç®?ä½?中æ??",,"ç°¡é«?中æ??"
+"Zulu",61,,"Zulu","Zulú","Zulu","Zoulou","اÙ?زÙ?Ù?Ù?",,,,,"Jazyk Zulu",,,"Î?οÏ?λοÏ?",,,,,"zulu",,"Zulu",,,"zulu",,,,"Zulu","ã?ºã?¼ã?«ã?¼èª?","ì¤?루ì?´",,,,,,,,,,"Zulu",,,"zuluski","Zulu","Zulu",,"Zulu","Ð?Ñ?лÑ?",,,,,"Zulu",,"à¸?ูลู","Zulu dili",,,,,,"ç¥?é²?语",,"ç¥?é­¯èª?"
+"Chinese (Traditional)",62,1,"Chinese (Traditional)","Chino tradicional","Traditionelles Chinesisch","Chinois traditionnel","اÙ?صÙ?Ù?Ù?Ø© اÙ?تÙ?Ù?Ù?دÙ?Ø©",,,,,"TradiÄ?ná Ä?ínÅ¡tina",,,"Î?ινεζικα",,,,,"perinteinen kiina",,"ס×?× ×?ת ×?ס×?רת×?ת",,,"hagyományos kínai",,,,"Cinese tradizionale","ç¹?ä½?中å?½èª?","ì¤?êµ­ì?´ ë²?ì²´",,,,,,,,,,"Traditioneel Chinees",,,"chiÅ?ski tradycyjny","Chinês","Chinês",,"Chineza tradiÅ£ionalÄ?","ТÑ?адиÑ?ионнÑ?й киÑ?айÑ?кий",,,,,"Traditionell kinesiska",,"à¸?ีà¸?à¸?ัà¹?à¸?à¹?à¸?ิม","Klasik Ã?ince",,,,,,"ç¹?ä½?中æ??",,"ç¹?é«?中æ??"
diff --git a/wp-content/plugins/sitepress-multilingual-cms/res/languages.csv.php b/wp-content/plugins/sitepress-multilingual-cms/res/languages.csv.php
new file mode 100644
index 0000000..6951d61
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/res/languages.csv.php
@@ -0,0 +1 @@
+<?php $__icl_lang_names = 'a:63:{s:7:"English";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:7:"English";s:7:"Spanish";s:7:"Inglés";s:6:"German";s:8:"Englisch";s:6:"French";s:7:"Anglais";s:6:"Arabic";s:20:"اÙ?Ø¥Ù?جÙ?Ù?زÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"AngliÄ?tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Î?γγλικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:8:"englanti";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"×?× ×?×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"angol";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Inglese";s:8:"Japanese";s:6:"è?±èª?";s:6:"Korean";s:6:"ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:""
 ;s:6:"Nepali";s:0:"";s:5:"Dutch";s:6:"Engels";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"angielski";s:20:"Portuguese, Portugal";s:7:"Inglês";s:18:"Portuguese, Brazil";s:7:"Inglês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"EnglezÄ?";s:7:"Russian";s:20:"Ð?нглийÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Engelska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"อัà¸?à¸?ฤษ";s:7:"Turkish";s:10:"Ä°ngilizce";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:6:"è?±è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:6:"è?±èª?";}}s:7:"Spanish";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:7:"Spanish";s:7:"Spanish";s:8:"Español";s:6:"German";s:8:"Spanisch";s:6:"French";s:8:"Espagnol";s:6:"Arabic";s:18:"اÙ?أسباÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Cz
 ech";s:0:"";s:6:"Slavic";s:13:"Å panielÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?Ï?Ï?ανικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"espanja";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"ספר×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"spanyol";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Spagnolo";s:8:"Japanese";s:15:"ã?¹ã??ã?¤ã?³èª?";s:6:"Korean";s:12:"ì?¤í??ì?¸ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:6:"Spaans";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:11:"hiszpaÅ?ski";s:20:"Portuguese, Portugal";s:8:"Espanhol";s:18:"Portuguese, Brazil";s:8:"Espanhol";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"SpaniolÄ?";s:7:"Russian";s:1
 8:"Ð?Ñ?панÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:7:"Spanska";s:5:"Tamil";s:0:"";s:4:"Thai";s:12:"สà¹?à¸?à¸?";s:7:"Turkish";s:11:"Ä°spanyolca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"西ç?­ç??语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"西ç?­ç??èª?";}}s:6:"German";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:6:"German";s:7:"Spanish";s:7:"Alemán";s:6:"German";s:7:"Deutsch";s:6:"French";s:8:"Allemand";s:6:"Arabic";s:18:"اÙ?Ø£Ù?Ù?اÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:8:"NemÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?εÏ?μανικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"saksa";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"×?ר×?× ×
 ?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"német";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Tedesco";s:8:"Japanese";s:12:"ã??ã?¤ã??èª?";s:6:"Korean";s:6:"ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:5:"Duits";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"niemiecki";s:20:"Portuguese, Portugal";s:7:"Alemão";s:18:"Portuguese, Brazil";s:7:"Alemão";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"GermanÄ?";s:7:"Russian";s:16:"Ð?емеÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:5:"Tyska";s:5:"Tamil";s:0:"";s:4:"Thai";s:21:"à¹?ยอรมัà¸?";s:7:"Turkish";s:7:"Almanca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0
 :"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:6:"德语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:6:"å¾·èª?";}}s:6:"French";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:6:"French";s:7:"Spanish";s:8:"Francés";s:6:"German";s:12:"Französisch";s:6:"French";s:9:"Français";s:6:"Arabic";s:16:"اÙ?Ù?رÙ?سÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:14:"FrancúzÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Î?αλλικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"ranska";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"צרפת×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"francia";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Francese";s:8:"Japanese";s:15:"ã??ã?©ã?³ã?¹èª?";s:6:"Korean";s:6:"ë¶?ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:
 "Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:5:"Frans";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"francuski";s:20:"Portuguese, Portugal";s:8:"Francês";s:18:"Portuguese, Brazil";s:8:"Francês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"FrancezÄ?";s:7:"Russian";s:22:"ФÑ?анÑ?Ñ?зÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:7:"Franska";s:5:"Tamil";s:0:"";s:4:"Thai";s:24:"à¸?รัà¹?à¸?à¹?ศส";s:7:"Turkish";s:10:"Fransızca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:6:"æ³?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:6:"æ³?èª?";}}s:6:"Arabic";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:6:"Arabic";s:7:"Spanish";s:6:"Ã?rabe";s:6:"German";s:8:"Arabisch";s:6:"French";s:5:"Arabe
 ";s:6:"Arabic";s:14:"اÙ?عربÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"ArabÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Î?Ï?αβικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"arabia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"ער×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:4:"arab";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Arabo";s:8:"Japanese";s:15:"ã?¢ã?©ã??ã?¢èª?";s:6:"Korean";s:9:"ì??ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Arabisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:7:"arabski";s:20:"Portuguese, Portugal";s:6:"Ã?rabe";s:18:"Portuguese, Brazil";
 s:6:"Ã?rabe";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"ArabicÄ?";s:7:"Russian";s:16:"Ð?Ñ?абÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Arabiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"อารà¸?ิà¸?";s:7:"Turkish";s:7:"Arapça";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"é?¿æ??伯语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"é?¿æ??伯èª?";}}s:7:"Bosnian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Bosnian";s:7:"Spanish";s:6:"Bosnio";s:6:"German";s:8:"Bosnisch";s:6:"French";s:7:"Bosnien";s:6:"Arabic";s:16:"اÙ?بÙ?سÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:12:"BosniaÄ?tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?οÏ?νιακα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persia
 n";s:0:"";s:7:"Finnish";s:6:"bosnia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:7:"Bosnian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:8:"bosnyák";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Bosniaco";s:8:"Japanese";s:15:"ã??ã?¹ã??ã?¢èª?";s:6:"Korean";s:15:"ë³´ì¦?ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Bosnisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"boÅ?niacki";s:20:"Portuguese, Portugal";s:7:"Bósnio";s:18:"Portuguese, Brazil";s:7:"Bósnio";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"BosniacÄ?";s:7:"Russian";s:20:"Ð?оÑ?нийÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Bosniska";s:5:"Tamil";s:0:"";s:4:"Thai";s:24:"à¸?อสà¹?à¸?ียà¸?"
 ;s:7:"Turkish";s:10:"BoÅ?nakça";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:15:"æ³¢æ?¯å°¼äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:15:"波士尼äº?èª?";}}s:9:"Bulgarian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:9:"Bulgarian";s:7:"Spanish";s:8:"Búlgaro";s:6:"German";s:10:"Bulgarisch";s:6:"French";s:7:"Bulgare";s:6:"Arabic";s:18:"اÙ?بÙ?غارÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"BulharÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:20:"Î?οÏ?λγαÏ?ικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:8:"bulgaria";s:5:"Irish";s:0:"";s:6:"Hebrew";s:9:"Bulgarian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"bolgár";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"B
 ulgaro";s:8:"Japanese";s:18:"ã??ã?«ã?¬ã?ªã?¢èª?";s:6:"Korean";s:15:"ë¶?ê°?리ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Bulgaars";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"buÅ?garski";s:20:"Portuguese, Portugal";s:8:"Búlgaro";s:18:"Portuguese, Brazil";s:8:"Búlgaro";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"BulgarÄ?";s:7:"Russian";s:20:"Ð?олгаÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Bulgariska";s:5:"Tamil";s:0:"";s:4:"Thai";s:30:"à¸?ัลà¹?à¸?à¹?รียà¸?";s:7:"Turkish";s:8:"Bulgarca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:15:"ä¿?å? å?©äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)"
 ;s:15:"ä¿?å? å?©äº?èª?";}}s:7:"Catalan";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Catalan";s:7:"Spanish";s:8:"Catalán";s:6:"German";s:11:"Katalanisch";s:6:"French";s:7:"Catalan";s:6:"Arabic";s:24:"اÙ?Ù?اتاÙ?Ù?Ù?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:7:"Català";s:5:"Czech";s:0:"";s:6:"Slavic";s:13:"KatalánÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:20:"Î?αÏ?αλανικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:9:"katalaani";s:5:"Irish";s:0:"";s:6:"Hebrew";s:7:"Catalan";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:8:"katalán";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Catalano";s:8:"Japanese";s:21:"ã?«ã?¿ã?«ã?¼ã??ã?£èª?";s:6:"Korean";s:18:"ì¹´í??ë¡?ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";
 s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:9:"Catalaans";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:11:"kataloÅ?ski";s:20:"Portuguese, Portugal";s:8:"Catalão";s:18:"Portuguese, Brazil";s:8:"Catalão";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"CatalanÄ?";s:7:"Russian";s:22:"Ð?аÑ?аланÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Katalanska";s:5:"Tamil";s:0:"";s:4:"Thai";s:21:"à¸?ะà¸?ะลาà¸?";s:7:"Turkish";s:12:"Katalan dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:18:"å? æ³°ç½?å°¼äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:18:"å? æ³°ç¾?å°¼äº?èª?";}}s:5:"Czech";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:5:"Czech";s:7:"Spanish";s:5:"Checo";s:6:"German";s:11:"Tschechisch";s:6:"French";s:8:"Tchèque";s:6:"Arabic";s:16:"اÙ?Ø
 ªØ´Ù?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:9:"Ä?eÅ¡tina";s:6:"Slavic";s:9:"Ä?eÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"ΤÏ?εÏ?ικη";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"tsekki";s:5:"Irish";s:0:"";s:6:"Hebrew";s:5:"Czech";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:4:"cseh";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:4:"Ceco";s:8:"Japanese";s:12:"ã??ã?§ã?³èª?";s:6:"Korean";s:24:"ì²´ì½?ì?¬ë¡?ë°?í?¤ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:10:"Tsjechisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:6:"czeski";s:20:"Portuguese, Portugal";s:5:"Checa";s:18:"Portuguese, Brazil";s:5:"Che
 ca";s:7:"Quechua";s:0:"";s:8:"Romanian";s:5:"CehÄ?";s:7:"Russian";s:14:"ЧеÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Tjeckiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:12:"à¹?à¸?à¹?à¸?";s:7:"Turkish";s:7:"Ã?ekçe";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"æ?·å??语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"æ?·å??èª?";}}s:6:"Slavic";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:6:"Slavic";s:7:"Spanish";s:6:"Eslavo";s:6:"German";s:8:"Slawisch";s:6:"French";s:5:"Slave";s:6:"Arabic";s:16:"اÙ?سÙ?اÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"SlávÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Σλαβικη";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"slaavi
 ";s:5:"Irish";s:0:"";s:6:"Hebrew";s:6:"Slavic";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"szláv";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Slavo";s:8:"Japanese";s:15:"ã?¹ã?©ã?´èª?æ´¾";s:6:"Korean";s:12:"ì?¬ë?¼ë¸?ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Slavisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:12:"sÅ?owiaÅ?ski";s:20:"Portuguese, Portugal";s:6:"Eslava";s:18:"Portuguese, Brazil";s:6:"Eslava";s:7:"Quechua";s:0:"";s:8:"Romanian";s:6:"SlavÄ?";s:7:"Russian";s:20:"СлавÑ?нÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:7:"Slavisk";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"สลาวิà¸?";s:7:"Turkish";s:9:"Slav dili";s:9:"Ukrainian";s:0:"";
 s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"æ?¯æ??夫语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"æ?¯æ??夫èª?";}}s:5:"Welsh";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:5:"Welsh";s:7:"Spanish";s:6:"Galés";s:6:"German";s:9:"Walisisch";s:6:"French";s:7:"Gallois";s:6:"Arabic";s:14:"اÙ?Ù?Ù?زÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"WelÅ¡tina";s:5:"Welsh";s:7:"Cymraeg";s:6:"Danish";s:0:"";s:5:"Greek";s:5:"Welsh";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"kymri";s:5:"Irish";s:0:"";s:6:"Hebrew";s:5:"Welsh";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:4:"vels";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Gallese";s:8:"Japanese";s:18:"ã?¦ã?§ã?¼ã?«ã?ºèª?";s:6:"Korean";s:12:"ì?¨ì?¼ì¦?ì?´";s:7:"Kurdish";s:0:
 "";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:5:"Welsh";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:8:"walijski";s:20:"Portuguese, Portugal";s:5:"Welsh";s:18:"Portuguese, Brazil";s:5:"Welsh";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"GalezÄ?";s:7:"Russian";s:20:"Ð?аллийÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Walesiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"à¹?วลà¸?à¹?";s:7:"Turkish";s:5:"Galce";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"å¨?å°?士语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"å¨?ç?¾å£«èª?";}}s:6:"Danish";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:6:"Danish";s:7:"Spanish";s:6:"Danés";s:6:"German";
 s:8:"Dänisch";s:6:"French";s:6:"Danois";s:6:"Arabic";s:22:"اÙ?داÙ?Ù?ارÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"DánÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:5:"Dansk";s:5:"Greek";s:16:"Î?ανεζικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"tanska";s:5:"Irish";s:0:"";s:6:"Hebrew";s:8:"×?× ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:4:"dán";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:6:"Danese";s:8:"Japanese";s:18:"ã??ã?³ã??ã?¼ã?¯èª?";s:6:"Korean";s:12:"ë?´ë§?í?¬ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:5:"Deens";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:7:"duÅ?ski";s:20:"Portu
 guese, Portugal";s:12:"Dinamarquês";s:18:"Portuguese, Brazil";s:12:"Dinamarquês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"DanezÄ?";s:7:"Russian";s:14:"Ð?аÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:6:"Danska";s:5:"Tamil";s:0:"";s:4:"Thai";s:24:"à¹?à¸?à¸?มารà¹?à¸?";s:7:"Turkish";s:5:"Danca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"丹麦语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"丹麥èª?";}}s:5:"Greek";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:5:"Greek";s:7:"Spanish";s:6:"Griego";s:6:"German";s:10:"Griechisch";s:6:"French";s:12:"Grec moderne";s:6:"Arabic";s:18:"اÙ?Ù?Ù?Ù?اÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"GréÄ?tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?λληνικα";s:9:"Esper
 anto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"kreikka";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"×?×?×?× ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"görög";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Greco";s:8:"Japanese";s:15:"ã?®ã?ªã?·ã?¢èª?";s:6:"Korean";s:12:"그리ì?¤ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:6:"Grieks";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:6:"grecki";s:20:"Portuguese, Portugal";s:5:"Grego";s:18:"Portuguese, Brazil";s:5:"Grego";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"GreacÄ?";s:7:"Russian";s:18:"Ð?Ñ?еÑ?еÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Grekiska";s:5:"Tamil
 ";s:0:"";s:4:"Thai";s:12:"à¸?รีà¸?";s:7:"Turkish";s:7:"Yunanca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"å¸?è??语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"å¸?è??èª?";}}s:9:"Esperanto";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:9:"Esperanto";s:7:"Spanish";s:9:"Esperanto";s:6:"German";s:9:"Esperanto";s:6:"French";s:10:"Espéranto";s:6:"Arabic";s:21:"اÙ?اسبراÙ?تÙ? ";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"Esperanto";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?Ï?Ï?εÏ?ανÏ?ο";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:9:"esperanto";s:5:"Irish";s:0:"";s:6:"Hebrew";s:9:"Esperanto";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:11:"eszperantó";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic"
 ;s:0:"";s:7:"Italian";s:9:"Esperanto";s:8:"Japanese";s:21:"ã?¨ã?¹ã??ã?©ã?³ã??èª?";s:6:"Korean";s:18:"ì??ì?¤í??ë??í? ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:9:"Esperanto";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"esperanto";s:20:"Portuguese, Portugal";s:9:"Esperanto";s:18:"Portuguese, Brazil";s:9:"Esperanto";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"Esperanto";s:7:"Russian";s:18:"ЭÑ?пеÑ?анÑ?о";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Esperanto";s:5:"Tamil";s:0:"";s:4:"Thai";s:33:"à¹?อสà¹?à¸?อรัà¸?à¹?à¸?";s:7:"Turkish";s:9:"Esperanto";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"ä¸?ç??语";s:4:"Zulu";s:0:
 "";s:21:"Chinese (Traditional)";s:9:"ä¸?ç??èª?";}}s:8:"Estonian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:8:"Estonian";s:7:"Spanish";s:7:"Estonio";s:6:"German";s:8:"Estnisch";s:6:"French";s:8:"Estonien";s:6:"Arabic";s:18:"اÙ?أستÙ?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"EstónÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?Ï?θονικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:5:"Eesti";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"eesti";s:5:"Irish";s:0:"";s:6:"Hebrew";s:8:"Estonian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"észt";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:6:"Estone";s:8:"Japanese";s:18:"ã?¨ã?¹ã??ã??ã?¢èª?";s:6:"Korean";s:18:"ì??ì?¤í? ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9
 :"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:4:"Ests";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"estoÅ?ski";s:20:"Portuguese, Portugal";s:9:"Estoniano";s:18:"Portuguese, Brazil";s:9:"Estoniano";s:7:"Quechua";s:0:"";s:8:"Romanian";s:10:"EstonianÄ?";s:7:"Russian";s:18:"ЭÑ?Ñ?онÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Estniska";s:5:"Tamil";s:0:"";s:4:"Thai";s:30:"à¹?อสà¹?à¸?à¹?à¸?ียà¸?";s:7:"Turkish";s:12:"Estonya dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:15:"ç?±æ²?å°¼äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:15:"æ??æ²?å°¼äº?èª?";}}s:6:"Basque";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:6:"Basque";s:7:"Spanish";s:5:"Vasco";s:6:"German";s:8:"Baskisch";s:6:"French";s:6:"Basque";s:6:"Arabic";s:19:"Ù?غة اÙ?باسÙ?"
 ;s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"BaskiÄ?tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Î?αÏ?κικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"baski";s:5:"Irish";s:0:"";s:6:"Hebrew";s:6:"Basque";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"baszk";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Basco";s:8:"Japanese";s:12:"ã??ã?¹ã?¯èª?";s:6:"Korean";s:12:"ë°?ì?¤í?¬ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Baskisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"baskijski";s:20:"Portuguese, Portugal";s:5:"Basco";s:18:"Portuguese, Brazil";s:5:"Basco";s:7:"Quechua";s:0:"";s:8
 :"Romanian";s:6:"BascÄ?";s:7:"Russian";s:16:"Ð?аÑ?кÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Baskiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"à¸?าสà¸?à¹?";s:7:"Turkish";s:9:"Bask dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"å·´æ?¯å??语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"å·´æ?¯å??èª?";}}s:7:"Persian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Persian";s:7:"Spanish";s:5:"Persa";s:6:"German";s:8:"Persisch";s:6:"French";s:5:"Perse";s:6:"Arabic";s:16:"اÙ?Ù?ارسÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"PerzÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"ΠεÏ?Ï?ικοÏ?";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:11:"پارسÛ? ";s:7:"Finnish";s:6:"pers
 ia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"פרס×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"perzsa";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Persiano";s:8:"Japanese";s:15:"ã??ã?«ã?·ã?¢èª?";s:6:"Korean";s:15:"í??르ì??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Perzisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:6:"perski";s:20:"Portuguese, Portugal";s:5:"Persa";s:18:"Portuguese, Brazil";s:5:"Persa";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"PersanÄ?";s:7:"Russian";s:20:"Ð?еÑ?Ñ?идÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Persiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:30:"à¹?à¸?อรà¹?à¹?à¸?ียà¸?";s:7:"Turkish";s:7:"Farsça";s:9:"U
 krainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"æ³¢æ?¯è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"æ³¢æ?¯èª?";}}s:7:"Finnish";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Finnish";s:7:"Spanish";s:10:"Finlandés";s:6:"German";s:8:"Finnisch";s:6:"French";s:7:"Finnois";s:6:"Arabic";s:18:"اÙ?Ù?Ù?Ù?Ù?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"FínÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:20:"Φινλανδικη";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"suomi";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"פ×?× ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:4:"finn";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:10:"Finlandese";s:8:"Japanese";s:21:"ã??ã?£ã?³ã?©ã?³ã??èª?";s:6:"K
 orean";s:12:"í??ë??ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:4:"Fins";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:7:"fiÅ?ski";s:20:"Portuguese, Portugal";s:10:"Finlandês";s:18:"Portuguese, Brazil";s:10:"Finlandês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:11:"FinlandezÄ?";s:7:"Russian";s:14:"ФинÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:6:"Finska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"à¸?ิà¸?à¸?ิà¸?";s:7:"Turkish";s:5:"Fince";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"è?¬å?°è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"è?¬è?­èª?";}}s:5:"Irish";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:5:"Iri
 sh";s:7:"Spanish";s:9:"Irlandés";s:6:"German";s:6:"Irisch";s:6:"French";s:9:"Irlandais";s:6:"Arabic";s:20:"اÙ?Ø£Ù?رÙ?Ù?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"Ã?rÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?Ï?λανδικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:4:"iiri";s:5:"Irish";s:7:"Gaeilge";s:6:"Hebrew";s:10:"×?×?ר×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:3:"ír";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:9:"Irlandese";s:8:"Japanese";s:21:"ã?¢ã?¤ã?«ã?©ã?³ã??èª?";s:6:"Korean";s:15:"ì??ì?¼ë??ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:4:"Iers";s:17:"Norwegian BokmÃ¥l";s:0:"";s
 :7:"Punjabi";s:0:"";s:6:"Polish";s:9:"irlandzki";s:20:"Portuguese, Portugal";s:9:"Irlandês";s:18:"Portuguese, Brazil";s:9:"Irlandês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:10:"IrlandezÄ?";s:7:"Russian";s:20:"Ð?Ñ?ландÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Irländska";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"à¹?อริà¸?";s:7:"Turkish";s:13:"Ä°rlanda dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"ç?±å°?å?°è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"æ??ç?¾è?­èª?";}}s:6:"Hebrew";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:6:"Hebrew";s:7:"Spanish";s:6:"Hebreo";s:6:"German";s:10:"Hebräisch";s:6:"French";s:7:"Hébreu";s:6:"Arabic";s:14:"اÙ?عبرÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"HebrejÄ?ina";s:5:"Welsh";s:0:"
 ";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Î?βÏ?αικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"heprea";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"×¢×?ר×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"héber";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Ebraico";s:8:"Japanese";s:15:"ã??ã??ã?©ã?¤èª?";s:6:"Korean";s:12:"í??ë¸?리ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:9:"Hebreeuws";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"hebrajski";s:20:"Portuguese, Portugal";s:8:"Hebraico";s:18:"Portuguese, Brazil";s:8:"Hebraico";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"EbraicÄ?";s:7:"Russian";s:10:"Ð?вÑ?иÑ?";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian
 ";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Hebreiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"ฮิà¸?รู";s:7:"Turkish";s:9:"Ä°branice";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"å¸?伯æ?¥è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"å¸?伯ä¾?èª?";}}s:5:"Hindi";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:5:"Hindi";s:7:"Spanish";s:5:"Hindi";s:6:"German";s:5:"Hindi";s:6:"French";s:5:"Hindi";s:6:"Arabic";s:14:"اÙ?Ù?Ù?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"HindÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:12:"Î?νδικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"hindi";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"×?×?×?×?ת";s:5:"Hindi";s:18:"हिनà¥?दà¥?";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"hindi";s:8:
 "Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Hindi";s:8:"Japanese";s:18:"ã??ã?³ã??ã?£ã?¼èª?";s:6:"Korean";s:9:"í??ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:5:"Hindi";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:5:"hindi";s:20:"Portuguese, Portugal";s:5:"Hindi";s:18:"Portuguese, Brazil";s:5:"Hindi";s:7:"Quechua";s:0:"";s:8:"Romanian";s:5:"Hindi";s:7:"Russian";s:10:"Хинди";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:5:"Hindi";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"ฮิà¸?à¸?ิ";s:7:"Turkish";s:7:"Hintçe";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"å?°å?°è¯­";s:4:"Zulu";s:0:"";s:21:"Ch
 inese (Traditional)";s:9:"å?°å?°èª?";}}s:8:"Croatian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:8:"Croatian";s:7:"Spanish";s:6:"Croata";s:6:"German";s:9:"Kroatisch";s:6:"French";s:6:"Croate";s:6:"Arabic";s:18:"اÙ?Ù?رÙ?اتÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:14:"ChorvátÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?Ï?οαÏ?ικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"kroatia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:14:"קר×?×?×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:8:"Hrvatski";s:9:"Hungarian";s:7:"horvát";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:6:"Croato";s:8:"Japanese";s:18:"ã?¯ã?­ã?¢ã??ã?¢èª?";s:6:"Korean";s:18:"í?¬ë¡?ì??ì??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:""
 ;s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:9:"Kroatisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"chorwacki";s:20:"Portuguese, Portugal";s:6:"Croata";s:18:"Portuguese, Brazil";s:6:"Croata";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"CroatÄ?";s:7:"Russian";s:20:"ХоÑ?ваÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Kroatiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:27:"à¹?à¸?รà¹?อà¹?à¸?ีย";s:7:"Turkish";s:10:"Hırvatça";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:15:"å??ç½?å?°äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:15:"å??ç¾?å?°äº?èª?";}}s:9:"Hungarian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:9:"Hungarian";s:7:"Spanish";s:8:"Húngaro";s:6:"German";s:9:"Ungarisch";s:6:"French";s:8:"Hongrois";s:6:"Arabic";s:18:"اÙ?Ù?Ù?غØ
 §Ø±Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"MaÄ?arÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?Ï?γγÏ?ικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"unkari";s:5:"Irish";s:0:"";s:6:"Hebrew";s:14:"×?×?× ×?ר×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"Magyar";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:9:"Ungherese";s:8:"Japanese";s:18:"ã??ã?³ã?¬ã?ªã?¼èª?";s:6:"Korean";s:12:"í??ê°?리ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Hongaars";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"wÄ?gierski";s:20:"Portuguese, Portugal";s:8:"Húngaro";s:18:"Portuguese, Brazil";
 s:8:"Húngaro";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"UngarÄ?";s:7:"Russian";s:20:"Ð?енгеÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Ungerska";s:5:"Tamil";s:0:"";s:4:"Thai";s:21:"ฮัà¸?à¸?ารี";s:7:"Turkish";s:7:"Macarca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"å??ç??å?©è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"å??ç??å?©èª?";}}s:8:"Armenian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:8:"Armenian";s:7:"Spanish";s:7:"Armenio";s:6:"German";s:9:"Armenisch";s:6:"French";s:9:"Arménien";s:6:"Arabic";s:18:"اÙ?أرÙ?Ù?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"ArménÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?Ï?μενικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0
 :"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"armenia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:8:"Armenian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:8:"örmény";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:6:"Armeno";s:8:"Japanese";s:18:"ã?¢ã?«ã?¡ã??ã?¢èª?";s:6:"Korean";s:18:"ì??르ë©?ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:7:"Armeens";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"ormiaÅ?ski";s:20:"Portuguese, Portugal";s:8:"Arménio";s:18:"Portuguese, Brazil";s:8:"Arménio";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"ArmeanÄ?";s:7:"Russian";s:18:"Ð?Ñ?мÑ?нÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Armeniska";s:5:"Tamil";s:0:"";s:4:"Thai";s:30:"อà¸
 ²à¸£à¹?à¹?มà¹?à¸?ีย";s:7:"Turkish";s:8:"Ermenice";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:15:"äº?ç¾?å°¼äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:15:"äº?ç¾?å°¼äº?èª?";}}s:10:"Indonesian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:10:"Indonesian";s:7:"Spanish";s:9:"Indonesio";s:6:"German";s:11:"Indonesisch";s:6:"French";s:11:"Indonésien";s:6:"Arabic";s:22:"اÙ?Ø£Ù?دÙ?Ù?Ù?سÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:13:"IndonézÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:22:"Î?νδονηÏ?ιακα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:9:"indonesia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"Indonesian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:8:"indonéz";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:9:
 "Indonesia";s:9:"Icelandic";s:0:"";s:7:"Italian";s:11:"Indonesiano";s:8:"Japanese";s:21:"ã?¤ã?³ã??ã??ã?·ã?¢èª?";s:6:"Korean";s:18:"ì?¸ë??ë?¤ì??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:11:"Indonesisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:12:"indonezyjski";s:20:"Portuguese, Portugal";s:10:"Indonésio";s:18:"Portuguese, Brazil";s:10:"Indonésio";s:7:"Quechua";s:0:"";s:8:"Romanian";s:12:"IndonezianÄ?";s:7:"Russian";s:26:"Ð?ндонезийÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:11:"Indonesiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:33:"อิà¸?à¹?à¸?à¸?ีà¹?à¸?ีย";s:7:"Turkish";s:14:"Endonezya dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:
 "";s:20:"Chinese (Simplified)";s:18:"å?°åº¦å°¼è¥¿äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"å?°å°¼èª?";}}s:9:"Icelandic";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:9:"Icelandic";s:7:"Spanish";s:9:"Islandés";s:6:"German";s:11:"Isländisch";s:6:"French";s:9:"Islandais";s:6:"Arabic";s:22:"اÙ?Ø£Ù?سÙ?اÙ?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"IslanÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?Ï?λανδικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"islanti";s:5:"Irish";s:0:"";s:6:"Hebrew";s:9:"Icelandic";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"izlandi";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:9:"Ã?slenska";s:7:"Italian";s:9:"Islandese";s:8:"Japanese";s:21:"ã?¢ã?¤ã?¹ã?©ã?³ã??èª?";s:6:"Korean";s:18:"ì??ì?´ì?¬ë??ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s
 :0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Ijslands";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"islandzki";s:20:"Portuguese, Portugal";s:9:"Islandês";s:18:"Portuguese, Brazil";s:9:"Islandês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:10:"IslandezÄ?";s:7:"Russian";s:20:"Ð?Ñ?ландÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Isländska";s:5:"Tamil";s:0:"";s:4:"Thai";s:27:"à¹?อà¸?à¹?à¹?ลà¸?à¸?à¹?";s:7:"Turkish";s:10:"Ä°zlandaca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"å?°å²?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"å?°å³¶èª?";}}s:7:"Italian";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:7:"Italian";s:7:"Spanish";s:8:"Italian
 o";s:6:"German";s:11:"Italienisch";s:6:"French";s:7:"Italien";s:6:"Arabic";s:18:"اÙ?Ø¥Ù?طاÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"TalianÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Î?Ï?αλικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"italia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:14:"×?×?×?×?ק×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"olasz";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Italiano";s:8:"Japanese";s:15:"ã?¤ã?¿ã?ªã?¢èª?";s:6:"Korean";s:12:"ì?´í??리ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:9:"Italiaans";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s
 :7:"wÅ?oski";s:20:"Portuguese, Portugal";s:8:"Italiano";s:18:"Portuguese, Brazil";s:8:"Italiano";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"ItalianÄ?";s:7:"Russian";s:22:"Ð?Ñ?алÑ?Ñ?нÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Italienska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"อิà¸?าลี";s:7:"Turkish";s:10:"Ä°talyanca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"æ??大å?©è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"義大å?©èª?";}}s:8:"Japanese";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:8:"Japanese";s:7:"Spanish";s:8:"Japonés";s:6:"German";s:9:"Japanisch";s:6:"French";s:8:"Japonais";s:6:"Arabic";s:18:"اÙ?Ù?اباÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"JaponÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Gr
 eek";s:16:"Î?αÏ?Ï?νικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"japani";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"×?פנ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"japán";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:10:"Giapponese";s:8:"Japanese";s:9:"æ?¥æ?¬èª?";s:6:"Korean";s:6:"ì?¼ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:6:"Japans";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"japoÅ?ski";s:20:"Portuguese, Portugal";s:8:"Japonês";s:18:"Portuguese, Brazil";s:8:"Japonês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"JaponezÄ?";s:7:"Russian";s:16:"ЯпонÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7
 :"Swedish";s:8:"Japanska";s:5:"Tamil";s:0:"";s:4:"Thai";s:21:"à¸?ีà¹?à¸?ุà¹?à¸?";s:7:"Turkish";s:7:"Japonca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:6:"æ?¥è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:6:"æ?¥èª?";}}s:6:"Korean";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:6:"Korean";s:7:"Spanish";s:7:"Coreano";s:6:"German";s:10:"Koreanisch";s:6:"French";s:7:"Coréen";s:6:"Arabic";s:14:"اÙ?Ù?Ù?رÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"KórejÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?οÏ?εαÏ?ικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"korea";s:5:"Irish";s:0:"";s:6:"Hebrew";s:14:"ק×?ר×?× ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"koreai";s:8:"Armenian";s:0:"";s:10:"Indonesian";s
 :0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Coreano";s:8:"Japanese";s:9:"é??å?½èª?";s:6:"Korean";s:9:"í??êµ­ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Koreaans";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"koreaÅ?ski";s:20:"Portuguese, Portugal";s:6:"Korean";s:18:"Portuguese, Brazil";s:6:"Korean";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"CoreanÄ?";s:7:"Russian";s:18:"Ð?оÑ?ейÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Koreanska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"à¹?à¸?าหลี";s:7:"Turkish";s:9:"Kore dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:6:"é?©è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditiona
 l)";s:6:"é??èª?";}}s:7:"Kurdish";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Kurdish";s:7:"Spanish";s:5:"Kurdo";s:6:"German";s:8:"Kurdisch";s:6:"French";s:5:"Kurde";s:6:"Arabic";s:14:"اÙ?Ù?ردÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"KurdÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?οÏ?Ï?δικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"kurdi";s:5:"Irish";s:0:"";s:6:"Hebrew";s:7:"Kurdish";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:4:"kurd";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Curdo";s:8:"Japanese";s:12:"ã?¯ã?«ã??èª?";s:6:"Korean";s:12:"쿠르ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";
 s:5:"Dutch";s:8:"Koerdish";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"kurdyjski";s:20:"Portuguese, Portugal";s:5:"Curdo";s:18:"Portuguese, Brazil";s:5:"Curdo";s:7:"Quechua";s:0:"";s:8:"Romanian";s:6:"KurdÄ?";s:7:"Russian";s:16:"Ð?Ñ?Ñ?дÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Kurdiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:24:"à¹?à¸?อรà¹?à¸?ิà¸?";s:7:"Turkish";s:8:"Kürtçe";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"åº?å°?德语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"庫ç?¾å¾·èª?";}}s:5:"Latin";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:5:"Latin";s:7:"Spanish";s:6:"Latín";s:6:"German";s:6:"Latein";s:6:"French";s:5:"Latin";s:6:"Arabic";s:18:"اÙ?Ù?اتÙ?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic
 ";s:10:"LatinÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?αÏ?ινικη";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"latina";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"×?×?×?× ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"latin";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:6:"Latino";s:8:"Japanese";s:12:"ã?©ã??ã?³èª?";s:6:"Korean";s:9:"ë?¼í?´ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:6:"Latijn";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"Å?aciÅ?ski";s:20:"Portuguese, Portugal";s:6:"Latina";s:18:"Portuguese, Brazil";s:6:"Latina";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"LatinÄ?";s:7:"Russian";s:18:"Ð?аÑ?инÑ?кий";s:9:"Slovenian";s:0:""
 ;s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:5:"Latin";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"ละà¸?ิà¸?";s:7:"Turkish";s:7:"Latince";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"æ??ä¸?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"æ??ä¸?èª?";}}s:7:"Latvian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Latvian";s:7:"Spanish";s:6:"Letón";s:6:"German";s:8:"Lettisch";s:6:"French";s:6:"Letton";s:6:"Arabic";s:16:"اÙ?Ù?اتÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"LotyÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?εÏ?ονικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"latvia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:7:"Latvian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s
 :4:"lett";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Lettone";s:8:"Japanese";s:15:"ã?©ã??ã??ã?¢èª?";s:6:"Korean";s:15:"ë?¼í?¸ë¹?ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:10:"LatvieÅ¡u ";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:4:"Lets";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"Å?otewski";s:20:"Portuguese, Portugal";s:6:"Letão";s:18:"Portuguese, Brazil";s:6:"Letão";s:7:"Quechua";s:0:"";s:8:"Romanian";s:10:"LetonianÄ?";s:7:"Russian";s:19:"лаÑ?Ñ?Ñ?Ñ?кий ";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Lettiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:21:"ลัà¸?à¹?วีย";s:7:"Turkish";s:7:"Letonca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chin
 ese (Simplified)";s:15:"æ??è?±ç»´äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:15:"æ??è?«ç¶­äº?èª?";}}s:10:"Lithuanian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:10:"Lithuanian";s:7:"Spanish";s:7:"Lituano";s:6:"German";s:9:"Litauisch";s:6:"French";s:9:"Lituanien";s:6:"Arabic";s:18:"اÙ?Ù?تÙ?اÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"LitovÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:20:"Î?ιθοÏ?ανικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"liettua";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"Lithuanian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"litván";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Lituano";s:8:"Japanese";s:18:"ã?ªã??ã?¢ã??ã?¢èª?";s:6:"Korean";s:18:"리í?¬ì??ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:
 "";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:7:"Litouws";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:8:"litewski";s:20:"Portuguese, Portugal";s:7:"Lituano";s:18:"Portuguese, Brazil";s:7:"Lituano";s:7:"Quechua";s:0:"";s:8:"Romanian";s:11:"LituanianÄ?";s:7:"Russian";s:18:"Ð?иÑ?овÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Litauiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:27:"ลิà¸?ัวà¹?à¸?ีย";s:7:"Turkish";s:10:"Litvanyaca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"ç«?é?¶å®?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"ç«?é?¶å®?èª?";}}s:10:"Macedonian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:10:"Macedonian";s:7:"Spanish";s:9:"Macedonio";s:6:"German";
 s:11:"Mazedonisch";s:6:"French";s:11:"Macédonien";s:6:"Arabic";s:18:"اÙ?Ù?Ù?دÙ?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:14:"MacedónÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:20:"Î?ακεδονικο";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:9:"makedonia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"Macedonian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:8:"macedón";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Macedone";s:8:"Japanese";s:18:"ã??ã?±ã??ã??ã?¢èª?";s:6:"Korean";s:18:"ë§?ì¼?ë??ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:11:"Macedonisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:
 6:"Polish";s:11:"macedoÅ?ski";s:20:"Portuguese, Portugal";s:10:"Macedônio";s:18:"Portuguese, Brazil";s:10:"Macedônio";s:7:"Quechua";s:0:"";s:8:"Romanian";s:12:"MacedonianÄ?";s:7:"Russian";s:22:"Ð?акедонÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Makedonska";s:5:"Tamil";s:0:"";s:4:"Thai";s:30:"มาà¸?ิà¹?à¸?à¹?à¸?ีย";s:7:"Turkish";s:11:"Makedonyaca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"马å?¶é¡¿è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"馬å?¶é ?èª?";}}s:7:"Maltese";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Maltese";s:7:"Spanish";s:7:"Maltés";s:6:"German";s:10:"Maltesisch";s:6:"French";s:7:"Maltais";s:6:"Arabic";s:16:"اÙ?Ù?اÙ?Ø·Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:13:"MaltézÅ¡tina";s:5:"Wel
 sh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?αλÏ?εζικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"malta";s:5:"Irish";s:0:"";s:6:"Hebrew";s:7:"Maltese";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"máltai";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Maltese";s:8:"Japanese";s:12:"ã??ã?«ã?¿èª?";s:6:"Korean";s:9:"몰í??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:7:"Maltees";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"maltaÅ?ski";s:20:"Portuguese, Portugal";s:7:"Maltês";s:18:"Portuguese, Brazil";s:7:"Maltês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"MaltezÄ?";s:7:"Russian";s:22:"Ð?алÑ?Ñ?ийÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s
 :8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Maltesiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"มอลà¸?ีส";s:7:"Turkish";s:10:"Malta dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"马è?³ä»?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"馬ç?¾ä»?èª?";}}s:9:"Moldavian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:9:"Moldavian";s:7:"Spanish";s:7:"Moldavo";s:6:"German";s:10:"Moldavisch";s:6:"French";s:7:"Moldave";s:6:"Arabic";s:20:"اÙ?Ù?Ù?Ù?دÙ?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"MoldavÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?ολδαβικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:8:"moldavia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:9:"Moldavian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"
 ";s:9:"Hungarian";s:8:"moldovai";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Moldavo";s:8:"Japanese";s:18:"ã?¢ã?«ã??ã??ã?¢èª?";s:6:"Korean";s:15:"몰ë?¤ë¹?ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:10:"Moldavisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"moÅ?dawski";s:20:"Portuguese, Portugal";s:7:"Moldavo";s:18:"Portuguese, Brazil";s:7:"Moldavo";s:7:"Quechua";s:0:"";s:8:"Romanian";s:11:"MoldoveanÄ?";s:7:"Russian";s:20:"Ð?олдавÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Moldaviska";s:5:"Tamil";s:0:"";s:4:"Thai";s:30:"มอลà¸?าà¹?วียà¸?";s:7:"Turkish";s:10:"Moldovyaca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietna
 mese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:18:"æ?©å°?达维äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:18:"æ?©ç?¾é??維äº?èª?";}}s:9:"Mongolian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:9:"Mongolian";s:7:"Spanish";s:6:"Mongol";s:6:"German";s:10:"Mongolisch";s:6:"French";s:6:"Mongol";s:6:"Arabic";s:18:"اÙ?Ù?Ù?غÙ?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:12:"MongolÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?ογγολικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"mongoli";s:5:"Irish";s:0:"";s:6:"Hebrew";s:9:"Mongolian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"mongol";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Mongolo";s:8:"Japanese";s:15:"ã?¢ã?³ã?´ã?«èª?";s:6:"Korean";s:9:"몽골ì?´";s:7:"Kurdish";s:0:"";s:5:"Lati
 n";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Mongools";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"mongolski";s:20:"Portuguese, Portugal";s:9:"Mongolian";s:18:"Portuguese, Brazil";s:9:"Mongolian";s:7:"Quechua";s:0:"";s:8:"Romanian";s:10:"MongolezÄ?";s:7:"Russian";s:22:"Ð?онголÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:10:"Mongoliska";s:5:"Tamil";s:0:"";s:4:"Thai";s:27:"มอà¸?à¹?à¸?à¹?ลีย";s:7:"Turkish";s:8:"Mongolca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"è??å?¤è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"è??å?¤èª?";}}s:6:"Nepali";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:6:"Nepali";s:7:"Spanish";s:7:"NepalÃ
 ­";s:6:"German";s:6:"Nepali";s:6:"French";s:9:"Népalais";s:6:"Arabic";s:18:"اÙ?Ù?Ù?باÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"NepálÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:12:"Î?εÏ?αλι";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"nepali";s:5:"Irish";s:0:"";s:6:"Hebrew";s:6:"Nepali";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"nepáli";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Nepalese";s:8:"Japanese";s:15:"ã??ã??ã?¼ã?«èª?";s:6:"Korean";s:9:"ë?¤í??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Nepalees";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:8:"nepalski";s:20
 :"Portuguese, Portugal";s:6:"Nepali";s:18:"Portuguese, Brazil";s:6:"Nepali";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"NepalezÄ?";s:7:"Russian";s:20:"Ð?епалÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:11:"Nepalesiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"à¹?à¸?à¸?าล";s:7:"Turkish";s:10:"Nepal dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"å°¼æ³?å°?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"å°¼æ³?ç?¾èª?";}}s:5:"Dutch";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:5:"Dutch";s:7:"Spanish";s:9:"Holandés";s:6:"German";s:12:"Holländisch";s:6:"French";s:12:"Néerlandais";s:6:"Arabic";s:18:"اÙ?Ù?Ù?Ù?Ù?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"HolandÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?λλαν
 δικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:8:"hollanti";s:5:"Irish";s:0:"";s:6:"Hebrew";s:14:"×?×?×?× ×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"holland";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:11:"Neerlandese";s:8:"Japanese";s:15:"ã?ªã?©ã?³ã??èª?";s:6:"Korean";s:9:"í??ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:10:"Nederlands";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:11:"holenderski";s:20:"Portuguese, Portugal";s:9:"Holandês";s:18:"Portuguese, Brazil";s:9:"Holandês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"OlanezÄ?";s:7:"Russian";s:22:"Ð?олландÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbi
 an";s:0:"";s:7:"Swedish";s:13:"Nederländska";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"à¸?ัà¸?à¸?à¹?";s:7:"Turkish";s:10:"Hollandaca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"è?·å?°è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"è?·è?­èª?";}}s:17:"Norwegian BokmÃ¥l";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:17:"Norwegian BokmÃ¥l";s:7:"Spanish";s:7:"BokmÃ¥l";s:6:"German";s:24:"Norwegisch (Buchsprache)";s:6:"French";s:18:"Norvégien BokmÃ¥l";s:6:"Arabic";s:39:"اÙ?بÙ?Ù?Ù?اÙ?Ù?Ø© اÙ?Ù?رÙ?Ù?جÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:21:"Nórsky jazyk BokmÃ¥l";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?οÏ?βηγικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:10:"kirjanorja";s:5:"Irish";s:0:"";s:6:"Hebrew";s:16:"× ×?ר×?×?×?
 ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:15:"norvég bokmÃ¥l";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:17:"Norvegese BokmÃ¥l";s:8:"Japanese";s:36:"ã??ã?«ã?¦ã?§ã?¼ã?»ã??ã?¼ã?¯ã?¢ã?¼ã?«";s:6:"Korean";s:25:"ë?¸ë¥´ì?¨ì?´ ë³´í?¬ë§?ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:13:"Noors BokmÃ¥l";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:16:"norweski bokmÃ¥l";s:20:"Portuguese, Portugal";s:10:"Norueguês";s:18:"Portuguese, Brazil";s:10:"Norueguês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:21:"BokmÃ¥l (norvegianÄ?)";s:7:"Russian";s:33:"Ð?оÑ?вежÑ?кий бÑ?кмол";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:14:"Norskt BokmÃ¥l";s:5:"Tamil";s:0:"";s:4:"Thai";s:51:"
 à¸?อรà¹?วิà¹?à¸?ียà¸?à¸?อà¸?มาล";s:7:"Turkish";s:19:"Bokmal Norveç dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:21:"æ?ªå¨?å¸?å??è?«å°?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:21:"æ?ªå¨?å¸?å??è?«ç?¾èª?";}}s:7:"Punjabi";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Punjabi";s:7:"Spanish";s:9:"Panyabí ";s:6:"German";s:10:"Pandschabi";s:6:"French";s:7:"Panjabi";s:6:"Arabic";s:18:"اÙ?بÙ?جابÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:14:"PandžábÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:7:"Panjabi";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:8:"pandzabi";s:5:"Irish";s:0:"";s:6:"Hebrew";s:7:"Punjabi";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:10:"pandzsábi";s:8:"Armenian";s:0:"";s:10:"I
 ndonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Panjabi";s:8:"Japanese";s:21:"ã??ã?³ã?¸ã?£ã?¼ã??èª?";s:6:"Korean";s:12:"í??ì??ë¸?ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:7:"Punjabi";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"pendżabi";s:20:"Portuguese, Portugal";s:7:"Panjabi";s:18:"Portuguese, Brazil";s:7:"Panjabi";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"Punjabi";s:7:"Russian";s:16:"Ð?анджаби";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:7:"Punjabi";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"à¸?ัà¸?à¸?าà¸?";s:7:"Turkish";s:9:"Pencapça";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"æ??é?®æ?®è¯­";s:4:"Zulu";s:
 0:"";s:21:"Chinese (Traditional)";s:12:"æ??é?®æ?®èª?";}}s:6:"Polish";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:6:"Polish";s:7:"Spanish";s:6:"Polaco";s:6:"German";s:8:"Polnisch";s:6:"French";s:8:"Polonais";s:6:"Arabic";s:18:"اÙ?بÙ?Ù?Ù?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"PolÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"ΠολÏ?νικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"puola";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"פ×?×?× ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"lengyel";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Polacco";s:8:"Japanese";s:18:"ã??ã?¼ã?©ã?³ã??èª?";s:6:"Korean";s:12:"í?´ë??ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Mol
 davian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:5:"Pools";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:6:"polski";s:20:"Portuguese, Portugal";s:8:"Polonês";s:18:"Portuguese, Brazil";s:8:"Polonês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"PolonezÄ?";s:7:"Russian";s:16:"Ð?олÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:6:"Polska";s:5:"Tamil";s:0:"";s:4:"Thai";s:21:"à¹?à¸?à¹?ลà¸?à¸?à¹?";s:7:"Turkish";s:9:"Polonyaca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"æ³¢å?°è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"æ³¢è?­èª?";}}s:20:"Portuguese, Portugal";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:21:"Portuguese (Portugal)";s:7:"Spanish";s:20:"Portugués, Portugal";s:6:"German";s:23:"Portugiesisch, Portugal";s:6:"French";s:23:"Portugais - du Portugal";
 s:6:"Arabic";s:40:"اÙ?برتغاÙ?Ù?Ø© Ø? اÙ?برتغاÙ?";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:14:"PortugalÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:22:"ΠοÏ?Ï?ογαλικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:9:"portugali";s:5:"Irish";s:0:"";s:6:"Hebrew";s:18:"פ×?ר×?×?×?×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:9:"portugál";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:22:"Portoghese, Portogallo";s:8:"Japanese";s:18:"ã??ã?«ã??ã?¬ã?«èª?";s:6:"Korean";s:28:"í?¬ë¥´í?¬ê°? í?¬ë¥´í?¬ê°?ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:19:"Portugees, Portugal";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Pun
 jabi";s:0:"";s:6:"Polish";s:23:"portugalski, Portugalia";s:20:"Portuguese, Portugal";s:10:"Português";s:18:"Portuguese, Brazil";s:10:"Português";s:7:"Quechua";s:0:"";s:8:"Romanian";s:24:"PortughezÄ? (Portugalia)";s:7:"Russian";s:48:"Ð?оÑ?Ñ?Ñ?галÑ?Ñ?кий, Ð?оÑ?Ñ?Ñ?галиÑ?";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:22:"Portugisiska, Portugal";s:5:"Tamil";s:0:"";s:4:"Thai";s:24:"à¹?à¸?รà¸?ุà¹?à¸?ส";s:7:"Turkish";s:20:"Portekizce, Portekiz";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:27:"è?¡è??ç??语ï¼?è?¡è??ç??ï¼?";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:27:"è?¡è??ç??èª?ï¼?è?¡è??ç??ï¼?";}}s:18:"Portuguese, Brazil";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:19:"Portuguese (Brazil)";s:7:"Spanish";s:18:"Portugués, Brasil";s:6:"German";s:24:"Portugiesisch, Brasilien";s:6:"French";s:22:"Portugais 
 - du Brésil";s:6:"Arabic";s:39:"اÙ?برتغاÙ?Ù?Ø© Ø?اÙ?برازÙ?Ù?";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:25:"Brazílska PortugalÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:22:"ΠοÏ?Ï?ογαλικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:19:"Brasilian portugali";s:5:"Irish";s:0:"";s:6:"Hebrew";s:18:"פ×?ר×?×?×?×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"brazil";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:19:"Portoghese, Brasile";s:8:"Japanese";s:36:"ã??ã?«ã??ã?¬ã?«èª?ï¼?ã??ã?©ã?¸ã?«ï¼?";s:6:"Korean";s:25:"ë¸?ë?¼ì§? í?¬ë¥´í?¬ê°?ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:20:"Portugees, Brazil
 ië";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:21:"portugalski, Brazylia";s:20:"Portuguese, Portugal";s:10:"Português";s:18:"Portuguese, Brazil";s:10:"Português";s:7:"Quechua";s:0:"";s:8:"Romanian";s:22:"PortughezÄ? (Brazilia)";s:7:"Russian";s:44:"Ð?оÑ?Ñ?Ñ?галÑ?Ñ?кий, Ð?Ñ?азилиÑ?";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:23:"Portugisiska, Brasilien";s:5:"Tamil";s:0:"";s:4:"Thai";s:42:"à¹?à¸?รà¸?ุà¹?à¸?สà¸?ราà¸?ิล";s:7:"Turkish";s:20:"Portekizce, Brezilya";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:24:"è?¡è??ç??语ï¼?巴西ï¼?";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:24:"è?¡è??ç??èª?ï¼?巴西ï¼?";}}s:7:"Quechua";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Quechua";s:7:"Spanish";s:7:"Quechua";s:6:"German";s:7:"Quechua";s:6:"French";s:7:"Quechua";s:6:"Ar
 abic";s:18:"اÙ?Ù?Ù?Ù?تشÙ?ا";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:13:"Jazyk Quechua";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Î?εÏ?Ï?οÏ?α";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"ketsua";s:5:"Irish";s:0:"";s:6:"Hebrew";s:7:"Quechua";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"quechua";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Quechua";s:8:"Japanese";s:15:"ã?±ã??ã?¥ã?¢èª?";s:6:"Korean";s:12:"ì¼?ì¶?ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:7:"Quechua";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:6:"keczua";s:20:"Portuguese, Portugal";s:7:"Quechua";s:18:"Portuguese, Braz
 il";s:7:"Quechua";s:7:"Quechua";s:0:"";s:8:"Romanian";s:10:"QuechuanÄ?";s:7:"Russian";s:10:"Ð?еÑ?Ñ?а";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:7:"Quechua";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"à¸?ิวà¸?ัว";s:7:"Turkish";s:12:"Quechua dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"ç??ä¸?äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"è??ä¸?äº?èª?";}}s:8:"Romanian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:8:"Romanian";s:7:"Spanish";s:6:"Rumano";s:6:"German";s:10:"Rumänisch";s:6:"French";s:7:"Roumain";s:6:"Arabic";s:18:"اÙ?رÙ?Ù?اÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"RumunÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"ΡοÏ?μανικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:
 "";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"romania";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"ר×?×?× ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"román";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:6:"Rumeno";s:8:"Japanese";s:18:"ã?«ã?¼ã??ã??ã?¢èª?";s:6:"Korean";s:15:"ë¡?ë§?ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Roemeens";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"rumuÅ?ski";s:20:"Portuguese, Portugal";s:6:"Romeno";s:18:"Portuguese, Brazil";s:6:"Romeno";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"RomânÄ?";s:7:"Russian";s:18:"РÑ?мÑ?нÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Rumänska";s:5:"Tamil";s:0:"";s:4:"Thai";s:24:"à¹?รมà¸
 ²à¹?à¸?ีย";s:7:"Turkish";s:7:"Rumence";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:15:"ç½?马尼äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:15:"ç¾?馬尼äº?èª?";}}s:7:"Russian";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:7:"Russian";s:7:"Spanish";s:4:"Ruso";s:6:"German";s:8:"Russisch";s:6:"French";s:5:"Russe";s:6:"Arabic";s:14:"اÙ?رÙ?سÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:8:"RuÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:12:"ΡÏ?Ï?ικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:8:"venäjä";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"ר×?ס×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"orosz";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Russo";s:8:"Japanese
 ";s:12:"ã?­ã?·ã?¢èª?";s:6:"Korean";s:12:"ë?¬ì??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Russisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:8:"rosyjski";s:20:"Portuguese, Portugal";s:5:"Russo";s:18:"Portuguese, Brazil";s:5:"Russo";s:7:"Quechua";s:0:"";s:8:"Romanian";s:5:"RusÄ?";s:7:"Russian";s:14:"РÑ?Ñ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:5:"Ryska";s:5:"Tamil";s:0:"";s:4:"Thai";s:21:"รัสà¹?à¸?ีย";s:7:"Turkish";s:6:"Rusça";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:6:"ä¿?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:6:"ä¿?èª?";}}s:9:"Slovenian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"En
 glish";s:9:"Slovenian";s:7:"Spanish";s:8:"Esloveno";s:6:"German";s:10:"Slowenisch";s:6:"French";s:8:"Slovène";s:6:"Arabic";s:20:"اÙ?سÙ?Ù?Ù?اÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"SlovinÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Σλοβενικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:8:"sloveeni";s:5:"Irish";s:0:"";s:6:"Hebrew";s:9:"Slovenian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:8:"szlovén";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Sloveno";s:8:"Japanese";s:18:"ã?¹ã?­ã??ã??ã?¢èª?";s:6:"Korean";s:18:"ì?¬ë¡?ë² ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Sloveens";s:17:"
 Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:11:"sÅ?oweÅ?ski";s:20:"Portuguese, Portugal";s:8:"Esloveno";s:18:"Portuguese, Brazil";s:8:"Esloveno";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"SlovenÄ?";s:7:"Russian";s:20:"СловенÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Slovenska";s:5:"Tamil";s:0:"";s:4:"Thai";s:30:"สà¹?ลวีà¹?à¸?ียà¸?";s:7:"Turkish";s:11:"Sloven dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:18:"æ?¯æ´?æ??å°¼äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:18:"æ?¯æ´?æ??å°¼äº?èª?";}}s:6:"Somali";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:6:"Somali";s:7:"Spanish";s:7:"Somalí";s:6:"German";s:6:"Somali";s:6:"French";s:6:"Somali";s:6:"Arabic";s:18:"اÙ?صÙ?Ù?اÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:
 6:"Slavic";s:11:"SomálÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:6:"Somali";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"somali";s:5:"Irish";s:0:"";s:6:"Hebrew";s:6:"Somali";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:8:"szomáli";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:6:"Somalo";s:8:"Japanese";s:12:"ã?½ã??ã?ªèª?";s:6:"Korean";s:15:"ì??ë§?리ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:9:"Somalisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"somalijski";s:20:"Portuguese, Portugal";s:6:"Somali";s:18:"Portuguese, Brazil";s:6:"Somali";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"SomalezÄ?";s:7:"Russian";s:22:"СомалийÑ?кий";s:9:"Sloven
 ian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Somaliska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"à¹?à¸?มาลี";s:7:"Turkish";s:8:"Somalice";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"索马é??语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"索馬é??èª?";}}s:8:"Albanian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:8:"Albanian";s:7:"Spanish";s:8:"Albanés";s:6:"German";s:9:"Albanisch";s:6:"French";s:8:"Albanais";s:6:"Arabic";s:18:"اÙ?Ø£Ù?باÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:11:"AlbánÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?λβανικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"albania";s:5:"Irish";s:0:"";s:6:"Hebrew";s:8:"Albanian";s:5:"Hindi";s:0:"";
 s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"albán";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:8:"Albanese";s:8:"Japanese";s:18:"ã?¢ã?«ã??ã??ã?¢èª?";s:6:"Korean";s:15:"ì??ë°?ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:7:"Albaans";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:9:"albaÅ?ski";s:20:"Portuguese, Portugal";s:8:"Albanês";s:18:"Portuguese, Brazil";s:8:"Albanês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:9:"AlbanezÄ?";s:7:"Russian";s:18:"Ð?лбанÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Albanska";s:5:"Tamil";s:0:"";s:4:"Thai";s:27:"อัลà¹?à¸?à¹?à¸?ีย";s:7:"Turkish";s:10:"Arnavutça";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vi
 etnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:18:"é?¿å°?å·´å°¼äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:18:"é?¿ç?¾å·´å°¼äº?èª?";}}s:7:"Serbian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Serbian";s:7:"Spanish";s:6:"Serbio";s:6:"German";s:8:"Serbisch";s:6:"French";s:5:"Serbe";s:6:"Arabic";s:14:"اÙ?صربÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"SrbÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"ΣεÏ?βικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"serbia";s:5:"Irish";s:0:"";s:6:"Hebrew";s:7:"Serbian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"szerb";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Serbo";s:8:"Japanese";s:15:"ã?»ã?«ã??ã?¢èª?";s:6:"Korean";s:15:"ì?¸ë¥´ë¹?ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"
 Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Servisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:7:"serbski";s:20:"Portuguese, Portugal";s:7:"Sérvio";s:18:"Portuguese, Brazil";s:7:"Sérvio";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"SârbÄ?";s:7:"Russian";s:16:"СеÑ?бÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Serbiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:27:"à¹?à¸?อรà¹?à¹?à¸?ีย";s:7:"Turkish";s:8:"Sırpça";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:15:"èµ?å°?ç»´äº?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:15:"è³½ç?¾ç¶­äº?èª?";}}s:7:"Swedish";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Swedish";s:7:"Spanish";s:5:"Sueco";s:6:"German";s:10
 :"Schwedisch";s:6:"French";s:8:"Suédois";s:6:"Arabic";s:16:"اÙ?سÙ?Ù?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:12:"Å védÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"ΣοÏ?ηδικη";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"ruotsi";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"ש×?×?×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"svéd";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Svedese";s:8:"Japanese";s:21:"ã?¹ã?¦ã?§ã?¼ã??ã?³èª?";s:6:"Korean";s:12:"ì?¤ì?¨ë?´ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:6:"Zweeds";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:8:"szwedzki";s:20:
 "Portuguese, Portugal";s:5:"Sueco";s:18:"Portuguese, Brazil";s:5:"Sueco";s:7:"Quechua";s:0:"";s:8:"Romanian";s:8:"SuedezÄ?";s:7:"Russian";s:16:"ШведÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:7:"Svenska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"สวีà¹?à¸?à¸?";s:7:"Turkish";s:10:"Ä°sveççe";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"ç??å?¸è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"ç??å?¸èª?";}}s:5:"Tamil";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:5:"Tamil";s:7:"Spanish";s:5:"Tamil";s:6:"German";s:5:"Tamil";s:6:"French";s:6:"Tamoul";s:6:"Arabic";s:18:"اÙ?تاÙ?Ù?Ù?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"TamilÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:10:"Ταμιλ";s:9:"Esperanto";s:0:"";s:8:"Estonian
 ";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"tamili";s:5:"Irish";s:0:"";s:6:"Hebrew";s:5:"Tamil";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:5:"tamil";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Tamil";s:8:"Japanese";s:12:"ã?¿ã??ã?«èª?";s:6:"Korean";s:9:"í??ë°?ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:5:"Tamil";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:8:"tamilski";s:20:"Portuguese, Portugal";s:5:"Tamil";s:18:"Portuguese, Brazil";s:5:"Tamil";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"TamilÄ?";s:7:"Russian";s:20:"ТамилÑ?Ñ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:5:"Tamil";s:5:"Tamil";s:0:"";s:4:"Thai";s:12:"à¸?มิฬ";s:7:
 "Turkish";s:10:"Tamil dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"æ³°ç±³å°?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"æ³°ç±³ç?¾èª?";}}s:4:"Thai";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:4:"Thai";s:7:"Spanish";s:10:"Tailandés";s:6:"German";s:4:"Thai";s:6:"French";s:5:"Thaï";s:6:"Arabic";s:20:"اÙ?تاÙ?Ù?Ù?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"ThajÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:4:"Thai";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:4:"thai";s:5:"Irish";s:0:"";s:6:"Hebrew";s:4:"Thai";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:10:"tájföldi";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:4:"Thai";s:8:"Japanese";s:9:"ã?¿ã?¤èª?";s:6:"Korean"
 ;s:9:"í??êµ­ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:4:"Thai";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:6:"tajski";s:20:"Portuguese, Portugal";s:10:"Tailandês";s:18:"Portuguese, Brazil";s:10:"Tailandês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:11:"TailandezÄ?";s:7:"Russian";s:14:"ТайÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:12:"Thailändska";s:5:"Tamil";s:0:"";s:4:"Thai";s:9:"à¹?à¸?ย";s:7:"Turkish";s:5:"Tayca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:6:"泰语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:6:"æ³°èª?";}}s:7:"Turkish";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Turkish";s:7:"Spanish
 ";s:5:"Turco";s:6:"German";s:9:"Türkisch";s:6:"French";s:4:"Turc";s:6:"Arabic";s:14:"اÙ?ترÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"TureÄ?tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"ΤοÏ?Ï?κικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:6:"turkki";s:5:"Irish";s:0:"";s:6:"Hebrew";s:12:"ת×?ר×?×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"török";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:5:"Turco";s:8:"Japanese";s:12:"ã??ã?«ã?³èª?";s:6:"Korean";s:12:"í?°ì?´í?¤ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:5:"Turks";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:7:"ture
 cki";s:20:"Portuguese, Portugal";s:5:"Turco";s:18:"Portuguese, Brazil";s:5:"Turco";s:7:"Quechua";s:0:"";s:8:"Romanian";s:6:"TurcÄ?";s:7:"Russian";s:16:"ТÑ?Ñ?еÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Turkiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"à¸?ุรà¸?ี";s:7:"Turkish";s:8:"Türkçe";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"å??è?³å?¶è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"å??è?³å?¶èª?";}}s:9:"Ukrainian";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:9:"Ukrainian";s:7:"Spanish";s:9:"Ucraniano";s:6:"German";s:10:"Ukrainisch";s:6:"French";s:9:"Ukrainien";s:6:"Arabic";s:20:"اÙ?Ø£Ù?Ù?راÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:12:"UkrajinÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:18:"Î?Ï?κÏ?αν
 ικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"ukraina";s:5:"Irish";s:0:"";s:6:"Hebrew";s:9:"Ukrainian";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"ukrán";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Ucraino";s:8:"Japanese";s:18:"ã?¦ã?¯ã?©ã?¤ã??èª?";s:6:"Korean";s:18:"ì?°í?¬ë?¼ì?´ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:10:"Oekraïens";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"ukraiÅ?ski";s:20:"Portuguese, Portugal";s:9:"Ucraniano";s:18:"Portuguese, Brazil";s:9:"Ucraniano";s:7:"Quechua";s:0:"";s:8:"Romanian";s:11:"UcrainianÄ?";s:7:"Russian";s:20:"УкÑ?аинÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbia
 n";s:0:"";s:7:"Swedish";s:9:"Ukrainska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"ยูà¹?à¸?รà¸?";s:7:"Turkish";s:9:"Ukraynaca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"ä¹?å??å?°è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"ç??å??è?­èª?";}}s:4:"Urdu";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:4:"Urdu";s:7:"Spanish";s:4:"Urdu";s:6:"German";s:4:"Urdu";s:6:"French";s:5:"Ourdu";s:6:"Arabic";s:14:"اÙ?أردÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:9:"UrdÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:14:"Î?Ï?Ï?νÏ?οÏ?";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:4:"urdu";s:5:"Irish";s:0:"";s:6:"Hebrew";s:4:"Urdu";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:4:"urdu";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:
 "Icelandic";s:0:"";s:7:"Italian";s:4:"Urdu";s:8:"Japanese";s:18:"ã?¦ã?«ã??ã?¥ã?¼èª?";s:6:"Korean";s:12:"ì?°ë¥´ë??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:4:"Urdu";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:4:"urdu";s:20:"Portuguese, Portugal";s:4:"Urdu";s:18:"Portuguese, Brazil";s:4:"Urdu";s:7:"Quechua";s:0:"";s:8:"Romanian";s:4:"Urdu";s:7:"Russian";s:8:"УÑ?дÑ?";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:4:"Urdu";s:5:"Tamil";s:0:"";s:4:"Thai";s:15:"อุรà¸?ู";s:7:"Turkish";s:6:"Urduca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"ä¹?å°?é?½è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"ç??ç?¾é?½èª?";}}s:5:"Uz
 bek";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:5:"Uzbek";s:7:"Spanish";s:6:"Uzbeko";s:6:"German";s:9:"Usbekisch";s:6:"French";s:6:"Ouzbek";s:6:"Arabic";s:20:"اÙ?اÙ?زباÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"UzbekÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:20:"Î?Ï?ζμÏ?εκικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"uzbekki";s:5:"Irish";s:0:"";s:6:"Hebrew";s:5:"Uzbek";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:7:"üzbég";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:6:"Uzbeco";s:8:"Japanese";s:15:"ã?¦ã?ºã??ã?¯èª?";s:6:"Korean";s:15:"ì?°ì¦?ë² í?¬ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Du
 tch";s:8:"Oezbeeks";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:7:"uzbecki";s:20:"Portuguese, Portugal";s:7:"Uzbeque";s:18:"Portuguese, Brazil";s:7:"Uzbeque";s:7:"Quechua";s:0:"";s:8:"Romanian";s:7:"UzbecÄ?";s:7:"Russian";s:18:"УзбекÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:9:"Uzbekiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"อุà¸?à¹?à¸?à¸?";s:7:"Turkish";s:9:"Ã?zbekçe";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:15:"ä¹?å?¹å?«å??语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:15:"ç??è?²å?¥å??èª?";}}s:10:"Vietnamese";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:10:"Vietnamese";s:7:"Spanish";s:11:"Vietnamita ";s:6:"German";s:13:"Vietnamesisch";s:6:"French";s:10:"Vietnamien";s:6:"Arabic";s:20:"اÙ?Ù?Ù?تÙ?اÙ?Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0
 :"";s:5:"Czech";s:0:"";s:6:"Slavic";s:12:"VietnamÄ?ina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:24:"Î?ιεÏ?ναμεζικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:7:"vietnam";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"Vietnamese";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:9:"vietnámi";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:10:"Vietnamita";s:8:"Japanese";s:15:"ã??ã??ã??ã? èª?";s:6:"Korean";s:12:"ë² í?¸ë?¨ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:10:"Vietnamees";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:10:"wietnamski";s:20:"Portuguese, Portugal";s:10:"Vietnamita";s:18:"Portuguese, Brazil";s:10:"Vietnamita";s:7:"Quechua";s:0:"";s:8:"Romanian";s:
 11:"VietnamezÄ?";s:7:"Russian";s:22:"Ð?Ñ?еÑ?намÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:13:"Vietnamesiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:24:"à¹?วียà¸?à¸?าม";s:7:"Turkish";s:9:"Vietnamca";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"è¶?å??语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"è¶?å??èª?";}}s:7:"Yiddish";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:7:"Yiddish";s:7:"Spanish";s:5:"Yidis";s:6:"German";s:8:"Jiddisch";s:6:"French";s:7:"Yiddish";s:6:"Arabic";s:16:"اÙ?Ù?دÙ?Ø´Ù?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:6:"JidiÅ¡";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:12:"Î?ινÏ?ιÏ?";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"jiddi";s:5:"Irish"
 ;s:0:"";s:6:"Hebrew";s:10:"×?×?×?×?ש";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:6:"jiddis";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:7:"Yiddish";s:8:"Japanese";s:21:"ã?¤ã??ã?£ã??ã?·ã?¥èª?";s:6:"Korean";s:12:"ì?´ë??ì??ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:8:"Jiddisch";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:6:"jidysz";s:20:"Portuguese, Portugal";s:7:"Yiddish";s:18:"Portuguese, Brazil";s:7:"Yiddish";s:7:"Quechua";s:0:"";s:8:"Romanian";s:5:"IdiÅ?";s:7:"Russian";s:8:"Ð?диÑ?";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:8:"Jiddisch";s:5:"Tamil";s:0:"";s:4:"Thai";s:18:"ยิà¸?à¸?ิà¸?";s:7:"Turkish";s:14:"Eski Ä°branice";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s
 :0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"ä¾?å?°è¯­";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"ä¾?å?°èª?";}}s:20:"Chinese (Simplified)";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:20:"Chinese (Simplified)";s:7:"Spanish";s:18:"Chino simplificado";s:6:"German";s:24:"Vereinfachtes Chinesisch";s:6:"French";s:18:"Chinois simplifié";s:6:"Arabic";s:29:"اÙ?صÙ?Ù?Ù?Ø© اÙ?Ù?بسطة";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:26:"ZjednoduÅ¡ená Ä?ínÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?ινεζικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:5:"kiina";s:5:"Irish";s:0:"";s:6:"Hebrew";s:10:"ס×?× ×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:23:"egyszerűsített kínai";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7
 :"Italian";s:19:"Cinese semplificato";s:8:"Japanese";s:15:"ç°¡ä½?中å?½èª?";s:6:"Korean";s:16:"ì¤?êµ­ì?´ ê°?ì²´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:21:"Vereenvoudigd Chinees";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:20:"chiÅ?ski uproszczony";s:20:"Portuguese, Portugal";s:7:"Chinês";s:18:"Portuguese, Brazil";s:7:"Chinês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:21:"Chineza simplificatÄ?";s:7:"Russian";s:39:"УпÑ?оÑ?еннÑ?й киÑ?айÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:20:"Förenklad kinesiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:33:"à¸?ีà¸?à¸?ระยุà¸?à¸?à¹?";s:7:"Turkish";s:13:"Modern Ã?ince";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:
 0:"";s:20:"Chinese (Simplified)";s:12:"ç®?ä½?中æ??";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"ç°¡é«?中æ??";}}s:4:"Zulu";a:2:{s:5:"major";i:0;s:2:"tr";a:63:{s:7:"English";s:4:"Zulu";s:7:"Spanish";s:5:"Zulú";s:6:"German";s:4:"Zulu";s:6:"French";s:6:"Zoulou";s:6:"Arabic";s:12:"اÙ?زÙ?Ù?Ù?";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:10:"Jazyk Zulu";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:12:"Î?οÏ?λοÏ?";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:4:"zulu";s:5:"Irish";s:0:"";s:6:"Hebrew";s:4:"Zulu";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:4:"zulu";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:4:"Zulu";s:8:"Japanese";s:15:"ã?ºã?¼ã?«ã?¼èª?";s:6:"Korean";s:9:"ì¤?루ì?´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"
 Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:4:"Zulu";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s:0:"";s:6:"Polish";s:7:"zuluski";s:20:"Portuguese, Portugal";s:4:"Zulu";s:18:"Portuguese, Brazil";s:4:"Zulu";s:7:"Quechua";s:0:"";s:8:"Romanian";s:4:"Zulu";s:7:"Russian";s:8:"Ð?Ñ?лÑ?";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:4:"Zulu";s:5:"Tamil";s:0:"";s:4:"Thai";s:12:"à¸?ูลู";s:7:"Turkish";s:9:"Zulu dili";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:9:"ç¥?é²?语";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:9:"ç¥?é­¯èª?";}}s:21:"Chinese (Traditional)";a:2:{s:5:"major";i:1;s:2:"tr";a:63:{s:7:"English";s:21:"Chinese (Traditional)";s:7:"Spanish";s:17:"Chino tradicional";s:6:"German";s:25:"Traditionelles Chinesisch";s:6:"French";s:20:"Chinois traditionnel";s:6:"Arabic"
 ;s:33:"اÙ?صÙ?Ù?Ù?Ø© اÙ?تÙ?Ù?Ù?دÙ?Ø©";s:7:"Bosnian";s:0:"";s:9:"Bulgarian";s:0:"";s:7:"Catalan";s:0:"";s:5:"Czech";s:0:"";s:6:"Slavic";s:22:"TradiÄ?ná Ä?ínÅ¡tina";s:5:"Welsh";s:0:"";s:6:"Danish";s:0:"";s:5:"Greek";s:16:"Î?ινεζικα";s:9:"Esperanto";s:0:"";s:8:"Estonian";s:0:"";s:6:"Basque";s:0:"";s:7:"Persian";s:0:"";s:7:"Finnish";s:17:"perinteinen kiina";s:5:"Irish";s:0:"";s:6:"Hebrew";s:25:"ס×?× ×?ת ×?ס×?רת×?ת";s:5:"Hindi";s:0:"";s:8:"Croatian";s:0:"";s:9:"Hungarian";s:19:"hagyományos kínai";s:8:"Armenian";s:0:"";s:10:"Indonesian";s:0:"";s:9:"Icelandic";s:0:"";s:7:"Italian";s:19:"Cinese tradizionale";s:8:"Japanese";s:15:"ç¹?ä½?中å?½èª?";s:6:"Korean";s:16:"ì¤?êµ­ì?´ ë²?ì²´";s:7:"Kurdish";s:0:"";s:5:"Latin";s:0:"";s:7:"Latvian";s:0:"";s:10:"Lithuanian";s:0:"";s:10:"Macedonian";s:0:"";s:7:"Maltese";s:0:"";s:9:"Moldavian";s:0:"";s:9:"Mongolian";s:0:"";s:6:"Nepali";s:0:"";s:5:"Dutch";s:20:"Traditioneel Chinees";s:17:"Norwegian BokmÃ¥l";s:0:"";s:7:"Punjabi";s
 :0:"";s:6:"Polish";s:19:"chiÅ?ski tradycyjny";s:20:"Portuguese, Portugal";s:7:"Chinês";s:18:"Portuguese, Brazil";s:7:"Chinês";s:7:"Quechua";s:0:"";s:8:"Romanian";s:22:"Chineza tradiÅ£ionalÄ?";s:7:"Russian";s:43:"ТÑ?адиÑ?ионнÑ?й киÑ?айÑ?кий";s:9:"Slovenian";s:0:"";s:6:"Somali";s:0:"";s:8:"Albanian";s:0:"";s:7:"Serbian";s:0:"";s:7:"Swedish";s:22:"Traditionell kinesiska";s:5:"Tamil";s:0:"";s:4:"Thai";s:33:"à¸?ีà¸?à¸?ัà¹?à¸?à¹?à¸?ิม";s:7:"Turkish";s:13:"Klasik Ã?ince";s:9:"Ukrainian";s:0:"";s:4:"Urdu";s:0:"";s:5:"Uzbek";s:0:"";s:10:"Vietnamese";s:0:"";s:7:"Yiddish";s:0:"";s:20:"Chinese (Simplified)";s:12:"ç¹?ä½?中æ??";s:4:"Zulu";s:0:"";s:21:"Chinese (Traditional)";s:12:"ç¹?é«?中æ??";}}}'; ?>
\ No newline at end of file
diff --git a/wp-content/plugins/sitepress-multilingual-cms/screenshot-1.jpg b/wp-content/plugins/sitepress-multilingual-cms/screenshot-1.jpg
new file mode 100644
index 0000000..0d7db5e
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/screenshot-1.jpg differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/screenshot-2.jpg b/wp-content/plugins/sitepress-multilingual-cms/screenshot-2.jpg
new file mode 100644
index 0000000..f044bee
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/screenshot-2.jpg differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/screenshot-3.jpg b/wp-content/plugins/sitepress-multilingual-cms/screenshot-3.jpg
new file mode 100644
index 0000000..265266b
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/screenshot-3.jpg differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/screenshot-4.jpg b/wp-content/plugins/sitepress-multilingual-cms/screenshot-4.jpg
new file mode 100644
index 0000000..a01c3a5
Binary files /dev/null and b/wp-content/plugins/sitepress-multilingual-cms/screenshot-4.jpg differ
diff --git a/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php b/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php
new file mode 100644
index 0000000..1798df1
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php
@@ -0,0 +1,5252 @@
+<?php   
+class SitePress{
+   
+    private $settings;
+    private $active_languages = array();
+    private $this_lang;
+    private $wp_query;
+    private $admin_language = null;
+    
+    function __construct(){
+        global $wpdb;
+                                         
+        $this->settings = get_option('icl_sitepress_settings');                                
+        
+        if(false != $this->settings){
+            $this->verify_settings();
+        } 
+
+        if(isset($_GET['icl_action'])){
+            require_once ABSPATH . WPINC . '/pluggable.php';
+            if($_GET['icl_action']=='advanced' && wp_create_nonce('icl_enable_advanced_mode')==$_GET['nonce']){
+                $this->enable_advanced_mode();
+            }
+            elseif($_GET['icl_action']=='basic' && wp_create_nonce('icl_enable_basic_mode')==$_GET['nonce']){
+                $this->enable_basic_mode();
+            }                                              
+            elseif($_GET['icl_action']=='reminder_popup'){
+                add_action('init', array($this, 'reminders_popup'));
+            }            
+            elseif($_GET['icl_action']=='dismiss_help'){
+                $this->settings['dont_show_help_admin_notice'] = true;
+                $this->save_settings();                
+            }elseif($_GET['icl_action']=='dbdump'){
+                include_once ICL_PLUGIN_PATH . '/inc/functions-troubleshooting.php';
+                icl_troubleshooting_dumpdb();
+                exit;
+            }                        
+        }
+        
+        if(isset($_REQUEST['icl_ajx_action'])){
+            add_action('init', array($this, 'ajax_setup'));
+        }
+        
+        add_action('plugins_loaded', array($this,'init'), 1);
+        add_action('plugins_loaded', array($this,'initialize_cache'), 0);
+                
+        // Administration menus
+        add_action('admin_menu', array($this, 'administration_menu'));
+        
+        // Process post requests
+        if(!empty($_POST)){
+            add_action('init', array($this,'process_forms'));           
+        }        
+        
+        if($this->settings['existing_content_language_verified']){
+            
+            // Post/page language box
+            add_action('admin_head', array($this,'post_edit_language_options'));        
+            
+            // Post/page save actions
+            add_action('save_post', array($this,'save_post_actions')); 
+                   
+            // Post/page delete actions
+            add_action('delete_post', array($this,'delete_post_actions'));        
+            add_action('trash_post', array($this,'trash_post_actions'));        
+            add_action('untrashed_post', array($this,'untrashed_post_actions'));        
+            
+            add_filter('posts_join', array($this,'posts_join_filter'));
+            add_filter('posts_where', array($this,'posts_where_filter'));
+            add_filter('comment_feed_join', array($this,'comment_feed_join'));
+            
+            // show untranslated posts
+            if(!is_admin() && $this->settings['show_untranslated_blog_posts'] && $this->get_current_language() != $this->get_default_language()){
+                add_filter('the_posts', array($this, 'the_posts'));
+            }
+            
+            $this->queries = array();
+            
+            global $pagenow;
+            /* preWP3 compatibility  - start */
+            if(ICL_PRE_WP3){
+                if($pagenow == 'edit.php'){
+                    add_action('restrict_manage_posts', array($this,'language_filter'));                            
+                }elseif($pagenow == 'edit-pages.php'){
+                    add_action('admin_footer', array($this,'language_filter'));
+                }
+            }else{
+            /* preWP3 compatibility  - end */
+                if($pagenow == 'edit.php'){                
+                    add_action('admin_footer', array($this,'language_filter'));
+                    //add_action('restrict_manage_posts', array($this,'language_filter'));
+                }
+            }
+            
+            
+            //add_filter('wp_list_pages_excludes', array($this, 'exclude_other_language_pages'));
+            add_filter('get_pages', array($this, 'exclude_other_language_pages2'));
+            add_filter('wp_dropdown_pages', array($this, 'wp_dropdown_pages'));
+            
+            
+
+            // posts and pages links filters            
+            add_filter('post_link', array($this, 'permalink_filter'),1,2);   
+            add_filter('post_type_link', array($this, 'permalink_filter'),1,2);   
+            add_filter('page_link', array($this, 'permalink_filter'),1,2);   
+            add_filter('category_link', array($this, 'category_permalink_filter'),1,2);   
+            add_filter('tag_link', array($this, 'tax_permalink_filter'),1,2);               
+            add_filter('term_link', array($this, 'tax_permalink_filter'),1,2);               
+            
+            add_filter('get_comment_link', array($this, 'get_comment_link_filter'));
+                        
+            add_action('create_term',  array($this, 'create_term'),1, 2);
+            add_action('edit_term',  array($this, 'create_term'),1, 2);
+            add_action('delete_term',  array($this, 'delete_term'),1,3);       
+            // filters terms by language
+            add_filter('list_terms_exclusions', array($this, 'exclude_other_terms'),1,2);         
+            
+            // allow adding terms with the same name in different languages
+            add_filter("pre_term_name", array($this, 'pre_term_name'), 1, 2); 
+            // allow adding categories with the same name in different languages
+            add_action('admin_init', array($this, 'pre_save_category'));
+            
+            // category language selection        
+            // add_action('edit_category',  array($this, 'create_term'),1, 2);        
+            
+            /* preWP3 compatibility  - start */
+            if(ICL_PRE_WP3 && $pagenow == 'categories.php'){
+                add_action('admin_print_scripts-categories.php', array($this,'js_scripts_categories'));
+                add_action('edit_category_form', array($this, 'edit_term_form'));
+                add_action('admin_footer', array($this,'terms_language_filter'));
+            } 
+            /* preWP3 compatibility  - end */            
+                        
+            // tags language selection
+            if($pagenow == 'edit-tags.php'){                
+                $taxonomy = isset($_GET['taxonomy']) ? $wpdb->escape($_GET['taxonomy']) : 'post_tag';
+                if($this->is_translated_taxonomy($taxonomy)){
+                    add_action('admin_print_scripts-edit-tags.php', array($this,'js_scripts_tags'));   
+                    if($taxonomy == 'category'){                    
+                        add_action('edit_category_form', array($this, 'edit_term_form'));
+                    }else{
+                        add_action('add_tag_form', array($this, 'edit_term_form'));
+                        add_action('edit_tag_form', array($this, 'edit_term_form'));                    
+                    }                
+                    add_action('admin_footer', array($this,'terms_language_filter'));                
+                    add_filter('wp_dropdown_cats', array($this, 'wp_dropdown_cats_select_parent'));
+                }
+            }
+            
+            // custom hook for adding the language selector to the template
+            add_action('icl_language_selector', array($this, 'language_selector'));
+            
+            // front end js
+            add_action('wp_head', array($this, 'front_end_js'));            
+            
+            add_action('restrict_manage_posts', array($this, 'restrict_manage_posts'));
+            
+            /* preWP3 compatibility  - start */
+            if(ICL_PRE_WP3){            
+                add_action('admin_print_scripts-edit-pages.php', array($this,'restrict_manage_pages'));
+            }
+            /* preWP3 compatibility  - endif */
+            
+            add_filter('get_edit_post_link', array($this, 'get_edit_post_link'), 1, 3);
+        
+        
+            // short circuit get default category
+            add_filter('pre_option_default_category', array($this, 'pre_option_default_category'));
+            add_filter('update_option_default_category', array($this, 'update_option_default_category'), 1, 2);
+            
+            add_filter('the_category', array($this,'the_category_name_filter'));
+            add_filter('get_terms', array($this,'get_terms_filter'));
+            add_filter('single_cat_title', array($this,'the_category_name_filter'));
+            add_filter('term_links-category', array($this,'the_category_name_filter'));
+            
+            add_filter('term_links-post_tag', array($this,'the_category_name_filter'));
+            add_filter('tags_to_edit', array($this,'the_category_name_filter'));
+            add_filter('single_tag_title', array($this,'the_category_name_filter'));
+            
+            // adiacent posts links
+            add_filter('get_previous_post_join', array($this,'get_adiacent_post_join'));
+            add_filter('get_next_post_join', array($this,'get_adiacent_post_join'));
+            add_filter('get_previous_post_where', array($this,'get_adiacent_post_where'));
+            add_filter('get_next_post_where', array($this,'get_adiacent_post_where'));
+            
+            // feeds links
+            add_filter('feed_link', array($this,'feed_link'));
+            
+            // commenting links
+            add_filter('post_comments_feed_link', array($this,'post_comments_feed_link'));
+            add_filter('trackback_url', array($this,'trackback_url'));
+            add_filter('user_trailingslashit', array($this,'user_trailingslashit'),1, 2);        
+            
+            // date based archives
+            add_filter('year_link', array($this,'archives_link'));
+            add_filter('month_link', array($this,'archives_link'));
+            add_filter('day_link', array($this,'archives_link'));
+            add_filter('getarchives_join', array($this,'getarchives_join'));
+            add_filter('getarchives_where', array($this,'getarchives_where'));
+            add_filter('pre_option_home', array($this,'pre_option_home'));            
+            
+            /* preWP3 compatibility  - start */
+            if(ICL_PRE_WP3){
+            // author template
+                add_filter('author_link', array($this,'convert_url'));            
+            }
+            /* preWP3 compatibility  - end */                        
+            add_filter('author_link', array($this,'author_link'));            
+            
+            add_filter('home_url', array($this, 'home_url'), 1, 4) ;
+                        
+            // language negotiation
+            add_action('query_vars', array($this,'query_vars'));
+            
+            // 
+            add_filter('language_attributes', array($this, 'language_attributes'));
+                        
+            add_action('locale', array($this, 'locale'));
+                                            
+            if(isset($_GET['____icl_validate_domain'])){ echo '<!--'.get_option('home').'-->'; exit; }                        
+            
+            add_filter('pre_option_page_on_front', array($this,'pre_option_page_on_front'));
+            add_filter('pre_option_page_for_posts', array($this,'pre_option_page_for_posts'));
+            
+            add_filter('option_sticky_posts', array($this,'option_sticky_posts'));
+                             
+            add_filter('request', array($this,'request_filter'));
+            
+            add_action('wp_head', array($this,'set_wp_query'));
+            
+            add_action('init', array($this,'plugin_localization'));            
+            
+            add_action('show_user_profile', array($this, 'show_user_options'));
+            add_action('personal_options_update', array($this, 'save_user_options'));
+
+            // column with links to translations (or add translation) - low priority
+            add_action('init', array($this,'configure_custom_column'), 15);            
+            
+
+            // adjust queried categories and tags ids according to the language            
+            if($this->settings['auto_adjust_ids']){
+                add_action('parse_query', array($this, 'parse_query'));            
+                add_action('wp_list_pages_excludes', array($this, 'adjust_wp_list_pages_excludes'));            
+                if(!is_admin()){
+                    add_filter('get_term', array($this,'get_term_adjust_id'), 1, 1);
+                    add_filter('category_link', array($this,'category_link_adjust_id'), 1, 2);
+                    add_filter('get_terms', array($this,'get_terms_adjust_ids'), 1, 3);
+                    add_filter('get_pages', array($this,'get_pages_adjust_ids'), 1, 2);
+                }
+            } 
+            
+            if(!is_admin()){
+                add_action('wp_head', array($this, 'meta_generator_tag'));
+            } 
+            
+            if(!ICL_PRE_WP3){
+                require_once ICL_PLUGIN_PATH . '/inc/wp-nav-menus/iclNavMenu.class.php';
+                $iclNavMenu = new iclNavMenu;
+            }
+            
+            //$iclTranslationManagement = new TranslationManagement;
+                                              
+        } //end if the initial language is set - existing_content_language_verified
+        
+        add_action('wp_dashboard_setup', array($this, 'dashboard_widget_setup'));
+        if(is_admin() && $pagenow == 'index.php' && !$this->settings['basic_menu']){
+            add_action('icl_dashboard_widget_notices', array($this, 'print_translatable_custom_content_status'));    
+        }
+    }
+             
+    function init(){ 
+
+        $this->set_admin_language();
+        //configure callbacks for plugin menu pages
+        if(defined('WP_ADMIN') && isset($_GET['page']) && 0 === strpos($_GET['page'],basename(ICL_PLUGIN_PATH).'/')){
+            add_action('icl_menu_footer', array($this, 'menu_footer'));
+        }
+        if($this->settings['existing_content_language_verified']){
+            if(defined('WP_ADMIN')){
+                if(isset($_GET['lang'])){
+                    $this->this_lang = rtrim($_GET['lang'],'/');             
+                }else{
+                    $this->this_lang = $this->get_default_language();
+                }                   
+            }else{
+                $al = $this->get_active_languages();
+                foreach($al as $l){
+                    $active_languages[] = $l['code'];
+                }
+                $active_languages[] = 'all';
+                $s = $_SERVER['HTTPS']=='on'?'s':'';
+                $request = 'http' . $s . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
+                $home = get_option('home');
+                $url_parts = parse_url($home);
+                $blog_path = $url_parts['path']?$url_parts['path']:'';            
+                switch($this->settings['language_negotiation_type']){
+                    case 1:
+                        $path  = str_replace($home,'',$request);
+                        $parts = explode('?', $path);
+                        $path = $parts[0];
+                        $exp = explode('/',trim($path,'/'));                                        
+                        if(in_array($exp[0], $active_languages)){
+                            $this->this_lang = $exp[0];
+                            
+                            // before hijiking the SERVER[REQUEST_URI]
+                            // override the canonical_redirect action
+                            // keep a copy of the original request uri
+                            remove_action('template_redirect', 'redirect_canonical');
+                            global $_icl_server_request_uri;
+                            $_icl_server_request_uri = $_SERVER['REQUEST_URI'];
+                            add_action('template_redirect', 'icl_redirect_canonical_wrapper', 11);
+                            function icl_redirect_canonical_wrapper(){
+                                global $_icl_server_request_uri, $wp_query;
+                                $requested_url  = ( !empty($_SERVER['HTTPS'] ) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
+                                $requested_url .= $_SERVER['HTTP_HOST'];
+                                $requested_url .= $_icl_server_request_uri;
+                                redirect_canonical($requested_url);
+                                
+                                /*
+                                if($wp_query->query_vars['error'] == '404'){
+                                    $wp_query->is_404 = true;
+                                    $template = get_404_template();
+                                    include($template);
+                                    exit;
+                                }
+                                */
+                                
+                            }
+                            //
+                            
+                            //deal with situations when template files need to be called directly
+                            add_action('template_redirect', array($this, '_allow_calling_template_file_directly'));
+                            
+                            //$_SERVER['REQUEST_URI'] = preg_replace('@^'. $blog_path . '/' . $this->this_lang.'@i', $blog_path ,$_SERVER['REQUEST_URI']);
+                            
+                            // Check for special case of www.example.com/fr where the / is missing on the end
+                            $parts = parse_url($_SERVER['REQUEST_URI']);
+                            if(strlen($parts['path']) == 0){
+                                $_SERVER['REQUEST_URI'] = '/' . $_SERVER['REQUEST_URI'];
+                            }
+                        }else{
+                            $this->this_lang = $this->get_default_language();
+                        }
+                        break;
+                    case 2:    
+                        $exp = explode('.', $_SERVER['HTTP_HOST']);
+                        $__l = array_search('http' . $s . '://' . $_SERVER['HTTP_HOST'] . $blog_path, $this->settings['language_domains']);
+                        $this->this_lang = $__l?$__l:$this->get_default_language(); 
+                        if(defined('ICL_USE_MULTIPLE_DOMAIN_LOGIN') && ICL_USE_MULTIPLE_DOMAIN_LOGIN){
+                            include ICL_PLUGIN_PATH . '/modules/multiple-domains-login.php';
+                        }                        
+                        break;
+                    case 3:
+                    default:
+                        if(isset($_GET['lang'])){
+                            $this->this_lang = preg_replace("/[^0-9a-zA-Z-]/i", '',$_GET['lang']);             
+                        }else{
+                            $this->this_lang = $this->get_default_language();
+                        }                        
+                }
+                // allow forcing the current language when it can't be decoded from the URL
+                $this->this_lang = apply_filters('icl_set_current_language', $this->this_lang);
+            }
+            
+            //reorder active language to put 'this_lang' in front
+            foreach($this->active_languages as $k=>$al){
+                if($al['code']==$this->this_lang){                
+                    unset($this->active_languages[$k]);
+                    $this->active_languages = array_merge(array($k=>$al), $this->active_languages);
+                }
+            }
+            
+            if($this->settings['language_negotiation_type']==3){
+               // fix pagenum links for when using the language as a parameter 
+               add_filter('get_pagenum_link', array($this,'get_pagenum_link_filter'));         
+            }
+            
+            // filter some queries
+            add_filter('query', array($this, 'filter_queries'));                
+                
+            if( $this->settings['language_negotiation_type']==1  && $this->get_current_language()!=$this->get_default_language()){
+                add_filter('option_rewrite_rules', array($this, 'rewrite_rules_filter'));              
+                if(version_compare($GLOBALS['wp_version'], '2.8.4', '<=')){
+                    add_filter('transient_rewrite_rules', array($this, 'rewrite_rules_filter'));              
+                }
+            }            
+                
+            $this->set_language_cookie();  
+        }
+        
+        if(empty($this->settings['dont_show_help_admin_notice'])){
+            if(count($this->get_active_languages()) < 2){
+                add_action('admin_notices', array($this, 'help_admin_notice'));
+            }
+        }
+                
+        $short_v = implode('.', array_slice(explode('.', ICL_SITEPRESS_VERSION), 0, 3));
+        if($this->settings['hide_upgrade_notice'] != $short_v){
+            add_action('admin_notices', array($this, 'upgrade_notice'));
+        }
+        
+        if ($this->icl_account_configured()) {
+            add_action('admin_notices', array($this, 'icl_reminders'));
+        }
+        
+        require ICL_PLUGIN_PATH . '/inc/template-constants.php';        
+        if(defined('WPML_LOAD_API_SUPPORT')){
+            require ICL_PLUGIN_PATH . '/inc/wpml-api.php';
+            
+        } 
+        
+        add_action('wp_footer', array($this, 'display_wpml_footer'),20);
+                
+        if(defined('XMLRPC_REQUEST') && XMLRPC_REQUEST){
+            add_action('xmlrpc_call', array($this, 'xmlrpc_call_actions'));
+            add_filter('xmlrpc_methods',array($this, 'xmlrpc_methods'));
+        }
+        
+        
+    }
+    
+    function ajax_setup(){
+        require ICL_PLUGIN_PATH . '/ajax.php';
+    }
+    
+    function configure_custom_column(){
+        global $pagenow, $wp_post_types;
+        
+        /* preWP3 compatibility  - start */
+        if(ICL_PRE_WP3 && $pagenow == 'edit-pages.php'){
+            $pagenow_ = $pagenow;
+            $_REQUEST['post_type'] = 'page';    
+        } 
+        /* preWP3 compatibility  - end */                    
+        if(($pagenow == 'edit.php' || $pagenow_ == 'edit-pages.php' || ($pagenow == 'admin-ajax.php' && $_POST['action']=='inline-save'))  
+            && !$this->settings['hide_translation_controls_on_posts_lists']){
+            $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : 'post';    
+            switch($post_type){
+                case 'post': case 'page':
+                    add_filter('manage_'.$post_type.'s_columns',array($this,'add_posts_management_column'));                        
+                    add_action('manage_'.$post_type.'s_custom_column',array($this,'add_content_for_posts_management_column'));
+                    break;
+                default:
+                    if($this->settings['custom_posts_sync_option'][$post_type] == 1){
+                        
+                        add_filter('manage_'.$post_type.'_posts_columns',array($this,'add_posts_management_column'));
+                        if($wp_post_types[$post_type]->hierarchical){
+                            add_action('manage_pages_custom_column',array($this,'add_content_for_posts_management_column'));    
+                        }else{
+                            add_action('manage_posts_custom_column',array($this,'add_content_for_posts_management_column'));
+                        }
+                        
+                    }
+            }                                            
+            add_action('admin_print_scripts', array($this, '__set_posts_management_column_width'));
+        }        
+    }
+      
+    function the_posts($posts){        
+        global $wpdb, $wp_query;
+        
+        $db = debug_backtrace();   
+        $custom_wp_query = $db[3]['object'];        
+        
+        //exceptions
+        if( 
+            ($this->get_current_language() == $this->get_default_language())  // original language
+            || ($wp_query != $custom_wp_query)   // called by a custom query
+            || (!$custom_wp_query->is_posts_page && !$custom_wp_query->is_home) // not the blog posts page           
+            || $wp_query->is_singular //is singular
+            || !empty($custom_wp_query->query_vars['category__not_in'])
+            //|| !empty($custom_wp_query->query_vars['category__in'])
+            //|| !empty($custom_wp_query->query_vars['category__and'])
+            || !empty($custom_wp_query->query_vars['tag__not_in'])
+            || !empty($custom_wp_query->query_vars['post__in'])
+            || !empty($custom_wp_query->query_vars['post__not_in'])
+            || !empty($custom_wp_query->query_vars['post_parent'])
+        ){
+            
+            //$wp_query->query_vars = $this->wp_query->query_vars;            
+            return $posts;                
+        }
+        // get the posts in the default language instead        
+        $this_lang = $this->this_lang;
+        $this->this_lang = $this->get_default_language(); 
+               
+        remove_filter('the_posts', array($this, 'the_posts')); 
+
+        $custom_wp_query->query_vars['suppress_filters'] = 0;
+        
+        if(isset($custom_wp_query->query_vars['pagename']) && !empty($custom_wp_query->query_vars['pagename'])){
+            $page_id = $wpdb->get_var("SELECT ID FROM {$wpdb->posts} WHERE post_name='{$custom_wp_query->query_vars['pagename']}' AND post_type='page'");            
+            if($page_id){
+                $tr_page_id = icl_object_id($page_id, 'page', false, $this->get_default_language());
+                if($tr_page_id){
+                    $custom_wp_query->query_vars['pagename'] = $wpdb->get_var("SELECT post_name FROM {$wpdb->posts} WHERE ID={$tr_page_id}");
+                }
+            }                        
+        }
+        
+
+        
+        // look for posts without translations
+        if($posts){
+            foreach($posts as $p){
+                $pids[] = $p->ID;
+            }
+            $trids = $wpdb->get_col("
+                SELECT trid 
+                FROM {$wpdb->prefix}icl_translations 
+                WHERE element_type='post_post' AND element_id IN (".join(',', $pids).") AND language_code = '".$this_lang."'");
+            
+            $posts_not_translated = $wpdb->get_col("
+                SELECT element_id, COUNT(language_code) AS c
+                FROM {$wpdb->prefix}icl_translations
+                WHERE trid IN (".join(',', $trids).") GROUP BY trid HAVING c = 1 
+            ");
+            
+            if($posts_not_translated){
+                    $GLOBALS['__icl_the_posts_posts_not_translated'] = $posts_not_translated;
+                    add_filter('posts_where', array($this, '_posts_untranslated_extra_posts_where'), 99);
+            }
+
+        }  
+        
+        //fix page for posts           
+        unset($custom_wp_query->query_vars['page_id']); unset($custom_wp_query->query_vars['p']);
+        
+        $my_query = new WP_Query($custom_wp_query->query_vars);
+        add_filter('the_posts', array($this, 'the_posts'));
+        $this->this_lang = $this_lang;
+        
+        // create a map of the translated posts        
+        foreach($posts as $post){
+            $trans_posts[$post->ID] = $post;
+        }        
+        
+        // loop original posts
+        foreach($my_query->posts as $k=>$post){ // loop posts in the default language
+            $trid = $this->get_element_trid($post->ID);
+            $translations = $this->get_element_translations($trid); // get translations
+            
+            if(isset($translations[$this->get_current_language()])){ // if there is a translation in the current language
+                if(isset($trans_posts[$translations[$this->get_current_language()]->element_id])){  //check the map of translated posts
+                    $my_query->posts[$k] = $trans_posts[$translations[$this->get_current_language()]->element_id];
+                }else{  // check if the translated post exists in the database still                                                                                                                
+                    $_post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d AND post_status='publish' LIMIT 1", $translations[$this->get_current_language()]->element_id));                    
+                    if(!empty($_post)){
+                        $_post = sanitize_post($_post);
+                        $my_query->posts[$k] = $_post;
+                        
+                    }else{
+                        $my_query->posts[$k]->original_language = true;
+                    }                
+                } 
+            }else{
+                $my_query->posts[$k]->original_language = true;
+            }
+            
+        }
+        
+        if($custom_wp_query == $wp_query){
+            $wp_query->max_num_pages = $my_query->max_num_pages;
+        }        
+        
+        $posts = $my_query->posts;
+        
+        unset($GLOBALS['__icl_the_posts_posts_not_translated']);
+        remove_filter('posts_where', array($this, '_posts_untranslated_extra_posts_where'), 99);
+        
+        return $posts;
+    }
+    
+    function _posts_untranslated_extra_posts_where($where){
+        global $wpdb;
+        $where .= ' OR ' . $wpdb->posts . '.ID IN (' . join(',', $GLOBALS['__icl_the_posts_posts_not_translated']) . ')';
+        return $where;
+    }
+                                              
+    function initialize_cache(){ 
+        require_once ICL_PLUGIN_PATH . '/inc/cache.php';        
+        $this->icl_translations_cache = new icl_cache();
+        $this->icl_locale_cache = new icl_cache('locale', true);
+        $this->icl_flag_cache = new icl_cache('flags', true);
+        $this->icl_language_name_cache = new icl_cache('language_name', true);
+        $this->icl_term_taxonomy_cache = new icl_cache();
+        $this->icl_cms_nav_offsite_url_cache = new icl_cache('cms_nav_offsite_url', true);
+    }
+                        
+    function set_admin_language(){
+        global $wpdb, $current_user;
+        
+        if(is_null($current_user) && function_exists('wp_get_current_user')){
+            $u = wp_get_current_user();
+            if($u->ID > 0){
+                $current_user = $u;
+            }
+        }
+                                   
+        $active_languages = array_keys($wpdb->get_col("SELECT code FROM {$wpdb->prefix}icl_languages WHERE active=1"));   //don't use method get_active_language()
+        
+        $this->admin_language = $this->get_user_admin_language($current_user->data->ID);
+                
+        if($this->admin_language != '' && !in_array($this->admin_language, $active_languages)){
+            delete_usermeta($current_user->data->ID,'icl_admin_language');
+        }        
+        if(!in_array($this->settings['admin_default_language'], $active_languages) || is_null($this->settings['admin_default_language'])){
+            $this->settings['admin_default_language'] = '_default_';
+            $this->save_settings();
+        }
+        
+        if(!$this->admin_language){
+            $this->admin_language = $this->settings['admin_default_language'];
+        }
+        if($this->admin_language == '_default_' && $this->get_default_language()){
+            $this->admin_language = $this->get_default_language();
+        }
+    }
+    
+    function get_admin_language(){
+        return $this->admin_language;
+    }
+      
+    function get_user_admin_language($user_id) {
+        static $lang = null;
+        if ($lang === null) {
+            $lang = get_usermeta($user_id,'icl_admin_language',true);
+        }
+        return $lang;
+    }
+    
+    function administration_menu(){
+        add_action('admin_print_scripts', array($this,'js_scripts_setup'));
+        add_action('admin_print_styles', array($this,'css_setup'));
+        
+        if($this->settings['basic_menu']){        
+            
+            add_menu_page(__('WPML','sitepress'), __('WPML','sitepress'), 'manage_options', basename(ICL_PLUGIN_PATH).'/menu/languages.php',null, ICL_PLUGIN_URL . '/res/img/icon16.png');    
+            add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/languages.php', __('Languages','sitepress'), __('Languages','sitepress'), 
+                        'manage_options', basename(ICL_PLUGIN_PATH).'/menu/languages.php');             
+            if(1 < count($this->get_active_languages())){                        
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/languages.php', __('Professional translation','sitepress'), __('Professional translation','sitepress'), 
+                        'manage_options', basename(ICL_PLUGIN_PATH).'/menu/content-translation.php');                                                     
+            }
+			add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/languages.php', __('Support','sitepress'), __('Support','sitepress'), 'manage_options', basename(ICL_PLUGIN_PATH).'/menu/support.php');
+
+        }else{
+            
+            add_menu_page(__('WPML','sitepress'), __('WPML','sitepress'), 'manage_options', basename(ICL_PLUGIN_PATH).'/menu/overview.php',null, ICL_PLUGIN_URL . '/res/img/icon16.png');              
+            add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Overview','sitepress'), __('Overview','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/overview.php'); 
+            add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Languages','sitepress'), __('Languages','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/languages.php'); 
+            
+            if(1 < count($this->get_active_languages())){                
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Theme and plugins localization','sitepress'), __('Theme and plugins localization','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/theme-localization.php'); 
+                            icl_st_administration_menu();
+            //if(1 < count($this->get_active_languages())){                
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Translation sync','sitepress'), __('Translation sync','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/translation-synchronization.php');                             
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Comments translation','sitepress'), __('Comments translation','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/comments-translation.php'); 
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Professional translation','sitepress'), __('Professional translation','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/content-translation.php');                 
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/content-translation.php', __('Professional translation','sitepress'), __('Professional translation','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/content-translation-how-it-works.php');
+            }
+            
+            if($this->settings['modules']['cms-navigation']['enabled']){
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Navigation','sitepress'), __('Navigation','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/navigation.php'); 
+            }
+            if($this->settings['modules']['absolute-links']['enabled']){
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Sticky links','sitepress'), __('Sticky links','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/absolute-links.php'); 
+            }
+            if($_GET['page'] == basename(ICL_PLUGIN_PATH).'/menu/troubleshooting.php'){
+                add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Troubleshooting','sitepress'), __('Troubleshooting','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/troubleshooting.php'); 
+            }            
+            
+            add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Compatibility packages','sitepress'), __('Compatibility packages','sitepress'), 
+                            'manage_options', basename(ICL_PLUGIN_PATH).'/menu/compatibility-packages.php');             
+            
+			add_submenu_page(basename(ICL_PLUGIN_PATH).'/menu/overview.php', __('Support','sitepress'), __('Support','sitepress'), 'manage_options', basename(ICL_PLUGIN_PATH).'/menu/support.php');
+        }
+    }
+
+    function save_settings($settings=null){
+        if(!is_null($settings)){
+            foreach($settings as $k=>$v){
+                if(is_array($v)){
+                    foreach($v as $k2=>$v2){
+                        $this->settings[$k][$k2] = $v2;
+                    }
+                }else{
+                    $this->settings[$k] = $v;
+                }
+            }        
+        }
+        update_option('icl_sitepress_settings', $this->settings);
+        do_action('icl_save_settings', $settings);
+    }
+
+    function get_settings(){
+        return $this->settings;
+    }    
+    
+    function verify_settings(){
+        
+        $default_settings = array(
+            'basic_menu' => 0,
+            'interview_translators' => 1,
+            'existing_content_language_verified' => 0,
+            'language_negotiation_type' => 3,
+            'icl_lso_header' => 0, 
+            'icl_lso_link_empty' => 0,
+            'icl_lso_flags' => 0,
+            'icl_lso_native_lang' => 1,
+            'icl_lso_display_lang' => 1,
+            'sync_page_ordering' => 1,
+            'sync_page_parent' => 1,
+            'sync_page_template' => 1,
+            'sync_ping_status' => 1,
+            'sync_comment_status' => 1,
+            'sync_sticky_flag' => 1,
+            'sync_private_flag' => 1,
+            'sync_delete' => 0,            
+            'translated_document_status' => 0,
+            'translation_pickup_method' => 0,
+            'notify_complete' => 1,
+            'translated_document_status' => 1,
+            'remote_management' => 0,
+            'auto_adjust_ids' => 1,
+            'alert_delay' => 0,
+            'modules' => array(
+                'absolute-links' => array('enabled'=>0, 'sticky_links_widgets'=>1, 'sticky_links_strings'=>1),
+                'cms-navigation'=>array('enabled'=>0, 'breadcrumbs_separator'=>' &raquo; ')
+                ),
+            'promote_wpml' => 0
+        ); 
+        
+        //congigured for three levels
+        $update_settings = false;
+        foreach($default_settings as $key => $value){
+            if(is_array($value)){
+                foreach($value as $k2 => $v2){
+                    if(is_array($v2)){
+                        foreach($v2 as $k3 => $v3){
+                            if(!isset($this->settings[$key][$k2][$k3])){
+                                $this->settings[$key][$k2][$k3] = $v3;
+                                $update_settings = true;
+                            }                                
+                        }
+                    }else{
+                        if(!isset($this->settings[$key][$k2])){
+                            $this->settings[$key][$k2] = $v2;
+                            $update_settings = true;
+                        }
+                    }
+                }
+            }else{
+                if(!isset($this->settings[$key])){
+                    $this->settings[$key] = $value;
+                    $update_settings = true;
+                }                
+            }
+        }
+        
+        if($update_settings){
+            $this->save_settings();
+        }          
+    }
+
+    function _validate_language_per_directory($language_code){
+        if(!class_exists('WP_Http')) include_once ABSPATH . WPINC . '/class-http.php';
+        $client = new WP_Http();
+        if(false === strpos($_POST['url'],'?')){$url_glue='?';}else{$url_glue='&';}                    
+        $response = $client->request(get_option('home') . '/' . $language_code .'/' . $url_glue . '____icl_validate_domain=1', array('timeout'=>15, 'decompress'=>false));
+        return (!is_wp_error($response) && ($response['response']['code']=='200') && ($response['body'] == '<!--'.get_option('home').'-->'));
+    }
+    
+    function update_icl_more_options() {
+        $iclsettings['translator_choice'] = $_POST['icl_translator_choice'];
+        switch($_POST['icl_translator_choice']) {
+            case '0':
+                $iclsettings['website_kind'] = 2;
+                $iclsettings['interview_translators'] = 1;
+                break;
+                
+            case '1':
+                $iclsettings['website_kind'] = 2;
+                $iclsettings['interview_translators'] = 1;
+                break;
+                
+            default:
+                $iclsettings['website_kind'] = 0;
+                $iclsettings['interview_translators'] = 0;
+                break;
+                
+                
+        }
+
+        $iclsettings['translation_pickup_method'] = $_POST['icl_delivery_method'];        
+        if ($iclsettings['translation_pickup_method'] == 1){
+            add_action('poll_for_translations', 'icl_poll_for_translations');
+            wp_schedule_event(time(), 'hourly', 'poll_for_translations');
+        } else {
+            wp_clear_scheduled_hook('poll_for_translations');            
+        }
+        $iclsettings['translated_document_status'] = $_POST['icl_translated_document_status'];        
+        $iclsettings['alert_delay'] = intval($_POST['icl_alert_delay']);
+        $iclsettings['notify_complete'] = intval($_POST['icl_notify_complete']);
+        $iclsettings['remote_management'] = intval($_POST['icl_remote_management']);
+        $this->save_settings($iclsettings);
+    }
+
+    function save_language_pairs() {    
+        // clear existing languages
+        $lang_pairs = $this->settings['language_pairs'];
+        if (is_array($lang_pairs)) {
+            foreach ($lang_pairs as $from => $to) {
+                $lang_pairs[$from] = array();
+            }
+        }
+        
+        // get the from languages
+        $from_languages = array();
+        foreach($_POST as $k=>$v){
+            if(0 === strpos($k,'icl_lng_from_')){
+                $f = str_replace('icl_lng_from_','',$k);
+                $from_languages[] = $f;
+            }
+        }
+
+        foreach($_POST as $k=>$v){
+            if(0 !== strpos($k,'icl_lng_')) continue;
+            if(0 === strpos($k,'icl_lng_to')){
+                $t = str_replace('icl_lng_to_','',$k);
+                $exp = explode('_',$t);
+                if (in_array($exp[0], $from_languages)){
+                    $lang_pairs[$exp[0]][$exp[1]] = 1;
+                }
+            }
+        }
+
+        $iclsettings['language_pairs'] = $lang_pairs; 
+        $this->save_settings($iclsettings);
+    }
+    
+    function get_active_languages($refresh = false){
+        global $wpdb;   
+        
+        if($refresh || !$this->active_languages){
+            if(defined('WP_ADMIN') && $this->admin_language){
+                $in_language = $this->admin_language;
+            }else{
+                $in_language = $this->get_current_language()?$this->get_current_language():$this->get_default_language();    
+            }  
+            if (isset($this->icl_language_name_cache)) {
+                $res = $this->icl_language_name_cache->get('in_language_'.$in_language);
+            } else {
+                $res = null;
+            }
+            
+            if (!$res) { 
+                $res = $wpdb->get_results("
+                    SELECT l.id, code, english_name, active, lt.name AS display_name 
+                    FROM {$wpdb->prefix}icl_languages l
+                        JOIN {$wpdb->prefix}icl_languages_translations lt ON l.code=lt.language_code           
+                    WHERE 
+                        active=1 AND lt.display_language_code = '{$in_language}'
+                    ORDER BY major DESC, english_name ASC", ARRAY_A);
+                if (isset($this->icl_language_name_cache)) {
+                    $this->icl_language_name_cache->set('in_language_'.$in_language, $res);
+                }
+            }
+            
+            $languages = array();
+            if($res){
+                foreach($res as $r){
+                    $languages[$r['code']] = $r;
+                }        
+            } 
+            
+            if (isset($this->icl_language_name_cache)) {
+                $res = $this->icl_language_name_cache->get('languages_'.$languages);
+            } else {
+                $res = null;
+            }
+            if (!$res) {
+            
+                $res = $wpdb->get_results("
+                    SELECT language_code, name 
+                    FROM {$wpdb->prefix}icl_languages_translations
+                    WHERE language_code IN ('".join("','",array_keys($languages))."') AND language_code = display_language_code
+                "); 
+                if (isset($this->icl_language_name_cache)) {
+                    $this->icl_language_name_cache->set('languages_'.$languages, $res);
+                }
+            }
+                            
+            foreach($res as $row){
+                $languages[$row->language_code]['native_name'] = $row->name;     
+            }
+            
+            $this->active_languages = $languages;           
+        }
+        
+        // hide languages for front end
+        global $current_user;        
+        if(!is_admin() && !empty($this->settings['hidden_languages']) 
+            && is_array($this->settings['hidden_languages']) && !get_usermeta($current_user->data->ID, 'icl_show_hidden_languages')){
+            foreach($this->settings['hidden_languages'] as $l){
+                unset($this->active_languages[$l]);
+            }
+        }
+        return $this->active_languages;
+    }
+    
+    function set_active_languages($arr){
+        global $wpdb;
+        if(!empty($arr)){
+            foreach($arr as $code){
+                $tmp[] = mysql_real_escape_string(trim($code));
+            }
+            
+            // set the locale
+            $current_active_languages = (array)$wpdb->get_col("SELECT code FROM {$wpdb->prefix}icl_languages WHERE active = 1");
+            $new_languages = array_diff($tmp, $current_active_languages);
+
+            if(!empty($new_languages)){
+                foreach($new_languages as $code){                    
+                    $default_locale = $wpdb->get_var("SELECT default_locale FROM {$wpdb->prefix}icl_languages WHERE code='{$code}'");
+                    if($default_locale){
+                        if($wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_locale_map WHERE code='{$code}'")){
+                            $wpdb->update($wpdb->prefix.'icl_locale_map', array('locale'=>$default_locale), array('code'=>$code));
+                        }else{
+                            $wpdb->insert($wpdb->prefix.'icl_locale_map', array('code'=>$code, 'locale'=>$default_locale));
+                        }
+                    }                
+                }
+            }
+            
+            $codes = '(\'' . join('\',\'',$tmp) . '\')';
+            $wpdb->update($wpdb->prefix.'icl_languages', array('active'=>0), array('active'=>'1'));
+            $wpdb->query("UPDATE {$wpdb->prefix}icl_languages SET active=1 WHERE code IN {$codes}");
+            $this->icl_language_name_cache->clear();
+        }
+        
+        $res = $wpdb->get_results("
+            SELECT code, english_name, active, lt.name AS display_name 
+            FROM {$wpdb->prefix}icl_languages l
+                JOIN {$wpdb->prefix}icl_languages_translations lt ON l.code=lt.language_code           
+            WHERE 
+                active=1 AND lt.display_language_code = '{$this->get_default_language()}' 
+            ORDER BY major DESC, english_name ASC", ARRAY_A);        
+        $languages = array();
+        foreach($res as $r){
+            $languages[] = $r;
+        }        
+        $this->active_languages = $languages; 
+        
+        return true;
+    }
+    
+    function get_languages($lang=false){
+        global $wpdb;
+        if(!$lang){
+            $lang = $this->get_default_language();
+        }                                           
+        $res = $wpdb->get_results("
+            SELECT 
+                code, english_name, major, active, default_locale, lt.name AS display_name   
+            FROM {$wpdb->prefix}icl_languages l
+                JOIN {$wpdb->prefix}icl_languages_translations lt ON l.code=lt.language_code           
+            WHERE lt.display_language_code = '{$lang}' 
+            ORDER BY major DESC, english_name ASC", ARRAY_A);
+        $languages = array();
+        foreach((array)$res as $r){
+            $languages[] = $r;
+        }
+        return $languages;
+    }
+    
+    function get_language_details($code){
+        global $wpdb;
+        if(defined('WP_ADMIN')){
+            $dcode = $this->admin_language;
+        }else{
+            $dcode = $code;
+        }
+        if (isset($this->icl_language_name_cache)){
+            $details = $this->icl_language_name_cache->get('language_details_'.$code.$dcode);
+        } else {
+            $details = null;
+        }
+        if (!$details){
+            $details = $wpdb->get_row("
+                SELECT 
+                    code, english_name, major, active, lt.name AS display_name   
+                FROM {$wpdb->prefix}icl_languages l
+                    JOIN {$wpdb->prefix}icl_languages_translations lt ON l.code=lt.language_code           
+                WHERE lt.display_language_code = '{$dcode}' AND code='{$code}'
+                ORDER BY major DESC, english_name ASC", ARRAY_A);
+            if (isset($this->icl_language_name_cache)){
+                $this->icl_language_name_cache->set('language_details_'.$code.$dcode, $details);
+            }
+        }
+        
+        return $details;
+    }
+
+    function get_language_code($english_name){
+        global $wpdb;
+        $code = $wpdb->get_row("
+            SELECT 
+                code
+            FROM {$wpdb->prefix}icl_languages
+            WHERE english_name = '{$english_name}'", ARRAY_A);
+        return $code['code'];
+    }
+
+    function get_icl_translator_status(&$iclsettings, $res = NULL){
+        
+        if ($res == NULL) {
+            // check what languages we have translators for.
+            require_once ICL_PLUGIN_PATH . '/lib/Snoopy.class.php';
+            require_once ICL_PLUGIN_PATH . '/lib/xml2array.php';
+            require_once ICL_PLUGIN_PATH . '/lib/icl_api.php';
+            
+            if ($iclsettings['site_id'] == NULL) {
+                // Must be for support
+                $icl_query = new ICanLocalizeQuery($iclsettings['support_site_id'], $iclsettings['support_access_key']);
+            } else {
+                $icl_query = new ICanLocalizeQuery($iclsettings['site_id'], $iclsettings['access_key']);
+            }
+            $res = $icl_query->get_website_details();
+            
+        }
+        
+        if(isset($res['translation_languages']['translation_language'])){
+                
+            // reset $this->settings['icl_lang_status']
+            $iclsettings['icl_lang_status'] = array();
+            
+            $translation_languages = $res['translation_languages']['translation_language'];
+            if(!isset($translation_languages[0])){
+                $buf = $translation_languages;
+                $translation_languages = array(0 => $buf);
+            }
+            foreach($translation_languages as $lang){
+                $translators = $_tr = array();
+                $max_rate = false;     
+                if(isset($lang['translators']) && !empty($lang['translators'])){
+                    if(!isset($lang['translators']['translator'][0])){
+                        $_tr[0] = $lang['translators']['translator'];
+                    }else{
+                        $_tr = $lang['translators']['translator'];
+                    }                                   
+                    foreach($_tr as $t){
+                        if($max_rate === false || $t['attr']['amount'] > $max_rate){
+                            $max_rate = $t['attr']['amount'];
+                        }
+                        $translators[] = array('id'=>$t['attr']['id'], 'nickname'=>$t['attr']['nickname'], 'contract_id' => $t['attr']['contract_id']);
+                    }                    
+                }                
+                $target[] = array(
+                    'from' => $this->get_language_code(apply_filters('icl_server_languages_map', $lang['attr']['from_language_name'], true)),
+                    'to' => $this->get_language_code(apply_filters('icl_server_languages_map', $lang['attr']['to_language_name'], true)),
+                    'have_translators' => $lang['attr']['have_translators'],
+                    'available_translators' => $lang['attr']['available_translators'],
+                    'applications' => $lang['attr']['applications'],
+                    'contract_id' => $lang['attr']['contract_id'],
+                    'id' => $lang['attr']['id'],
+                    'translators' => $translators,
+                    'max_rate' => $max_rate
+                );
+            }
+            $iclsettings['icl_lang_status'] = $target;
+        }
+        
+        if(isset($res['client']['attr'])){
+            $iclsettings['icl_balance'] = $res['client']['attr']['balance'];
+            $iclsettings['icl_anonymous_user'] = $res['client']['attr']['anon'];
+        }
+        if(isset($res['html_status']['value'])){
+            $iclsettings['icl_html_status'] = html_entity_decode($res['html_status']['value']);
+            $iclsettings['icl_html_status'] = preg_replace_callback('#<a([^>]*)href="([^"]+)"([^>]*)>#i', create_function(
+                '$matches',
+                'global $sitepress; return $sitepress->create_icl_popup_link($matches[2]);'
+            ) ,$iclsettings['icl_html_status']);
+        }
+        
+        $iclsettings['icl_support_ticket_id'] = $res['attr']['support_ticket_id'];
+    }
+
+    function get_language_status_text($from_lang, $to_lang, $popclose_cb = false) {        
+        $popargs = array('title'=>'ICanLocalize');
+        if($popclose_cb){
+            $popargs['unload_cb'] =  $popclose_cb;   
+        }
+                
+        $lang_status = (array)$this->settings['icl_lang_status'];        
+        $response = '';
+        foreach ($lang_status as $lang) {                
+            if ($from_lang == $lang['from'] && $to_lang == $lang['to']) {
+                if (isset($lang['available_translators'])) {
+                    if (!$lang['available_translators']) {
+                        if ($this->settings['icl_support_ticket_id'] == '') {
+                            // No translators available on icanlocalize for this language pair.
+                            $response = sprintf(__('- (No translators available - please %sprovide more information about your site%s)', 'sitepress'),
+                                                $this->create_icl_popup_link(ICL_API_ENDPOINT. '/websites/' . $this->settings['site_id'] . '/explain?after=refresh_langs', 
+                                                    $popargs),
+                                                '</a>');
+                        } else {
+                            $response = sprintf(__('- (No translators available - %scheck progress%s)', 'sitepress'),
+                                                $this->create_icl_popup_link(ICL_API_ENDPOINT. '/support/show/' . $this->settings['icl_support_ticket_id'] . '?after=refresh_langs', 
+                                                    $popargs),
+                                                '</a>');
+                        }
+                        
+                    } else if (!$lang['applications']) {
+                        // No translators have applied for this language pair.                        
+                        $response = ' | ' . $this->create_icl_popup_link("@select-translators;{$from_lang};{$to_lang}@", $popargs) .
+                                    __('Select translators', 'sitepress') .  '</a>';
+                    } else if (!$lang['have_translators']) {
+                        // translators have applied but none selected yet
+                        $response = ' | ' . $this->create_icl_popup_link("@select-translators;{$from_lang};{$to_lang}@", $popargs) . __('Select translators', 'sitepress') . '</a>';
+                    } else {
+                        // there are translators ready to translate
+                        $translators = array();
+                        foreach($lang['translators'] as $translator){
+                            $link = $this->create_icl_popup_link(ICL_API_ENDPOINT. '/websites/' . $this->settings['site_id'] . '/website_translation_offers/' .  
+                                            $lang['id'] . '/website_translation_contracts/' . $translator['contract_id'], $popargs);
+                            $translators[] = $link . esc_html($translator['nickname']) . '</a>';
+                        }
+                        $response = ' | ' . $this->create_icl_popup_link("@select-translators;{$from_lang};{$to_lang}@", $popargs) . __('Select translators', 'sitepress') . '</a>';
+                        $response .= ' | ' . sprintf(__('Communicate with %s', 'sitepress'), join(', ', $translators));
+                                            
+                    }
+
+                    return $response;
+                    
+                }
+            break;
+            }
+                                       
+        }
+        
+        $response = ' | ' . $this->create_icl_popup_link("@select-translators;{$from_lang};{$to_lang}@", $popargs) . __('Select translators', 'sitepress') .  '</a>';
+        
+        // no status found        
+        return $response;
+    }
+
+    function are_waiting_for_translators($from_lang) {
+        $lang_status = $this->settings['icl_lang_status'];        
+        if ($lang_status && $this->icl_account_configured()) {
+            foreach ($lang_status as $lang) {
+                if ($from_lang == $lang['from']) {
+                    if (isset($lang['available_translators'])) {
+                        if ($lang['available_translators'] && !$lang['applications']) {
+                            return true;
+                        }
+                    }
+                }
+            }
+        }
+        return false;
+    }
+    
+    function get_default_language(){        
+        return $this->settings['default_language'];
+    }
+    
+    function get_current_language(){                                          
+        return apply_filters('icl_current_language' , $this->this_lang);
+    }
+    
+    function set_default_language($code){        
+        global $wpdb;
+        $iclsettings['default_language'] = $code;
+        $this->save_settings($iclsettings);
+        
+        // change WP locale
+        $locale = $this->get_locale($code);
+        if($locale){
+            update_option('WPLANG', $locale);
+        }      
+        if($code != 'en' && !file_exists(ABSPATH . LANGDIR . '/' . $locale . '.mo')){
+            return 1; //locale not installed
+        }
+        
+        return true;
+    }
+    
+    function get_icl_translation_enabled($lang=null, $langto=null){
+        if(!is_null($lang)){
+            if(!is_null($langto)){
+                return $this->settings['language_pairs'][$lang][$langto];
+            }else{
+                return !empty($this->settings['language_pairs'][$lang]);
+            }            
+        }else{
+            return $this->settings['enable_icl_translations'];
+        }
+    }
+
+    function set_icl_translation_enabled(){
+        $iclsettings['translation_enabled'] = true;
+        $this->save_settings($iclsettings);
+    }
+    
+    function icl_account_reqs(){
+        $errors = array();
+        if(!$this->get_icl_translation_enabled()){
+            $errors[] = __('Professional translation not enabled', 'sitepress');  
+        }
+        return $errors;        
+    }
+    
+    function icl_account_configured(){
+        return $this->settings['site_id'] && $this->settings['access_key'];
+    }
+
+    function icl_support_configured(){
+        return $this->settings['support_site_id'] && $this->settings['support_access_key'];
+    }
+
+    function reminders_popup(){
+        include ICL_PLUGIN_PATH . '/modules/icl-translation/icl-reminder-popup.php';
+        exit;
+    }
+    
+    function create_icl_popup_link($link, $args = array()) {
+        // defaults
+        $defaults = array(
+            'title' => null,
+            'class' => null,
+            'id'    => null,
+            'ar'    => 0,  // auto_resize
+            'unload_cb' => false, // onunload callback
+        );
+        
+        extract($args, EXTR_OVERWRITE);
+        
+        if($ar){
+            $auto_resize = '&amp;auto_resize=1';
+        }else{
+            $auto_resize = '';
+        }
+        
+        $unload_cb = $unload_cb ? '&amp;unload_cb=' . $unload_cb : '';
+        
+        if($this->settings['access_key']){
+            $url_glue = false !== strpos($link,'?') ? '&' : '?';
+            $link .= $url_glue . 'accesskey=' . $this->settings['access_key'];    
+        }
+        $link .= '&compact=1';            
+        
+		if ($id) {
+			$id = ' id="' . $id . '"';
+		}
+		if ($title) {
+            return '<a class="icl_thickbox' . $class . '" title="' . $title . '" href="admin.php?page='.ICL_PLUGIN_FOLDER . 
+                "/menu/languages.php&amp;icl_action=reminder_popup{$auto_resize}{$unload_cb}&amp;target=" . urlencode($link) .'"' . $id . '>';
+        } else {
+            return '<a class="icl_thickbox' . $class . '" href="admin.php?page='.ICL_PLUGIN_FOLDER . 
+                "/menu/languages&amp;icl_action=reminder_popup{$auto_resize}&amp;target=" . urlencode($link) .'"' . $id . '>';
+        }
+    }
+    
+    function js_scripts_setup(){        
+        global $pagenow, $wpdb; 
+        if(isset($_GET['page'])){
+            $page = basename($_GET['page']);
+            $page_basename = str_replace('.php','',$page);
+        }
+        ?>
+        <script type="text/javascript">   
+        // <![CDATA[     
+        var icl_ajx_url = '<?php echo rtrim(get_option('siteurl'),'/') . '/wp-admin/' ?>admin.php?page=<?php echo ICL_PLUGIN_FOLDER ?>/menu/languages.php';
+        var icl_ajx_saved = '<?php echo icl_js_escape( __('Data saved','sitepress')); ?>';
+        var icl_ajx_error = '<?php echo icl_js_escape( __('Error: data not saved','sitepress')); ?>';
+        var icl_default_mark = '<?php echo icl_js_escape(__('default','sitepress')); ?>';     
+        var icl_this_lang = '<?php echo $this->this_lang ?>';   
+        var icl_ajxloaderimg_src = '<?php echo ICL_PLUGIN_URL ?>/res/img/ajax-loader.gif';
+        var icl_cat_adder_msg = '<?php echo icl_js_escape(__('To add categories that already exist in other languages go to the <a href="edit-tags.php?taxonomy=category">category management page<\/a>','sitepress'));?>';
+        // ]]>
+        
+        <?php if(!$this->settings['ajx_health_checked']): ?>
+        addLoadEvent(function(){
+            jQuery.ajax({type: "POST",url: icl_ajx_url,data: "icl_ajx_action=health_check", error: function(msg){
+                    if(jQuery('#icl_initial_language').length){
+                        jQuery('#icl_initial_language input').attr('disabled', 'disabled');
+                    }
+                    jQuery('.wrap').prepend('<div class="error"><p><?php 
+                        echo icl_js_escape(sprintf(__("WPML can't run normally. There is an installation or server configuration problem. %sShow details%s",'sitepress'), 
+                        '<a href="#" onclick="jQuery(this).parent().next().slideToggle()">', '</a>'));
+                    ?></p><p style="display:none"><?php echo icl_js_escape(__('AJAX Error:', 'sitepress'))?> ' + msg.statusText + ' ['+msg.status+']<br />URL:'+ icl_ajx_url +'</p></div>');
+            }});
+        });
+        <?php endif; ?>
+        </script>         
+        <?php  
+        wp_enqueue_script('sitepress-scripts', ICL_PLUGIN_URL . '/res/js/scripts.js', array(), ICL_SITEPRESS_VERSION);
+        if(isset($page_basename) && file_exists(ICL_PLUGIN_PATH . '/res/js/'.$page_basename.'.js')){
+            wp_enqueue_script('sitepress-' . $page_basename, ICL_PLUGIN_URL . '/res/js/'.$page_basename.'.js', array(), ICL_SITEPRESS_VERSION);
+        }
+        if('options-reading.php' == $pagenow ){
+                list($warn_home, $warn_posts) = $this->verify_home_and_blog_pages_translations();
+                if($warn_home || $warn_posts){ ?>
+                <script type="text/javascript">        
+                addLoadEvent(function(){
+                jQuery('input[name="show_on_front"]').parent().parent().parent().parent().append('<?php echo str_replace("'","\\'",$warn_home . $warn_posts); ?>');
+                });
+                </script>
+                <?php } 
+        }
+        
+        // display correct links on the posts by status break down
+        // also fix links to category and tag pages
+        if( ('edit.php' == $pagenow || 'edit-pages.php' == $pagenow || 'categories.php' == $pagenow || 'edit-tags.php' == $pagenow) 
+                && $this->get_current_language() != $this->get_default_language()){
+                ?>
+                <script type="text/javascript">        
+                addLoadEvent(function(){
+                    jQuery('.subsubsub li a').each(function(){
+                        h = jQuery(this).attr('href');
+                        if(-1 == h.indexOf('?')) urlg = '?'; else urlg = '&';
+                        jQuery(this).attr('href', h + urlg + 'lang=<?php echo $this->get_current_language()?>');
+                    });
+                    jQuery('.column-categories a, .column-tags a, .column-posts a').each(function(){
+                        jQuery(this).attr('href', jQuery(this).attr('href') + '&lang=<?php echo $this->get_current_language()?>');
+                    });
+                    <?php /*  needs jQuery 1.3
+                    jQuery('.column-categories a, .column-tags a, .column-posts a').live('mouseover', function(){
+                        if(-1 == jQuery(this).attr('href').search('lang='+icl_this_lang)){
+                            h = jQuery(this).attr('href');
+                            if(-1 == h.indexOf('?')) urlg = '?'; else urlg = '&';                            
+                            jQuery(this).attr('href', h + urlg + 'lang='+icl_this_lang);
+                        }
+                    });     
+                    */ ?>           
+                });
+                </script>
+                <?php
+        }
+        
+        if('post-new.php' == $pagenow){
+            if(isset($_GET['trid'])){
+                $translations = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$_GET['trid']}'");    
+                remove_filter('option_sticky_posts', array($this,'option_sticky_posts')); // remove filter used to get language relevant stickies. get them all
+                $sticky_posts = get_option('sticky_posts');
+                add_filter('option_sticky_posts', array($this,'option_sticky_posts')); // add filter back
+                $is_sticky = false;
+                foreach($translations as $t){
+                    if(in_array($t, $sticky_posts)){
+                        $is_sticky = true;
+                        break;
+                    }
+                }
+                if(isset($_GET['trid']) && ($this->settings['sync_ping_status'] || $this->settings['sync_comment_status'])){
+                    $res = $wpdb->get_row("SELECT comment_status, ping_status FROM {$wpdb->prefix}icl_translations t 
+                    JOIN {$wpdb->posts} p ON t.element_id = p.ID WHERE t.trid='".intval($_GET['trid'])."'"); ?>
+                    <script type="text/javascript">addLoadEvent(function(){
+                    <?php if($this->settings['sync_comment_status']): ?>
+                        <?php if($res->comment_status == 'open'): ?>
+                        jQuery('#comment_status').attr('checked','checked');
+                        <?php else: ?>
+                        jQuery('#comment_status').removeAttr('checked');
+                        <?php endif; ?>
+                    <?php endif; ?>
+                    <?php if($this->settings['sync_ping_status']): ?>
+                        <?php if($res->ping_status == 'open'): ?>
+                        jQuery('#ping_status').attr('checked','checked');
+                        <?php else: ?>
+                        jQuery('#ping_status').removeAttr('checked');
+                        <?php endif; ?>                    
+                    <?php endif; ?>
+                    });</script><?php 
+                }
+                if(isset($_GET['trid']) && $this->settings['sync_private_flag']){
+                    if('private' == $wpdb->get_var("
+                        SELECT p.post_status FROM {$wpdb->prefix}icl_translations t
+                        JOIN {$wpdb->posts} p ON t.element_id = p.ID
+                        WHERE t.trid='{$_GET['trid']}' AND t.element_type='post_post'
+                    ")){
+                        ?><script type="text/javascript">addLoadEvent(function(){
+                            jQuery('#visibility-radio-private').attr('checked','checked');
+                            jQuery('#post-visibility-display').html('<?php echo icl_js_escape(__('Private', 'sitepress')); ?>');
+                        });
+                        </script><?php 
+                    }    
+                }
+                //get menu_order for page
+                
+            }
+            ?>
+            <?php if($is_sticky && $this->settings['sync_sticky_flag']): ?>
+                <script type="text/javascript">
+                    addLoadEvent(function(){
+                            jQuery('#sticky').attr('checked','checked');
+                            jQuery('#post-visibility-display').html(jQuery('#post-visibility-display').html()+', <?php echo icl_js_escape(__('Sticky', 'sitepress')) ?>');
+                    });
+                </script>
+            <?php endif; ?>               
+            <?php
+        }
+        if('page-new.php' == $pagenow || ('post-new.php' == $pagenow && $_GET['post_type']=='page')){            
+            if(isset($_GET['trid']) && ($this->settings['sync_page_template'] || $this->settings['sync_page_ordering'])){
+                $res = $wpdb->get_row("
+                    SELECT p.ID, p.menu_order FROM {$wpdb->prefix}icl_translations t
+                    JOIN {$wpdb->posts} p ON t.element_id = p.ID
+                    WHERE t.trid='{$_GET['trid']}' AND p.post_type='page' AND t.element_type='post_page'
+                "); 
+                if($this->settings['sync_page_ordering']){
+                    $menu_order = $res->menu_order;                   
+                }else{
+                    $menu_order = false;
+                }
+                if($this->settings['sync_page_template']){
+                    $page_template = get_post_meta($res->ID, '_wp_page_template', true);
+                }else{
+                    $page_template = false;
+                }                
+                if($menu_order || $page_template){
+                    ?><script type="text/javascript">addLoadEvent(function(){ <?php 
+                    if($menu_order){ ?>
+                        jQuery('#menu_order').val(<?php echo $menu_order ?>);
+                    <?php }
+                    if($page_template && 'default' != $page_template){ ?>
+                        jQuery('#page_template').val('<?php echo $page_template ?>');
+                    <?php }
+                    ?>});</script><?php
+                }                
+            }
+        }elseif('edit-comments.php' == $pagenow || 'index.php' == $pagenow || 'post.php' == $pagenow){
+            wp_enqueue_script('sitepress-' . $page_basename, ICL_PLUGIN_URL . '/res/js/comments-translation.js', array(), ICL_SITEPRESS_VERSION);
+        }
+        
+        if (is_admin()) {
+            wp_enqueue_script('thickbox');
+            wp_enqueue_script( 'theme-preview' );
+            wp_enqueue_script('sitepress-icl_reminders', ICL_PLUGIN_URL . '/res/js/icl_reminders.js', array(), ICL_SITEPRESS_VERSION);
+            
+        }
+
+        if('content-translation' == $page_basename) {        
+            wp_enqueue_script('icl-sidebar-scripts', ICL_PLUGIN_URL . '/res/js/icl_sidebar.js', array(), ICL_SITEPRESS_VERSION);
+        }
+        if('languages' == $page_basename || 'string-translation' == $page_basename) {        
+            wp_enqueue_script( 'colorpicker' );
+        }
+    }
+       
+    function front_end_js(){                
+        if(defined('ICL_DONT_LOAD_LANGUAGES_JS') && ICL_DONT_LOAD_LANGUAGES_JS){
+            return;
+        }
+        echo '<script type="text/javascript">var icl_lang = \''.$this->this_lang.'\';var icl_home = \''.$this->language_url().'\';</script>' . PHP_EOL;        
+        echo '<script type="text/javascript" src="'. ICL_PLUGIN_URL . '/res/js/sitepress.js"></script>' . PHP_EOL;        
+    }
+    
+    function js_scripts_categories(){
+        wp_enqueue_script('sitepress-categories', ICL_PLUGIN_URL . '/res/js/categories.js', array(), ICL_SITEPRESS_VERSION);
+    }
+    
+    function js_scripts_tags(){
+        wp_enqueue_script('sitepress-tags', ICL_PLUGIN_URL . '/res/js/tags.js', array(), ICL_SITEPRESS_VERSION);
+    }
+    
+    function css_setup(){
+        if($this->settings['basic_menu']){
+            echo '<style type="text/css">.icl_advanced_feature{display:none}</style>';       
+        }
+        if(isset($_GET['page'])){
+            $page = basename($_GET['page']);
+            $page_basename = str_replace('.php','',$page);        
+        }        
+        wp_enqueue_style('sitepress-style', ICL_PLUGIN_URL . '/res/css/style.css', array(), ICL_SITEPRESS_VERSION);
+        if(isset($page_basename) && file_exists(ICL_PLUGIN_PATH . '/res/css/'.$page_basename.'.css')){
+            wp_enqueue_style('sitepress-' . $page_basename, ICL_PLUGIN_URL . '/res/css/'.$page_basename.'.css', array(), ICL_SITEPRESS_VERSION);
+        }
+        
+        if (is_admin() && $this->icl_account_configured()) {
+            wp_enqueue_style('thickbox');
+        }
+        
+    }
+
+    function transfer_icl_account($create_account_and_transfer) {
+        $user = $_POST['user'];
+        $user['site_id'] = $this->settings['site_id'];
+        $user['accesskey'] = $this->settings['access_key'];
+        $user['create_account'] = $create_account_and_transfer ? '1' : '0';
+        $icl_query = new ICanLocalizeQuery();                
+        list($success, $access_key) = $icl_query->transfer_account($user);
+        if ($success) {
+            $this->settings['access_key'] = $access_key;
+            // set the support data the same.
+            $this->settings['support_access_key'] = $access_key;
+            $this->save_settings();
+            return true;
+        } else {
+            $_POST['icl_form_errors'] = $access_key;
+
+            return false;
+        }
+    }        
+    function process_forms(){
+        global $wpdb;
+        require_once ICL_PLUGIN_PATH . '/lib/Snoopy.class.php';
+        require_once ICL_PLUGIN_PATH . '/lib/xml2array.php';
+        require_once ICL_PLUGIN_PATH . '/lib/icl_api.php';
+        
+        if(isset($_POST['icl_post_action'])){
+            switch($_POST['icl_post_action']){
+                case 'save_theme_localization':
+                    $locales = array();
+                    foreach($_POST as $k=>$v){
+                        if(0 !== strpos($k, 'locale_file_name_') || !trim($v)) continue;
+                        $locales[str_replace('locale_file_name_','',$k)] = $v;                                                
+                    }
+                    if(!empty($locales)){
+                        $this->set_locale_file_names($locales);
+                    }                    
+                    $this->settings['gettext_theme_domain_name'] = $_POST['icl_domain_name'];
+                    $this->save_settings();
+                    global $sitepress_settings;
+                    $sitepress_settings = $this->get_settings();
+                    break;
+            }
+            return;
+        }
+        $create_account = isset($_POST['icl_create_account_nonce']) && $_POST['icl_create_account_nonce']==wp_create_nonce('icl_create_account');
+        $create_account_and_transfer = isset($_POST['icl_create_account_and_transfer_nonce']) && $_POST['icl_create_account_and_transfer_nonce']==wp_create_nonce('icl_create_account_and_transfer');
+        $config_account = isset($_POST['icl_configure_account_nonce']) && $_POST['icl_configure_account_nonce']==wp_create_nonce('icl_configure_account');
+        $create_support_account = isset($_POST['icl_create_support_account_nonce']) && $_POST['icl_create_support_account_nonce']==wp_create_nonce('icl_create_support_account');
+        $config_support_account = isset($_POST['icl_configure_support_account_nonce']) && $_POST['icl_configure_support_account_nonce']==wp_create_nonce('icl_configure_support_account');
+        $use_existing_account = isset($_POST['icl_use_account_nonce']) && $_POST['icl_use_account_nonce']==wp_create_nonce('icl_use_account');
+        $transfer_to_account = isset($_POST['icl_transfer_account_nonce']) && $_POST['icl_transfer_account_nonce']==wp_create_nonce('icl_transfer_account');
+        if( $create_account || $config_account || $create_support_account || $config_support_account){
+            if (isset($_POST['icl_content_trans_setup_back_2'])) {
+                // back button in wizard mode.
+                $this->settings['content_translation_setup_wizard_step'] = 2;
+                $this->save_settings();
+                
+            } else {
+                $user = $_POST['user'];
+                $user['create_account'] = (isset($_POST['icl_create_account_nonce']) ||
+                                           isset($_POST['icl_create_support_account_nonce'])) ? 1 : 0;
+                $user['platform_kind'] = 2;
+                $user['cms_kind'] = 1;
+                $user['blogid'] = $wpdb->blogid?$wpdb->blogid:1;
+                $user['url'] = get_option('home');
+                $user['title'] = get_option('blogname');
+                $user['description'] = $this->settings['icl_site_description'];
+                $user['is_verified'] = 1;
+                
+               if($user['create_account'] && defined('ICL_AFFILIATE_ID') && defined('ICL_AFFILIATE_KEY')){
+                    $user['affiliate_id'] = ICL_AFFILIATE_ID;
+                    $user['affiliate_key'] = ICL_AFFILIATE_KEY;
+                }
+                            
+                $user['interview_translators'] = $this->settings['interview_translators'];
+                $user['project_kind'] = $this->settings['website_kind'];
+                /*
+                 if(is_null($user['project_kind']) || $user['project_kind']==''){
+                    $_POST['icl_form_errors'] = __('Please select the kind of website','sitepress');               
+                    return;
+                }
+                */
+                $user['pickup_type'] = intval($this->settings['translation_pickup_method']);
+                                
+                $notifications = 0;
+                if ( $this->settings['icl_notify_complete']){
+                    $notifications += 1;
+                }
+                if ( $this->settings['alert_delay']){
+                    $notifications += 2;
+                }
+                $user['notifications'] = $notifications;
+    
+                // prepare language pairs
+                
+                $pay_per_use = $this->settings['translator_choice'] == 1;
+                
+                $language_pairs = $this->settings['language_pairs'];
+                $lang_pairs = array();
+                if(isset($language_pairs)){
+                    foreach($language_pairs as $k=>$v){
+                        $english_fr = $wpdb->get_var("SELECT english_name FROM {$wpdb->prefix}icl_languages WHERE code='{$k}' ");
+                        foreach($v as $k=>$v){
+                            $incr++;
+                            $english_to = $wpdb->get_var("SELECT english_name FROM {$wpdb->prefix}icl_languages WHERE code='{$k}' ");
+                            $lang_pairs['from_language'.$incr] = apply_filters('icl_server_languages_map', $english_fr); 
+                            $lang_pairs['to_language'.$incr] = apply_filters('icl_server_languages_map', $english_to);
+                            if ($pay_per_use) {
+                                $lang_pairs['pay_per_use'.$incr] = 1;
+                            }
+                        }                    
+                    }
+                }
+                $icl_query = new ICanLocalizeQuery();                
+                list($site_id, $access_key) = $icl_query->createAccount(array_merge($user,$lang_pairs));                
+                if(!$site_id){
+                    if ($access_key) {
+                        $_POST['icl_form_errors'] = $access_key;
+                    } else {
+                        $_POST['icl_form_errors'] = __('An unknown error has occurred when communicating with the ICanLocalize server. Please try again.', 'sitepress');
+                        // We will force the next try to be http.
+                        update_option('_force_mp_post_http', 1);
+                    }
+                }else{                    
+                    if ($create_account || $config_account) {
+                        $iclsettings['site_id'] = $site_id;
+                        $iclsettings['access_key'] = $access_key;
+                        $iclsettings['icl_account_email'] = $user['email'];
+                        // set the support data the same.
+                        $iclsettings['support_site_id'] = $site_id;
+                        $iclsettings['support_access_key'] = $access_key;
+                        $iclsettings['support_icl_account_email'] = $user['email'];
+                    } else {
+                        $iclsettings['support_site_id'] = $site_id;
+                        $iclsettings['support_access_key'] = $access_key;
+                        $iclsettings['support_icl_account_email'] = $user['email'];
+                    }
+                    $this->save_settings($iclsettings);
+                    if($user['create_account']==1){
+                        $_POST['icl_form_success'] = __('A project on ICanLocalize has been created.', 'sitepress') . '<br />';
+                        
+                    }else{
+                        $_POST['icl_form_success'] = __('Project added','sitepress');
+                    }
+                    $this->get_icl_translator_status($iclsettings);
+                    $this->save_settings($iclsettings);
+                    
+                }
+
+                if (!$create_support_account &&
+                            !$config_support_account &&
+                            intval($site_id) > 0 &&
+                            $access_key &&
+                            $this->settings['content_translation_setup_complete'] == 0 && 
+                            $this->settings['content_translation_setup_wizard_step'] == 3 && 
+                            !isset($_POST['icl_form_errors'])) {
+                    // we are running the wizard, so we can finish it now.
+                    $this->settings['content_translation_setup_complete'] = 1;
+                    $this->settings['content_translation_setup_wizard_step'] = 0;
+                    $this->save_settings();
+                    
+                }
+                
+            }
+        }
+        elseif ($use_existing_account || $transfer_to_account || $create_account_and_transfer) {
+
+            if (isset($_POST['icl_content_trans_setup_back_2'])) {
+                // back button in wizard mode.
+                $this->settings['content_translation_setup_wizard_step'] = 2;
+                $this->save_settings();
+            } else {
+                if ($transfer_to_account) {
+                    $_POST['user']['email'] = $_POST['user']['email2'];
+                }
+                // we will be using the support account for the icl_account
+                $this->settings['site_id'] = $this->settings['support_site_id'];
+                $this->settings['access_key'] = $this->settings['support_access_key'];
+                $this->settings['icl_account_email'] = $this->settings['support_icl_account_email'];
+    
+                $this->save_settings();
+    
+                update_icl_account();
+
+                if ($transfer_to_account || $create_account_and_transfer) {
+                    if (!$this->transfer_icl_account($create_account_and_transfer)) {
+                        return;
+                    }
+                    
+                }
+                
+                // we are running the wizard, so we can finish it now.
+                $this->settings['content_translation_setup_complete'] = 1;
+                $this->settings['content_translation_setup_wizard_step'] = 0;
+                $this->save_settings();
+
+                $iclsettings['site_id'] = $this->settings['site_id'];
+                $iclsettings['access_key'] = $this->settings['access_key'];
+                $this->get_icl_translator_status($iclsettings);
+                $this->save_settings($iclsettings);
+    
+                
+            }
+        }
+        elseif(isset($_POST['icl_initial_languagenonce']) && $_POST['icl_initial_languagenonce']==wp_create_nonce('icl_initial_language')){
+            
+            $this->prepopulate_translations($_POST['icl_initial_language_code']);
+            $wpdb->update($wpdb->prefix . 'icl_languages', array('active'=>'1'), array('code'=>$_POST['icl_initial_language_code']));
+            $blog_default_cat = get_option('default_category');
+            $blog_default_cat_tax_id = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id='{$blog_default_cat}' AND taxonomy='category'");
+            
+            if(isset($_POST['save_one_language'])){
+                $this->settings['setup_wizard_step'] = 0;
+                $this->settings['setup_complete'] = 1;
+            }else{
+                $this->settings['setup_wizard_step'] = 2;
+            }
+            
+            $this->settings['default_categories'] = array($_POST['icl_initial_language_code'] => $blog_default_cat_tax_id);
+            $this->settings['existing_content_language_verified'] = 1;            
+            $this->settings['default_language'] = $_POST['icl_initial_language_code'];            
+            $this->settings['admin_default_language'] = $this->admin_language = $_POST['icl_initial_language_code'];            
+            
+            // set the locale in the icl_locale_map (if it's not set)
+            if(!$wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_locale_map WHERE code='{$_POST['icl_initial_language_code']}'")){
+                $default_locale = $wpdb->get_var("SELECT default_locale FROM {$wpdb->prefix}icl_languages WHERE code='{$_POST['icl_initial_language_code']}'");
+                if($default_locale){
+                    $wpdb->insert($wpdb->prefix.'icl_locale_map', array('code'=>$_POST['icl_initial_language_code'], 'locale'=>$default_locale));
+                    
+                }
+            }
+            
+            $this->save_settings();                                
+            global $sitepress_settings;
+            $sitepress_settings = $this->settings;
+            $this->get_active_languages(true); //refresh active languages list
+            do_action('icl_initial_language_set');
+        }elseif(isset($_POST['icl_language_pairs_formnounce']) && $_POST['icl_language_pairs_formnounce'] == wp_create_nonce('icl_language_pairs_form')) {
+            $this->save_language_pairs();
+
+            $this->settings['content_translation_languages_setup'] = 1;
+            // Move onto the site description page
+            $this->settings['content_translation_setup_wizard_step'] = 2;
+            
+            $this->settings['website_kind'] = 2;
+            $this->settings['interview_translators'] = 1;
+            
+            $this->save_settings();
+            
+        }elseif(isset($_POST['icl_site_description_wizardnounce']) && $_POST['icl_site_description_wizardnounce'] == wp_create_nonce('icl_site_description_wizard')) {
+            if(isset($_POST['icl_content_trans_setup_back_2'])){
+                // back button.
+                $this->settings['content_translation_languages_setup'] = 0;
+                $this->settings['content_translation_setup_wizard_step'] = 1;
+                $this->save_settings();
+            }elseif(isset($_POST['icl_content_trans_setup_next_2']) || isset($_POST['icl_content_trans_setup_next_2_enter'])){
+                // next button.
+                $description = $_POST['icl_description'];
+                if ($description == "") {
+                    $_POST['icl_form_errors'] = __('Please provide a short description of the website so that translators know what background is required from them.','sitepress');               
+                } else {
+                    $this->settings['icl_site_description'] = $description;
+                    $this->settings['content_translation_setup_wizard_step'] = 3;
+                    $this->save_settings();
+                }
+            }
+        }
+    }
+    
+    function prepopulate_translations($lang){        
+        global $wpdb;        
+        if($this->settings['existing_content_language_verified']) return;
+        
+        $this->icl_translations_cache->clear();
+        
+        mysql_query("TRUNCATE TABLE {$wpdb->prefix}icl_translations");
+        mysql_query("
+            INSERT INTO {$wpdb->prefix}icl_translations(element_type, element_id, trid, language_code, source_language_code)
+            SELECT CONCAT('post_',post_type), ID, ID, '{$lang}', NULL FROM {$wpdb->posts} WHERE post_status IN ('draft', 'publish','schedule','future','private')
+            ");
+        $maxtrid = 1 + $wpdb->get_var("SELECT MAX(trid) FROM {$wpdb->prefix}icl_translations");        
+        
+        /* preWP3 compatibility  - start */
+        if(ICL_PRE_WP3){
+        mysql_query("
+            INSERT INTO {$wpdb->prefix}icl_translations(element_type, element_id, trid, language_code, source_language_code)
+            SELECT 'tax_category', term_taxonomy_id, {$maxtrid}+term_taxonomy_id, '{$lang}', NULL FROM {$wpdb->term_taxonomy}
+            WHERE taxonomy = 'category'
+            ");
+        $maxtrid = 1 + $wpdb->get_var("SELECT MAX(trid) FROM {$wpdb->prefix}icl_translations");
+        mysql_query("
+            INSERT INTO {$wpdb->prefix}icl_translations(element_type, element_id, trid, language_code, source_language_code)
+            SELECT 'tax_post_tag', term_taxonomy_id, {$maxtrid}+term_taxonomy_id, '{$lang}', NULL FROM {$wpdb->term_taxonomy}
+            WHERE taxonomy = 'post_tag'
+            ");
+        $maxtrid = 1 + $wpdb->get_var("SELECT MAX(trid) FROM {$wpdb->prefix}icl_translations");
+        }else{
+        /* preWP3 compatibility  - end */
+        global $wp_taxonomies;
+        $taxonomies = array_keys((array)$wp_taxonomies);
+        foreach($taxonomies as $tax){
+            mysql_query("
+                INSERT INTO {$wpdb->prefix}icl_translations(element_type, element_id, trid, language_code, source_language_code)
+                SELECT 'tax_".$tax."', term_taxonomy_id, {$maxtrid}+term_taxonomy_id, '{$lang}', NULL FROM {$wpdb->term_taxonomy} WHERE taxonomy = '{$tax}'
+                ");
+            $maxtrid = 1 + $wpdb->get_var("SELECT MAX(trid) FROM {$wpdb->prefix}icl_translations");
+        }
+        
+        /* preWP3 compatibility  - start */
+        }
+        /* preWP3 compatibility  - end */
+        
+        mysql_query("
+            INSERT INTO {$wpdb->prefix}icl_translations(element_type, element_id, trid, language_code, source_language_code)
+            SELECT 'comment', comment_ID, {$maxtrid}+comment_ID, '{$lang}', NULL FROM {$wpdb->comments}
+            ");            
+    }
+    
+    function post_edit_language_options(){
+        global $wpdb, $wp_post_types;
+        $post_types = array_diff(array_keys($wp_post_types), array('attachment','revision','nav_menu_item'));
+        foreach($post_types as $type){
+            if(in_array($type,array('post','page')) || $this->settings['custom_posts_sync_option'][$type] == 1){
+                add_meta_box('icl_div', __('Language', 'sitepress'), array($this,'meta_box'), $type, 'side', 'high');            
+            }
+        }
+    }
+    
+    function set_element_language_details($el_id, $el_type='post_post', $trid, $language_code, $src_language_code = null){
+        global $wpdb;
+        
+        if($trid){  // it's a translation of an existing element  
+                                                         
+            // check whether we have an orphan translation - the same trid and language but a different element id                                                     
+            $translation_id = $wpdb->get_var("
+                SELECT translation_id FROM {$wpdb->prefix}icl_translations 
+                WHERE   trid = '{$trid}' 
+                    AND language_code = '{$language_code}' 
+                    AND element_id <> '{$el_id}'
+            ");            
+            if($translation_id){
+                $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id={$translation_id}");
+                $this->icl_translations_cache->clear();
+            }
+            
+            if($translation_id = $wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE element_type='{$el_type}' AND element_id='{$el_id}' AND trid='{$trid}'")){
+                //case of language change
+                $wpdb->update($wpdb->prefix.'icl_translations', 
+                    array('language_code'=>$language_code), 
+                    array('translation_id'=>$translation_id));                
+            } elseif($existing_trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='{$el_type}' AND element_id='{$el_id}'")){                
+                //case of changing the "translation of"
+                $wpdb->update($wpdb->prefix.'icl_translations', 
+                    array('trid'=>$trid, 'language_code'=>$language_code, 'source_language_code'=>$src_language_code), 
+                    array('element_type'=>$el_type, 'element_id'=>$el_id));
+                $this->icl_translations_cache->clear();
+            }else{
+                //get source
+                $src_language_code = $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE trid={$trid} AND source_language_code IS NULL"); 
+                // case of adding a new language                
+                $wpdb->insert($wpdb->prefix.'icl_translations', 
+                    array(
+                        'trid'=>$trid, 
+                        'element_type'=>$el_type, 
+                        'element_id'=>$el_id, 
+                        'language_code'=>$language_code,
+                        'source_language_code'=>$src_language_code
+                        )
+                );
+                $this->icl_translations_cache->clear();
+                
+            }
+        }else{ // it's a new element or we are removing it from a trid
+            if($translation_id = $wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE element_type='{$el_type}' AND element_id='{$el_id}'")){
+                $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE translation_id={$translation_id}");    
+                $this->icl_translations_cache->clear();
+            } 
+        
+            $trid = 1 + $wpdb->get_var("SELECT MAX(trid) FROM {$wpdb->prefix}icl_translations");
+            $wpdb->insert($wpdb->prefix.'icl_translations', 
+                array(
+                    'trid'=>$trid,
+                    'element_type'=>$el_type, 
+                    'element_id'=>$el_id,
+                    'language_code'=>$language_code
+                )
+            );
+        }
+        return $trid;
+    }
+    
+    function delete_element_translation($trid, $el_type, $language_code = false){
+        global $wpdb;
+        $trid = intval($trid);
+        $el_type = $wpdb->escape($el_type);
+        $where = '';
+        if($language_code){
+            $where .= " AND language_code='".$wpdb->escape($language_code)."'";
+        }
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_type='{$el_type}' {$where}");
+        $this->icl_translations_cache->clear();
+    }
+    
+    function get_element_language_details($el_id, $el_type='post_post'){        
+        global $wpdb;
+        static $pre_load_done = false;
+        if (!$pre_load_done && !ICL_DISABLE_CACHE) {
+            // search previous queries for a group of posts
+            foreach ($this->queries as $query){
+                $pos = strstr($query, 'post_id IN (');
+                if ($pos !== FALSE) {
+                    $group = substr($pos, 10);
+                    $group = substr($group, 0, strpos($group, ')') + 1);
+
+                    $query = 
+                        "SELECT element_id, trid, language_code, source_language_code 
+                        FROM {$wpdb->prefix}icl_translations
+                        WHERE element_id IN {$group} AND element_type='{$el_type}'";
+                    $ret = $wpdb->get_results($query);        
+                    foreach($ret as $details){
+                        if (isset($this->icl_translations_cache)) {
+                            $this->icl_translations_cache->set($details->element_id.$el_type, $details);
+                        }
+                    }
+                    
+                    // get the taxonomy for the posts for later use
+                    // categories first
+                    $query =
+                        "SELECT DISTINCT(tr.term_taxonomy_id), tt.term_id, tt.taxonomy, icl.trid, icl.language_code, icl.source_language_code
+                        FROM {$wpdb->prefix}term_relationships as tr
+                        LEFT JOIN {$wpdb->prefix}term_taxonomy AS tt
+                        ON tr.term_taxonomy_id = tt.term_taxonomy_id
+                        LEFT JOIN {$wpdb->prefix}icl_translations as icl ON tr.term_taxonomy_id = icl.element_id
+                        WHERE tr.object_id IN {$group}
+                        AND (icl.element_type='tax_category' and tt.taxonomy='category')
+                        ";
+                    $query .= "UNION
+                    ";
+                    $query .=
+                        "SELECT DISTINCT(tr.term_taxonomy_id), tt.term_id, tt.taxonomy, icl.trid, icl.language_code, icl.source_language_code
+                        FROM {$wpdb->prefix}term_relationships as tr
+                        LEFT JOIN {$wpdb->prefix}term_taxonomy AS tt
+                        ON tr.term_taxonomy_id = tt.term_taxonomy_id
+                        LEFT JOIN {$wpdb->prefix}icl_translations as icl ON tr.term_taxonomy_id = icl.element_id
+                        WHERE tr.object_id IN {$group}
+                        AND (icl.element_type='tax_post_tag' and tt.taxonomy='post_tag')"
+                        ;
+                    global $wp_taxonomies;
+                    $custom_taxonomies = array_diff(array_keys($wp_taxonomies), array('post_tag','category','link_category'));
+                    if(!empty($custom_taxonomies)){
+                        foreach($custom_taxonomies as $tax){
+                            $query .= " UNION
+                                SELECT DISTINCT(tr.term_taxonomy_id), tt.term_id, tt.taxonomy, icl.trid, icl.language_code, icl.source_language_code
+                                FROM {$wpdb->prefix}term_relationships as tr
+                                LEFT JOIN {$wpdb->prefix}term_taxonomy AS tt
+                                ON tr.term_taxonomy_id = tt.term_taxonomy_id
+                                LEFT JOIN {$wpdb->prefix}icl_translations as icl ON tr.term_taxonomy_id = icl.element_id
+                                WHERE tr.object_id IN {$group}
+                                AND (icl.element_type='tax_{$tax}' and tt.taxonomy='{$tax}')"
+                                ;
+                        }    
+                    }
+                    $ret = $wpdb->get_results($query); 
+                    
+                    foreach($ret as $details){
+                        // save language details
+                        $lang_details = new stdClass();
+                        $lang_details->trid = $details->trid;
+                        $lang_details->language_code = $details->language_code;
+                        $lang_details->source_language_code = $details->source_language_code;
+                        if (isset($this->icl_translations_cache)) {
+                            $this->icl_translations_cache->set($details->term_taxonomy_id.'tax_' . $details->taxonomy, $lang_details);
+                            // save the term taxonomy
+                            $this->icl_term_taxonomy_cache->set('category_'.$details->term_id, $details->term_taxonomy_id);
+                        }
+                    }
+                    
+                    break;
+                }
+            }
+            $pre_load_done = true;
+        }
+        
+        if (isset($this->icl_translations_cache) && $this->icl_translations_cache->has_key($el_id.$el_type)) {
+            return $this->icl_translations_cache->get($el_id.$el_type);
+        }
+
+        $details = $wpdb->get_row("
+            SELECT trid, language_code, source_language_code 
+            FROM {$wpdb->prefix}icl_translations
+            WHERE element_id='{$el_id}' AND element_type='{$el_type}'");        
+        if (isset($this->icl_translations_cache)) {
+            $this->icl_translations_cache->set($el_id.$el_type, $details);
+        }
+
+        return $details;
+    }
+    
+    function save_post_actions($pidd){
+        global $wpdb;        
+        
+        list($post_type, $post_status) = $wpdb->get_row("SELECT post_type, post_status FROM {$wpdb->posts} WHERE ID = " . $pidd, ARRAY_N);
+        // exceptions
+        if(     
+               !$this->is_translated_post_type($post_type) 
+            || $_POST['autosave'] 
+            || $_POST['skip_sitepress_actions'] 
+            || (isset($_POST['post_ID']) && $_POST['post_ID']!=$pidd) || $_POST['post_type']=='revision' 
+            || $post_type == 'revision' 
+            || get_post_meta($pidd, '_wp_trash_meta_status', true) 
+            || ( isset($_GET['action']) && $_GET['action']=='restore')
+            || $post_status == 'auto-draft' 
+        ){
+            return;
+        }
+        
+        if($_POST['action']=='post-quickpress-publish'){
+            $post_id = $pidd;            
+            $language_code = $this->get_default_language();
+        }elseif(isset($_GET['bulk_edit'])){
+            $post_id = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID={$pidd}");
+        }
+        else{
+            $post_id = $_POST['post_ID']?$_POST['post_ID']:$pidd; //latter case for XML-RPC publishing
+            $language_code = $_POST['icl_post_language']?$_POST['icl_post_language']:$this->get_default_language(); //latter case for XML-RPC publishing
+        } 
+        
+        if($_POST['action']=='inline-save' || isset($_GET['bulk_edit']) || isset($_GET['doing_wp_cron']) || $_GET['action']=='untrash'){
+            $res = $wpdb->get_row("SELECT trid, language_code FROM {$wpdb->prefix}icl_translations WHERE element_id={$post_id} AND element_type LIKE 'post\\_%'");
+            $trid = $res->trid;
+            $language_code = $res->language_code;
+        }else{
+            $trid = $_POST['icl_trid'];
+            // see if we have a "translation of" setting.
+            if ($_POST['icl_translation_of']) {
+                $src_post_id = $_POST['icl_translation_of'];
+                if ($src_post_id != 'none') {
+                    $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id={$src_post_id} AND element_type LIKE 'post\\_%'"); 
+                } else {
+                    $trid = null;
+                } 
+            }
+        }
+        $this->set_element_language_details($post_id, 'post_'.$_POST['post_type'], $trid, $language_code);
+        
+        if(!in_array($post_type, array('post','page')) && $this->settings['custom_posts_sync_option'][$post_type] != 1){
+            return;
+        }        
+        
+        // synchronize the page order for translations
+        if($trid && $_POST['post_type']=='page' && $this->settings['sync_page_ordering']){
+            $menu_order = $wpdb->escape($_POST['menu_order']);
+            $translated_pages = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_id<>{$post_id}");
+            if(!empty($translated_pages)){
+                $wpdb->query("UPDATE {$wpdb->posts} SET menu_order={$menu_order} WHERE ID IN (".join(',', $translated_pages).")");
+            }            
+        }
+                
+        // synchronize the page parent for translations
+        if($trid && $_POST['post_type']=='page' && $this->settings['sync_page_parent']){
+            $translations = $this->get_element_translations($trid, 'post_' . $_POST['post_type']);
+            foreach($translations as $target_lang => $target_details){
+                if($target_lang != $language_code){
+                    $this->fix_translated_parent($post_id, $target_details->element_id, $target_lang, $language_code);
+                    
+                    // restore child-parent relationships
+                    $children = $wpdb->get_col("SELECT ID FROM {$wpdb->posts} WHERE post_parent={$target_details->element_id} AND post_type='page'");
+                    
+                    foreach($children as $ch){
+                        $ch_trid = $this->get_element_trid($ch, 'post_' . $_POST['post_type']);
+                        $ch_translations = $this->get_element_translations($ch_trid, 'post_' . $_POST['post_type']);
+                        if(isset($ch_translations[$language_code])){
+                            $wpdb->update($wpdb->posts, array('post_parent'=>$post_id), array('ID'=>$ch_translations[$language_code]->element_id));
+                        }
+                    }                    
+                }
+            }
+        }        
+                
+        // synchronize the page template
+        if($trid && $_POST['post_type']=='page' && $this->settings['sync_page_template']){
+            $translated_pages = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_id<>{$post_id}");
+            if(!empty($translated_pages)){
+                foreach($translated_pages as $tp){
+                    if($tp != $post_id){
+                        update_post_meta($tp, '_wp_page_template', $_POST['page_template']);
+                    }
+                }
+            }            
+        }        
+
+        // synchronize comment and ping status
+        if($trid && $_POST['post_type']=='post' && ($this->settings['sync_ping_status'] || $this->settings['sync_comment_status'])){
+            $arr = array();
+            if($this->settings['sync_comment_status']){
+                $arr['comment_status'] = $_POST['comment_status'];
+            }
+            if($this->settings['sync_ping_status']){
+                $arr['ping_status'] = $_POST['ping_status'];
+            }
+            if(!empty($arr)){
+                $translated_posts = $wpdb->get_col("
+                    SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_id<>{$post_id}");
+                if(!empty($translated_posts)){
+                    foreach($translated_posts as $tp){
+                        if($tp != $post_id){
+                            $wpdb->update($wpdb->posts, $arr, array('ID'=>$tp));
+                        }
+                    }
+                }            
+            }
+        }        
+        
+        require_once ICL_PLUGIN_PATH . '/inc/plugins-texts-functions.php';
+        if(function_exists('icl_pt_sync_pugins_texts')){
+            icl_pt_sync_pugins_texts($post_id, $trid);
+        }
+        
+                
+        //sync posts stcikiness
+        if($_POST['post_type']=='post' && $_POST['action']!='post-quickpress-publish' && $this->settings['sync_sticky_flag']){ //not for quick press
+            remove_filter('option_sticky_posts', array($this,'option_sticky_posts')); // remove filter used to get language relevant stickies. get them all
+            $sticky_posts = get_option('sticky_posts');
+            // get ids of othe translations
+            if($trid){
+                $translations = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}'");
+            }else{
+                $translations = array();
+            }     
+            if(isset($_POST['sticky']) && $_POST['sticky'] == 'sticky'){
+                $sticky_posts = array_unique(array_merge($sticky_posts, $translations));                
+            }else{
+                //makes sure translations are not set to sticky if this posts switched from sticky to not-sticky                
+                $sticky_posts = array_diff($sticky_posts, $translations);                
+            }
+            update_option('sticky_posts',$sticky_posts);
+        }
+        
+        //sync private flag
+        if($this->settings['sync_private_flag']){
+            if($post_status=='private' && $_POST['original_post_status']!='private'){
+                $translated_posts = $wpdb->get_col("
+                    SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_id<>{$post_id}");
+                if(!empty($translated_posts)){
+                    foreach($translated_posts as $tp){
+                        if($tp != $post_id){
+                            $wpdb->update($wpdb->posts, array('post_status'=>'private'), array('ID'=>$tp));
+                        }
+                    }
+                }            
+            }elseif($post_status!='private' && $_POST['original_post_status']=='private'){
+                $translated_posts = $wpdb->get_col("
+                    SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_id<>{$post_id}");
+                if(!empty($translated_posts)){
+                    foreach($translated_posts as $tp){
+                        if($tp != $post_id){
+                            $wpdb->update($wpdb->posts, array('post_status'=>$post_status), array('ID'=>$tp));
+                        }
+                    }
+                }            
+            }
+        }
+        
+        // new categories created inline go to the correct language        
+        if(isset($_POST['post_category']) && $_POST['action']!='inline-save' && $_POST['icl_post_language'])
+        foreach($_POST['post_category'] as $cat){
+            $ttid = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id={$cat} AND taxonomy='category'");
+            $wpdb->update($wpdb->prefix.'icl_translations', 
+                array('language_code'=>$_POST['icl_post_language']), 
+                array('element_id'=>$ttid, 'element_type'=>'tax_category'));
+        }
+        
+        if(isset($_POST['icl_tn_note'])){
+            update_post_meta($post_id, '_icl_translator_note', $_POST['icl_tn_note']);
+        }
+        
+        require_once ICL_PLUGIN_PATH . '/inc/cache.php';        
+        icl_cache_clear($_POST['post_type'].'s_per_language');
+    }
+    
+    function fix_translated_parent($original_id, $translated_id, $lang_code, $language_code){
+        global $wpdb;
+        
+        $icl_post_type = isset($_POST['post_type']) ? 'post_' . $_POST['post_type'] : 'post_page';
+        
+        $original_parent = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID = {$original_id} AND post_type = 'page'");
+        
+        if (!is_null($original_parent)){
+            if($original_parent === '0'){
+                $parent_of_translated_id = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID = {$translated_id} AND post_type = 'page'");
+                $translations = $this->get_element_translations($this->get_element_trid($parent_of_translated_id,$icl_post_type),$icl_post_type);
+                if(isset($translations[$language_code])){
+                    $wpdb->query("UPDATE {$wpdb->posts} SET post_parent='0' WHERE ID = ".$translated_id);
+                }
+            }else{
+                $trid = $this->get_element_trid($original_parent, $icl_post_type);
+                                
+                if($trid){
+                    $translations = $this->get_element_translations($trid, $icl_post_type);
+                    if (isset($translations[$lang_code])){
+                        $current_parent = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID = ".$translated_id);
+                        if ($current_parent != $translations[$lang_code]->element_id){
+                            $wpdb->query("UPDATE {$wpdb->posts} SET post_parent={$translations[$lang_code]->element_id} WHERE ID = ".$translated_id);
+                        }
+                    }
+                }
+            }
+        }
+    }    
+    
+    function sync_custom_fields($post_id, $field_names, $single = true){
+        global $wpdb;
+        $field_names = (array)$field_names;
+        $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID={$post_id}");
+        $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$post_type}' AND element_id={$post_id}");
+        if(!$trid){
+            return;
+        }        
+        $translations = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_id <> {$post_id}");        
+        foreach($field_names as $field_name){
+            $field_value = get_post_meta($post_id, $field_name, $single);
+            foreach($translations as $t){
+                if($post_id == $t->element_id) continue;
+                if(!$field_value){
+                    delete_post_meta($t, $field_name);
+                }else{
+                    update_post_meta($t, $field_name, $field_value);
+                }                
+            }
+        }
+    } 
+        
+    function delete_post_actions($post_id){
+        global $wpdb;
+        $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID={$post_id}");
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE element_type='post_{$post_type}' AND element_id='{$post_id}' LIMIT 1");
+                
+        require_once ICL_PLUGIN_PATH . '/inc/cache.php';                
+        icl_cache_clear($post_type.'s_per_language');        
+    }
+
+    function trash_post_actions($post_id){
+        if($this->settings['sync_delete']){
+            global $wpdb;        
+            static $trashed_posts = array();
+            $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID={$post_id}");
+            if(isset($trashed_posts[$post_id])){
+                return; // avoid infinite loop
+            }
+            
+            $trashed_posts[$post_id] = $post_id;
+            
+            $trid = $this->get_element_trid($post_id, 'post_' . $post_type);
+            $translations = $this->get_element_translations($trid, 'post_' . $post_type);
+            foreach($translations as $t){
+                if($t->element_id != $post_id){
+                    wp_trash_post($t->element_id);
+                }
+            }
+            require_once ICL_PLUGIN_PATH . '/inc/cache.php';                
+            icl_cache_clear($post_type.'s_per_language');        
+        }
+    }
+
+    function untrashed_post_actions($post_id){
+        if($this->settings['sync_delete']){
+            global $wpdb;        
+            static $untrashed_posts = array();
+            $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID={$post_id}");
+            
+            if(isset($untrashed_posts[$post_id])){
+                return; // avoid infinite loop
+            }
+            
+            $untrashed_posts[$post_id] = $post_id;
+            
+            $trid = $this->get_element_trid($post_id, 'post_' . $post_type);
+            $translations = $this->get_element_translations($trid, 'post_' . $post_type);
+            foreach($translations as $t){
+                if($t->element_id != $post_id){
+                    wp_untrash_post($t->element_id);
+                }
+            }
+            require_once ICL_PLUGIN_PATH . '/inc/cache.php';        
+            
+            icl_cache_clear($post_type.'s_per_language');        
+        }
+    }
+    
+    function get_element_translations($trid, $el_type='post_post', $skip_empty = false){        
+        global $wpdb;  
+        if($trid){            
+            if(0 === strpos($el_type, 'post_')){
+                $sel_add = ', p.post_title, p.post_status';
+                $join_add = " LEFT JOIN {$wpdb->posts} p ON t.element_id=p.ID";
+                $groupby_add = "";
+            }elseif(preg_match('#^tax_(.+)$#',$el_type)){
+                $sel_add = ', tm.name, tm.term_id, COUNT(tr.object_id) AS instances';
+                $join_add = " LEFT JOIN {$wpdb->term_taxonomy} tt ON t.element_id=tt.term_taxonomy_id
+                              LEFT JOIN {$wpdb->terms} tm ON tt.term_id = tm.term_id
+                              LEFT JOIN {$wpdb->term_relationships} tr ON tr.term_taxonomy_id=tt.term_taxonomy_id
+                              ";                
+                $groupby_add = "GROUP BY tm.name";
+            }                         
+            $where_add = " AND t.trid='{$trid}'"; 
+        }   
+        $query = "
+            SELECT t.language_code, t.element_id, t.source_language_code IS NULL AS original {$sel_add}
+            FROM {$wpdb->prefix}icl_translations t
+                 {$join_add}                 
+            WHERE 1 {$where_add}
+            {$groupby_add} 
+        ";       
+        $ret = $wpdb->get_results($query);        
+        foreach($ret as $t){
+            if((preg_match('#^tax_(.+)$#',$el_type)) && $t->instances==0 && $skip_empty) continue;
+            $translations[$t->language_code] = $t;
+        }        
+        return $translations;
+    }
+    
+    function get_element_trid($element_id, $el_type='post_post'){
+        global $wpdb;           
+        return $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$element_id}' AND element_type='{$el_type}'");
+    }
+    
+    function get_language_for_element($element_id, $el_type='post_post'){
+        global $wpdb;   
+        return $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE element_id='{$element_id}' AND element_type='{$el_type}'");
+    }
+
+    function get_elements_without_translations($el_type, $target_lang, $source_lang){
+        global $wpdb;
+        
+        // first get all the trids for the target languages
+        // These will be the trids that we don't want.
+        $sql = "SELECT
+                    trid
+                FROM
+                    {$wpdb->prefix}icl_translations
+                WHERE
+                    language_code = '{$target_lang}'";
+        
+        $trids_for_target = $wpdb->get_col($sql);
+        if (sizeof($trids_for_target) > 0) {
+            $trids_for_target = join(',', $trids_for_target);
+            $not_trids = 'AND trid NOT IN (' .$trids_for_target . ')';
+        } else {
+            $not_trids = '';
+        }
+        
+        // Now get all the elements that are in the source language that
+        // are not already translated into the target language.
+        $sql = "SELECT
+                    element_id
+                FROM
+                    {$wpdb->prefix}icl_translations
+                WHERE
+                        language_code = '{$source_lang}'
+                    {$not_trids}
+                    AND element_type= '{$el_type}'";
+        
+        return $wpdb->get_col($sql);        
+    }
+
+    function get_posts_without_translations($selected_language, $default_language, $post_type='post_post') {
+        global $wpdb;
+        $untranslated_ids = $this->get_elements_without_translations($post_type, $selected_language, $default_language);
+        if (sizeof($untranslated_ids)) {
+            // filter for "page" or "post"
+            $ids = join(',',$untranslated_ids);
+            $type = preg_replace('#^post_#','',$post_type);
+            $untranslated_ids = $wpdb->get_col("SELECT ID FROM {$wpdb->posts} WHERE ID IN ({$ids}) AND post_type = '{$type}' AND post_status <> 'auto-draft'");
+        }
+        
+        $untranslated = array();
+        
+        foreach ($untranslated_ids as $id) {
+            $untranslated[$id] = $wpdb->get_var("SELECT post_title FROM {$wpdb->prefix}posts WHERE ID = {$id}");
+        }
+        
+        return $untranslated;
+    }
+    
+    function meta_box($post){
+        global $wpdb, $wp_post_types;   
+        $active_languages = $this->get_active_languages();
+        $default_language = $this->get_default_language();
+        if($post->ID && $post->post_status != 'auto-draft'){
+            $res = $this->get_element_language_details($post->ID, 'post_'.$post->post_type);
+            $trid = $res->trid;
+            if($trid){                
+                $element_lang_code = $res->language_code;
+            }else{
+                $trid = $this->set_element_language_details($post->ID,'post_'.$post->post_type,null,$default_language);
+                $element_lang_code = $default_language;
+            }            
+        }else{
+            $trid = $_GET['trid'];
+            $element_lang_code = $_GET['lang'];
+        }                 
+        if($trid){
+            $translations = $this->get_element_translations($trid, 'post_'.$post->post_type);        
+        }
+        $selected_language = $element_lang_code?$element_lang_code:$default_language;
+        
+        if(isset($_GET['lang'])){
+            $selected_language = $_GET['lang'];
+        }                
+        $untranslated = $this->get_posts_without_translations($selected_language, $default_language, 'post_' . $post->post_type);
+        
+        $source_language = $_GET['source_lang'];
+        
+        include ICL_PLUGIN_PATH . '/menu/post-menu.php';
+    }
+    
+    function posts_join_filter($join){        
+        global $wpdb, $pagenow;
+        //exceptions
+        if(isset($_POST['wp-preview']) && $_POST['wp-preview']=='dopreview' || is_preview()){
+            $is_preview = true;
+        }else{
+            $is_preview = false;
+        }
+        if($pagenow=='upload.php' || $pagenow=='media-upload.php' || is_attachment() || $is_preview){
+            return $join;    
+        }
+        
+        if('all' != $this->this_lang){ 
+            //$cond = " AND t.language_code='{$wpdb->escape($this->get_current_language())}'";
+            $ljoin = "";
+        }else{
+            //$cond = '';
+            $ljoin = "LEFT";
+        }
+        //$join .= " {$ljoin} JOIN {$wpdb->prefix}icl_translations t ON {$wpdb->posts}.ID = t.element_id 
+        //            AND t.element_type='post' {$cond} JOIN {$wpdb->prefix}icl_languages l ON t.language_code=l.code AND l.active=1";        
+        
+        //$post_type = get_query_var('post_type');        
+        
+        // determine post type
+        $db = debug_backtrace();
+        foreach($db as $o){
+            if($o['function']=='apply_filters_ref_array' && $o['args'][0]=='posts_join'){
+                $post_type =  $o['args'][1][1]->query_vars['post_type'];
+                break;       
+            }
+        }            
+        
+        if(is_array($post_type)){
+            $ptypes = array();
+            foreach($post_type as $ptype){                
+                if($this->is_translated_post_type($ptype)){
+                    $ptypes[] = 'post_' . $ptype;
+                }
+            }                
+            if(!empty($ptypes)){
+                $join .= " {$ljoin} JOIN {$wpdb->prefix}icl_translations t ON {$wpdb->posts}.ID = t.element_id 
+                        AND t.element_type IN ('".join("','", $ptypes)."') {$cond} JOIN {$wpdb->prefix}icl_languages l ON t.language_code=l.code AND l.active=1";                
+            }            
+        }elseif($post_type){
+            if($this->is_translated_post_type($post_type)){
+                $join .= " {$ljoin} JOIN {$wpdb->prefix}icl_translations t ON {$wpdb->posts}.ID = t.element_id 
+                        AND t.element_type = 'post_{$post_type}' {$cond} JOIN {$wpdb->prefix}icl_languages l ON t.language_code=l.code AND l.active=1";                
+            }elseif($post_type == 'any'){
+                $join .= " {$ljoin} JOIN {$wpdb->prefix}icl_translations t ON {$wpdb->posts}.ID = t.element_id 
+                        AND t.element_type LIKE 'post\\_%' {$cond} JOIN {$wpdb->prefix}icl_languages l ON t.language_code=l.code AND l.active=1";                                    
+            }
+        }else{
+            $ttypes = array_keys($this->get_translatable_documents(false));            
+            if(!empty($ttypes)){
+                foreach($ttypes as $k=>$v) $ttypes[$k] = 'post_' . $v;
+                $post_types = "'" . join("','",$ttypes) . "'";    
+                $join .= " {$ljoin} JOIN {$wpdb->prefix}icl_translations t ON {$wpdb->posts}.ID = t.element_id 
+                        AND t.element_type IN ({$post_types}) JOIN {$wpdb->prefix}icl_languages l ON t.language_code=l.code AND l.active=1";                                
+            }
+        }        
+        return $join;
+    }
+    
+    function posts_where_filter($where){
+        global $wpdb, $pagenow;
+        //exceptions
+        
+        //$post_type = get_query_var('post_type');
+        
+        // determine post type
+        $db = debug_backtrace();
+        foreach($db as $o){
+            if($o['function']=='apply_filters_ref_array' && $o['args'][0]=='posts_where'){
+                $post_type =  $o['args'][1][1]->query_vars['post_type'];
+                break;       
+            }
+        }            
+        
+        if(!$post_type) $post_type = 'post';
+        
+        if(is_array($post_type)){
+            $none_translated = true;
+            foreach($post_type as $ptype){
+                if($this->is_translated_post_type($ptype)){
+                    $none_translated = false;
+                }
+            }    
+            if($none_translated) return $where;
+        }else{
+            if(!$this->is_translated_post_type($post_type) && 'any' != $post_type){
+                return $where;
+            }
+        }
+        
+        if(isset($_POST['wp-preview']) && $_POST['wp-preview']=='dopreview' || is_preview()){
+            $is_preview = true;
+        }else{
+            $is_preview = false;
+        }
+        if($pagenow=='upload.php' || $pagenow=='media-upload.php' || is_attachment() || $is_preview){
+            return $where;    
+        }
+        
+        if('all' != $this->this_lang){ 
+            $cond = " AND t.language_code='{$wpdb->escape($this->get_current_language())}'";
+        }else{
+            $cond = '';
+        }
+                
+        $where .= $cond;
+        
+        return $where;
+    }
+
+    function comment_feed_join($join){
+        global $wpdb, $wp_query;        
+        $type = $wp_query->query_vars['post_type'] ? $wp_query->query_vars['post_type'] : 'post';
+        $wp_query->query_vars['is_comment_feed'] = true;
+        $join .= " JOIN {$wpdb->prefix}icl_translations t ON {$wpdb->comments}.comment_post_ID = t.element_id 
+                    AND t.element_type='post_{$type}' {$cond} AND t.language_code='{$wpdb->escape($this->this_lang)}'";
+        return $join;
+    }
+    
+    function language_filter(){
+        require_once ICL_PLUGIN_PATH . '/inc/cache.php';        
+        global $wpdb, $pagenow;
+        
+        /* preWP3 compatibility  - start */
+        if(ICL_PRE_WP3){
+            if($pagenow=='edit.php'){
+                $type = 'post';
+            }else{
+                $type = 'page';
+            }
+        }else{
+        /* preWP3 compatibility  - end */
+            $type = isset($_GET['post_type'])?$_GET['post_type']:'post';    
+        }
+        
+        if(!in_array($type, array('post','page')) && $this->settings['custom_posts_sync_option'][$type] != 1){
+            return;
+        }
+        
+        $active_languages = $this->get_active_languages();
+        
+        $post_status = get_query_var('post_status');
+        
+        $langs = icl_cache_get($type.'s_per_language#' . $post_status);
+        if(!$langs){
+
+            $extra_cond = "";
+            if($post_status){
+                $extra_cond .= " AND post_status = '" . $post_status . "'";
+            }
+            
+            $res = $wpdb->get_results("
+                SELECT language_code, COUNT(p.ID) AS c FROM {$wpdb->prefix}icl_translations t 
+                JOIN {$wpdb->posts} p ON t.element_id=p.ID
+                JOIN {$wpdb->prefix}icl_languages l ON t.language_code=l.code AND l.active = 1
+                WHERE p.post_type='{$type}' AND t.element_type='post_{$type}' {$extra_cond}
+                GROUP BY language_code            
+                ");         
+            foreach($res as $r){
+                $langs[$r->language_code] = $r->c;
+                $langs['all'] += $r->c;
+            } 
+            icl_cache_set($type.'s_per_language', $langs);
+            
+        }
+        
+        $active_languages[] = array('code'=>'all','display_name'=>__('All languages','sitepress'));
+        foreach($active_languages as $lang){
+            if($lang['code']== $this->this_lang){
+                $px = '<strong>'; 
+                $sx = ' <span class="count">('. intval($langs[$lang['code']]) .')<\/span><\/strong>';
+            }elseif(!isset($langs[$lang['code']])){
+                $px = '<span>';
+                $sx = '<\/span>';
+            }else{
+                if($post_status){
+                    $px = '<a href="?post_type='.$type.'&post_status='.$post_status.'&lang='.$lang['code'].'">';
+                }else{
+                    $px = '<a href="?post_type='.$type.'&lang='.$lang['code'].'">';
+                }                
+                $sx = '<\/a> <span class="count">('. intval($langs[$lang['code']]) .')<\/span>';
+            }
+            $as[] =  $px . $lang['display_name'] . $sx;
+        }
+        $allas = join(' | ', $as);
+        if($type == 'page' && !$this->get_icl_translation_enabled()){
+            $prot_link = '<span class="button" style="padding:4px;margin-top:10px;"><img align="baseline" src="' . ICL_PLUGIN_URL .'/res/img/icon16.png" width="16" height="16" style="margin-bottom:-4px" /> <a href="http://wpml.org/?page_id=3416";>' . 
+            __('How to translate', 'sitepress') . '<\/a>' . '<\/span>';
+        }else{
+            $prot_link = '';
+        }
+        ?>
+        <script type="text/javascript">       
+            jQuery(".subsubsub").append('<br /><span id="icl_subsubsub"><?php echo $allas ?><\/span><br /><?php echo $prot_link ?>');
+        </script>
+        <?php
+    }
+    
+    /*
+    function exclude_other_language_pages($s){
+        global $wpdb;
+        $excl_pages = $wpdb->get_col("
+            SELECT p.ID FROM {$wpdb->posts} p 
+            LEFT JOIN {$wpdb->prefix}icl_translations t ON (p.ID = t.element_id OR t.element_id IS NULL)
+            WHERE t.element_type='post' AND p.post_type='page' AND t.language_code <> '{$wpdb->escape($this->this_lang)}'
+            ");
+        return array_merge($s, $excl_pages);
+    }
+    */
+    
+    function exclude_other_language_pages2($arr){
+        global $wpdb;
+        $filtered_pages = array();
+        $excl_pages = $wpdb->get_col("
+            SELECT p.ID FROM {$wpdb->posts} p 
+            LEFT JOIN {$wpdb->prefix}icl_translations t ON (p.ID = t.element_id OR t.element_id IS NULL)
+            WHERE t.element_type='post_page' AND p.post_type='page' AND t.language_code <> '{$wpdb->escape($this->this_lang)}'
+            ");
+        foreach($arr as $page){
+            if(!in_array($page->ID,$excl_pages)){
+                $filtered_pages[] = $page;
+            }
+        }        
+        return $filtered_pages;
+    }
+    
+    function wp_dropdown_pages($output){        
+        global $wpdb;
+        if(isset($_POST['lang_switch'])){
+            $post_id = $wpdb->escape($_POST['lang_switch']);            
+            $lang = $wpdb->escape($_GET['lang']);
+            $parent = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID={$post_id}");
+            $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$parent}' AND element_type='post_page'");
+            $translated_parent_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_type='post_page' AND language_code='{$lang}'");
+            if($translated_parent_id){
+                $output = str_replace('selected="selected"','',$output);
+                $output = str_replace('value="'.$translated_parent_id.'"','value="'.$translated_parent_id.'" selected="selected"',$output);
+            }
+        }elseif(isset($_GET['lang']) && isset($_GET['trid'])){
+            $lang = $wpdb->escape($_GET['lang']);
+            $trid = $wpdb->escape($_GET['trid']);
+            $elements_id = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_type='post_page'");
+            foreach($elements_id as $element_id){
+                $parent = $wpdb->get_var("SELECT post_parent FROM {$wpdb->posts} WHERE ID={$element_id}");
+                $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$parent}' AND element_type='post_page'");
+                $translated_parent_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid='{$trid}' AND element_type='post_page' AND language_code='{$lang}'");
+                if($translated_parent_id) break;
+            }
+            if($translated_parent_id){
+                $output = str_replace('selected="selected"','',$output);
+                $output = str_replace('value="'.$translated_parent_id.'"','value="'.$translated_parent_id.'" selected="selected"',$output);
+            }            
+        }
+        if(!$output){
+            $output = '<select id="parent_id"><option value="">' . __('Main Page (no parent)','sitepress') . '</option></select>';
+        }
+        return $output;
+    }
+            
+    function edit_term_form($term){   
+        global $wpdb, $pagenow;
+        $element_id = $term->term_taxonomy_id;    
+        
+        /* preWP3 compatibility  - start */
+        if(ICL_PRE_WP3){
+            $icl_element_type = $pagenow=='categories.php'?'tax_category':'tax_post_tag';
+        }else{
+        /* preWP3 compatibility  - end */            
+            $element_type = isset($_GET['taxonomy']) ? $wpdb->escape($_GET['taxonomy']) : 'post_tag';
+            $icl_element_type = 'tax_' . $element_type;
+        }
+
+        $default_language = $this->get_default_language();
+        
+        if($element_id){
+            $res = $wpdb->get_row("SELECT trid, language_code, source_language_code 
+                FROM {$wpdb->prefix}icl_translations WHERE element_id='{$element_id}' AND element_type='{$icl_element_type}'");
+            $trid = $res->trid;
+            if($trid){                
+                $element_lang_code = $res->language_code;
+            }else{
+                $trid = $this->set_element_language_details($element_id, $icl_element_type, null, $default_language);
+                $element_lang_code = $default_language;
+            }                            
+        }else{
+            $trid = $_GET['trid'];
+            $element_lang_code = $_GET['lang'];
+        }
+        if($trid){
+            $translations = $this->get_element_translations($trid, $icl_element_type);        
+        }     
+        $active_languages = $this->get_active_languages();
+        $selected_language = $element_lang_code?$element_lang_code:$default_language;
+        
+        $source_language = $_GET['source_lang'];
+        $untranslated_ids = $this->get_elements_without_translations($icl_element_type, $selected_language, $default_language);
+        
+        /* preWP3 compatibility  - start */
+        if(ICL_PRE_WP3 && $icl_element_type == 'tax_category'){
+            include ICL_PLUGIN_PATH . '/menu/category-menu.php'; 
+        }else{
+        /* preWP3 compatibility  - end */
+            include ICL_PLUGIN_PATH . '/menu/taxonomy-menu.php';     
+        /* preWP3 compatibility  - start */
+        }
+        /* preWP3 compatibility  - end */
+              
+    }
+    
+    function wp_dropdown_cats_select_parent($html){
+        global $wpdb;        
+        if(isset($_GET['trid'])){
+            $element_type = $taxonomy = isset($_GET['taxonomy']) ? $_GET['taxonomy'] : 'post_tag';
+            $icl_element_type = 'tax_' . $element_type;
+            $trid = intval($_GET['trid']);
+            $source_lang = isset($_GET['source_lang']) ? $_GET['source_lang'] : $this->get_default_language();
+            $parent = $wpdb->get_var("
+                SELECT parent
+                FROM {$wpdb->term_taxonomy} tt 
+                    JOIN {$wpdb->prefix}icl_translations tr ON tr.element_id=tt.term_taxonomy_id 
+                        AND tr.element_type='{$icl_element_type}' AND tt.taxonomy='{$taxonomy}'
+                WHERE trid='{$trid}' AND tr.language_code='{$source_lang}'
+            ");
+            if($parent){
+                $parent = icl_object_id($parent, $element_type);                
+                $html = str_replace('value="'.$parent.'"', 'value="'.$parent.'" selected="selected"', $html);                
+            }
+        }
+        return $html;
+    }
+    
+    function add_language_selector_to_page($active_languages, $selected_language, $translations, $element_id, $type) {        
+        ?>
+        <div id="icl_tax_menu" style="display:none">
+        
+        <div id="dashboard-widgets" class="metabox-holder">
+        <div class="postbox-container" style="width: 99%;line-height:normal;">
+        
+        <div id="icl_<?php echo $type ?>_lang" class="postbox" style="line-height:normal;">
+            <h3 class="hndle">
+                <span><?php echo __('Language', 'sitepress')?></span>
+            </h3>                    
+            <div class="inside" style="padding: 10px;">
+        
+        <select name="icl_<?php echo $type ?>_language">
+        
+            <?php
+                foreach($active_languages as $lang){
+                    if ($lang['code'] == $selected_language) {
+                        ?>
+                        <option value="<?php echo $selected_language ?>" selected="selected"><?php echo $lang['display_name'] ?></option>
+                        <?php
+                    }
+                }
+            ?>
+            
+            <?php foreach($active_languages as $lang):?>   
+                <?php if($lang['code'] == $selected_language || (isset($translations[$lang['code']]->element_id) && $translations[$lang['code']]->element_id != $element_id)) continue ?>     
+                    <option value="<?php echo $lang['code'] ?>"<?php if($selected_language==$lang['code']): ?> selected="selected"<?php endif;?>><?php echo $lang['display_name'] ?></option>
+            <?php endforeach; ?>
+        </select>
+        <?php
+        }
+        
+    function get_category_name($id) {
+        global $wpdb;
+        $term_id = $wpdb->get_var("SELECT term_id FROM {$wpdb->prefix}term_taxonomy WHERE term_taxonomy_id = {$id}");
+        if ($term_id) {
+            return $wpdb->get_var("SELECT name FROM {$wpdb->prefix}terms WHERE term_id = {$term_id}");
+        } else {
+            return null;
+        }
+    }
+        
+    function add_translation_of_selector_to_page($trid,
+                                                 $selected_language,
+                                                 $default_language,
+                                                 $source_language,
+                                                 $untranslated_ids,
+                                                 $element_id,
+                                                 $type) {
+        global $wpdb;
+        ?>
+        <input type="hidden" name="icl_trid" value="<?php echo $trid ?>" />
+
+        <?php if($selected_language != $default_language): ?>
+            <br /><br />
+            <?php echo __('This is a translation of', 'sitepress') ?><br />
+            <select name="icl_translation_of" id="icl_translation_of"<?php if($_GET['action'] != 'edit' && $trid) echo " disabled"?>>
+                <?php if($source_language == null || $source_language == $default_language): ?>
+                    <?php if($trid): ?>
+                        <option value="none"><?php echo __('--None--', 'sitepress') ?></option>
+                        <?php
+                            //get source
+                            $src_language_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$trid} AND language_code='{$default_language}'");
+                            if(!$src_language_id) {
+                                // select the first id found for this trid
+                                $src_language_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$trid}");
+                            }
+                            if($src_language_id && $src_language_id != $element_id) {
+                                $src_language_title = $this->get_category_name($src_language_id);
+                            }
+                        ?>
+                        <?php if($src_language_title): ?>
+                            <option value="<?php echo $src_language_id ?>" selected="selected"><?php echo $src_language_title ?></option>
+                        <?php endif; ?>
+                    <?php else: ?>
+                        <option value="none" selected="selected"><?php echo __('--None--', 'sitepress') ?></option>
+                    <?php endif; ?>
+                    <?php foreach($untranslated_ids as $translation_of_id):?>
+                        <?php if ($translation_of_id != $src_language_id): ?>
+                            <?php $title = $this->get_category_name($translation_of_id)?>
+                            <?php if ($title): ?>
+                                <option value="<?php echo $translation_of_id ?>"><?php echo $title ?></option>
+                            <?php endif; ?>
+                        <?php endif; ?>
+                    <?php endforeach; ?>
+                <?php else: ?>
+                    <?php if($trid): ?>
+                        <?php
+                            // add the source language
+                            $src_language_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid={$trid} AND language_code='{$source_language}'");
+                            if($src_language_id) {
+                                $src_language_title = $this->get_category_name($src_language_id);
+                            }
+                        ?>
+                        <?php if($src_language_title): ?>
+                            <option value="<?php echo $src_language_id ?>" selected="selected"><?php echo $src_language_title ?></option>
+                        <?php endif; ?>
+                    <?php else: ?>
+                        <option value="none" selected="selected"><?php echo __('--None--', 'sitepress') ?></option>
+                    <?php endif; ?>
+                <?php endif; ?>
+            </select>
+        
+        <?php endif; ?>
+        
+        
+        <?php
+    }
+    
+    function add_translate_options($trid,
+                                   $active_languages,
+                                   $selected_language,
+                                   $translations,
+                                   $type) {
+        global $wpdb;
+        ?>
+        
+        <?php if($trid && $_GET['action'] == 'edit'): ?>
+        
+            <div id="icl_translate_options">
+        
+            <?php
+                // count number of translated and un-translated pages.
+                $translations_found = 0;
+                $untranslated_found = 0;
+                foreach($active_languages as $lang) {
+                    if($selected_language==$lang['code']) continue;
+                    if(isset($translations[$lang['code']]->element_id)) {
+                        $translations_found += 1;
+                    } else {
+                        $untranslated_found += 1;
+                    }
+                }
+            ?>
+            
+            <?php if($untranslated_found > 0): ?>    
+                <p style="clear:both;"><b>Translate</b>
+                <table cellspacing="1">
+                <?php foreach($active_languages as $lang): if($selected_language==$lang['code']) continue; ?>
+                <tr>
+                    <?php if(!isset($translations[$lang['code']]->element_id)):?>
+                        <td style="padding: 0px;line-height:normal;"><?php echo $lang['display_name'] ?></td>
+                        <?php
+                            /* preWP3 compatibility  - start */
+                            if(ICL_PRE_WP3){
+                                if ($type == 'tax_post_tag') {
+                                    $add_link = "edit-tags.php?trid=" . $trid . "&amp;lang=" . $lang['code'] . "&amp;source_lang=" . $selected_language;
+                                } else {
+                                    $add_link = "categories.php?trid=" . $trid . "&amp;lang=" . $lang['code'] . "&amp;source_lang=" . $selected_language;
+                                }
+                            }else
+                            /* preWP3 compatibility  - end */
+                            {
+                                $taxonomy = $_GET['taxonomy'];
+                                $add_link = "edit-tags.php?taxonomy=".$taxonomy."&amp;trid=" . $trid . "&amp;lang=" . $lang['code'] . "&amp;source_lang=" . $selected_language;
+                            }
+                        ?>
+                        <td style="padding: 0px;line-height:normal;"><a href="<?php echo $add_link ?>"><?php echo __('add','sitepress') ?></a></td>
+                    <?php endif; ?>        
+                </tr>
+                <?php endforeach; ?>
+                </table>
+                </p>
+            <?php endif; ?>
+        
+            <?php if($translations_found > 0): ?>    
+            <p style="clear:both;margin:5px 0 5px 0">
+                <b><?php _e('Translations', 'sitepress') ?></b> 
+                (<a class="icl_toggle_show_translations" href="#" <?php if(!$this->settings['show_translations_flag']):?>style="display:none;"<?php endif;?>><?php _e('hide','sitepress')?></a><a class="icl_toggle_show_translations" href="#" <?php if($this->settings['show_translations_flag']):?>style="display:none;"<?php endif;?>><?php _e('show','sitepress')?></a>)                
+                <table cellspacing="1" width="100%" id="icl_translations_table" style="<?php if(!$this->settings['show_translations_flag']):?>display:none;<?php endif;?>margin-left:0;">
+                
+                <?php foreach($active_languages as $lang): if($selected_language==$lang['code']) continue; ?>
+                <tr>
+                    <?php if(isset($translations[$lang['code']]->element_id)):?>
+                        <td style="line-height:normal;"><?php echo $lang['display_name'] ?></td>
+                        <?php
+                            /* preWP3 compatibility  - start */
+                            if(ICL_PRE_WP3){
+                                if ($type == 'tax_post_tag') {
+                                    $edit_link = "edit-tags.php?action=edit&amp;tag_ID=" . $translations[$lang['code']]->term_id . "&amp;lang=" . $lang['code'];
+                                } else {
+                                    $edit_link = "categories.php?action=edit&amp;cat_ID=" . $translations[$lang['code']]->term_id . "&amp;lang=" . $lang['code'];
+                                }
+                            }else
+                            /* preWP3 compatibility  - end */
+                            {
+                                $taxonomy = $_GET['taxonomy'];
+                                $edit_link = "edit-tags.php?taxonomy=".$taxonomy."&amp;action=edit&amp;tag_ID=" . $translations[$lang['code']]->term_id . "&amp;lang=" . $lang['code'];
+                            }
+                        ?>
+                        <td align="right" width="30%" style="line-height:normal;"><?php echo isset($translations[$lang['code']]->name)?'<a href="'.$edit_link.'" title="'.__('Edit','sitepress').'">'.$translations[$lang['code']]->name.'</a>':__('n/a','sitepress') ?></td>
+                                
+                    <?php endif; ?>        
+                </tr>
+                <?php endforeach; ?>
+                </table>
+                
+                
+                
+            <?php endif; ?>
+            
+            <br clear="all" style="line-height:1px;" />
+            
+            </div>
+        <?php endif; ?>
+        
+        
+        <?php
+    }
+    
+    function create_term($cat_id, $tt_id){        
+        global $wpdb, $wp_taxonomies;
+        
+        // case of ajax inline category creation
+        // ajax actions
+        foreach($wp_taxonomies as $ktx=>$tx){
+            $ajx_actions[] = 'add-' . $ktx;
+        }        
+        if(isset($_POST['_ajax_nonce']) && in_array($_POST['action'], $ajx_actions)){
+            $referer = $_SERVER['HTTP_REFERER'];
+            $url_pieces = parse_url($referer);
+            parse_str($url_pieces['query'], $qvars);
+            if($qvars['post']>0){
+                $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID = '{$qvars['post']}'");
+                $lang_details = $this->get_element_language_details($qvars['post'],'post_' . $post_type);
+                $term_lang = $lang_details->language_code;
+            }else{
+                $term_lang = isset($qvars['lang']) ? $qvars : $this->get_default_language();
+            }
+        }
+
+        $el_type = $wpdb->get_var("SELECT taxonomy FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id={$tt_id}");
+        
+        if(!$this->is_translated_taxonomy($el_type)){
+            return;
+        };
+        
+        $icl_el_type = 'tax_' . $el_type; 
+        
+        // case of adding a tag via post save
+        if($_POST['action']=='editpost'){
+            $term_lang = $_POST['icl_post_language'];        
+        }elseif($_POST['action']=='post-quickpress-publish'){
+            $term_lang = $this->get_default_language();
+        }elseif($_POST['action']=='inline-save-tax'){
+            $lang_details = $this->get_element_language_details($tt_id, $icl_el_type);
+            $term_lang = $lang_details->language_code;
+        }elseif($_POST['action']=='inline-save'){
+            $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID=" . $_POST['post_ID']);
+            $lang_details = $this->get_element_language_details($_POST['post_ID'], 'post_' . $post_type);
+            $term_lang = $lang_details->language_code;
+        }
+
+        // has trid only when it's a translation of another tag             
+        $trid = isset($_POST['icl_trid']) && (isset($_POST['icl_'.$icl_el_type.'_language'])) ? $_POST['icl_trid']:null;        
+        // see if we have a "translation of" setting.
+        if ($_POST['icl_translation_of']) {
+            $src_term_id = $_POST['icl_translation_of'];
+            if ($src_term_id != 'none') {
+                $res = $wpdb->get_row("SELECT trid, language_code 
+                    FROM {$wpdb->prefix}icl_translations WHERE element_id={$src_term_id} AND element_type='{$icl_el_type}'"); 
+                $trid = $res->trid;
+                $src_language = $res->language_code;
+            } else {
+                $trid = null;
+            }
+        }
+        
+        if(!isset($term_lang)){
+            $term_lang = $_POST['icl_'.$icl_el_type.'_language'];        
+        }        
+        if(isset($_POST['action']) && $_POST['action']=='inline-save-tax'){
+            $trid = $this->get_element_trid($tt_id, $icl_el_type);
+        }
+                
+        $this->set_element_language_details($tt_id, $icl_el_type, $trid, $term_lang, $src_language);                
+    }
+    
+    function get_language_for_term($term_id, $el_type) {
+        global $wpdb;
+        $term_id = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->prefix}term_taxonomy WHERE term_id = {$term_id}");
+        if ($term_id) {
+            return $wpdb->get_var("SELECT language_code FROM {$wpdb->prefix}icl_translations WHERE element_id = {$term_id} AND element_type = '{$el_type}'");
+        } else {
+            return $this->get_default_language();
+        }
+        
+    }
+    
+    function pre_term_name($value, $taxonomy){
+        //allow adding terms with the same name in different languages
+        global $wpdb;
+        //check if term exists
+        $term_id = $wpdb->get_var("SELECT term_id FROM {$wpdb->terms} WHERE name='".$wpdb->escape($value)."'");
+        // translate to WPML notation
+        $taxonomy = 'tax_' . $taxonomy;
+        if(!empty($term_id)){
+            if(isset($_POST['icl_'.$taxonomy.'_language'])) {
+                // see if the term_id is for a different language
+                $this_lang = $_POST['icl_'.$taxonomy.'_language'];
+                if ($this_lang != $this->get_language_for_term($term_id, $taxonomy)) {
+                    if ($this_lang != $this->get_default_language()){
+                        $value .= ' @'.$_POST['icl_'.$taxonomy.'_language'];
+                    }
+                }
+            }
+        }        
+        return $value;
+    }
+    
+    function pre_save_category(){
+        // allow adding categories with the same name in different languages
+        global $wpdb;
+        if(isset($_POST['action']) && $_POST['action']=='add-cat'){
+            if(category_exists($_POST['cat_name']) && isset($_POST['icl_category_language']) && $_POST['icl_category_language'] != $this->get_default_language()){
+                $_POST['cat_name'] .= ' @'.$_POST['icl_category_language'];    
+            }
+        }
+    }
+    
+    function delete_term($cat, $tt_id, $taxonomy){
+        global $wpdb;
+        $taxonomy = 'tax_' . $taxonomy;
+        $wpdb->query("DELETE FROM {$wpdb->prefix}icl_translations WHERE element_type ='{$taxonomy}' AND element_id='{$tt_id}' LIMIT 1");
+    } 
+       
+    function terms_language_filter(){
+        global $wpdb, $pagenow;
+        
+        /* preWP3 compatibility  - start */
+        if(ICL_PRE_WP3){
+            if($pagenow=='categories.php'){
+                $taxonomy = 'category';
+            }else{
+                $taxonomy = 'post_tag';
+            }            
+        }else
+        /* preWP3 compatibility  - end */            
+        {
+            $taxonomy = isset($_GET['taxonomy']) ? $_GET['taxonomy'] : 'post_tag';
+        }
+        $icl_element_type = 'tax_' . $taxonomy;
+        
+        $active_languages = $this->get_active_languages();
+        
+        $res = $wpdb->get_results("
+            SELECT language_code, COUNT(tm.term_id) AS c FROM {$wpdb->prefix}icl_translations t 
+            JOIN {$wpdb->term_taxonomy} tt ON t.element_id = tt.term_taxonomy_id
+            JOIN {$wpdb->terms} tm ON tt.term_id = tm.term_id
+            JOIN {$wpdb->prefix}icl_languages l ON t.language_code = l.code
+            WHERE t.element_type='{$icl_element_type}' AND tt.taxonomy='{$taxonomy}' AND l.active=1
+            GROUP BY language_code            
+            ");                 
+        foreach($res as $r){
+            $langs[$r->language_code] = $r->c;
+            $langs['all'] += $r->c;
+        } 
+        $active_languages[] = array('code'=>'all','display_name'=>__('All languages','sitepress'));
+        foreach($active_languages as $lang){
+            if($lang['code']== $this->this_lang){
+                $px = '<strong>'; 
+                $sx = ' ('. intval($langs[$lang['code']]) .')<\/strong>';
+            /*
+            }elseif(!isset($langs[$lang['code']])){
+                $px = '<span>';
+                $sx = '<\/span>';
+            */
+            }else{
+                $px = '<a href="?taxonomy='.$taxonomy.'&amp;lang='.$lang['code'].'">';
+                $sx = '<\/a> ('. intval($langs[$lang['code']]) .')';
+            }
+            $as[] =  $px . $lang['display_name'] . $sx;
+        }
+        $allas = join(' | ', $as);
+        ?>
+        <script type="text/javascript">
+            jQuery('table.widefat').before('<span id="icl_subsubsub"><?php echo $allas ?><\/span>');
+        </script>
+        <?php
+    }    
+    
+    function exclude_other_terms($exclusions, $args){                
+        // get_terms doesn't seem to hava a filter that can be used efficiently in order to filter the terms by language
+        // in addition the taxonomy name is not being passed to this filter we're using 'list_terms_exclusions'
+        // getting the taxonomy name from debug_backtrace
+                
+        global $wpdb, $pagenow;    
+        /* preWP3 compatibility  - start */
+        if(ICL_PRE_WP3){
+            $taxonomy = isset($_GET['taxonomy']) ? $_GET['taxonomy'] : $args['type'];
+            if(!$taxonomy) $taxonomy = 'post_tag';
+            if(isset($_GET['cat_ID']) && $_GET['cat_ID']){
+                $_GET['tag_ID'] = $_GET['cat_ID'];
+            }
+            
+        }
+        /* preWP3 compatibility  - end */                    
+        else{
+            
+            if(isset($_GET['taxonomy'])){
+                $taxonomy = $_GET['taxonomy'];    
+            }elseif(isset($args['taxonomy'])){
+                $taxonomy = $args['taxonomy'];    
+            }elseif(isset($_POST['action']) && $_POST['action']=='get-tagcloud'){                
+                $taxonomy = $_POST['tax'];    
+            }else{
+                if(in_array($pagenow, array('post-new.php','post.php', 'edit.php'))){
+                    $dbt = debug_backtrace();                    
+                    $taxonomy = $dbt[3]['args'][0];    
+                }else{                    
+                    $taxonomy = 'post_tag';
+                }
+            }
+        }
+                
+        if(!$this->is_translated_taxonomy($taxonomy)){
+            return $exclusions;
+        }
+        
+        $icl_element_type = 'tax_' . $taxonomy;
+        
+        if($_GET['lang']=='all'){
+            return $exclusions;
+        }
+        if(isset($_GET['tag_ID']) && $_GET['tag_ID']){
+            $element_lang_details = $this->get_element_language_details($wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id='{$_GET['tag_ID']}' AND taxonomy='{$taxonomy}'"),$icl_element_type);            
+            $this_lang = $element_lang_details->language_code;
+        }elseif($this->this_lang != $this->get_default_language()){
+            $this_lang = $this->get_current_language();
+        }elseif(isset($_GET['post'])){
+            $icl_post_type = isset($_GET['post_type']) ? 'post_' . $_GET['post_type'] : 'post_'. $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID = '".$wpdb->escape($_GET['post'])."'");
+            $element_lang_details = $this->get_element_language_details($_GET['post'],$icl_post_type);
+            $this_lang = $element_lang_details->language_code;
+        }elseif(isset($_POST['action']) && ($_POST['action']=='get-tagcloud' || $_POST['action']=='menu-quick-search')){
+            $urlparts = parse_url($_SERVER['HTTP_REFERER']); 
+            parse_str($urlparts['query'], $qvars);
+            $this_lang = $qvars['lang']; 
+        }else{
+            $this_lang = $this->get_default_language();
+        }          
+        $exclude =  $wpdb->get_col("
+            SELECT tt.term_taxonomy_id FROM {$wpdb->term_taxonomy} tt
+            LEFT JOIN {$wpdb->terms} tm ON tt.term_id = tm.term_id 
+            LEFT JOIN {$wpdb->prefix}icl_translations t ON (tt.term_taxonomy_id = t.element_id OR t.element_id IS NULL)
+            WHERE tt.taxonomy='{$taxonomy}' AND t.element_type='{$icl_element_type}' AND t.language_code <> '{$this_lang}'
+            ");        
+        $exclude[] = 0;         
+        $exclusions .= ' AND tt.term_taxonomy_id NOT IN ('.join(',',$exclude).')';        
+        return $exclusions;
+    }
+  
+    function set_wp_query(){
+        global $wp_query;
+        $this->wp_query = $wp_query;
+    }
+    
+    // filter for WP home_url function
+    function home_url($url, $path, $orig_scheme, $blog_id){
+        // only apply this for home url - not for posts or page permalinks since this filter is called there too
+        if(did_action('template_redirect') && rtrim($url,'/') == rtrim(get_option('home'),'/')){
+            $url = $this->convert_url($url);
+        }
+        return $url;
+    }
+    
+    // converts WP generated url to language specific based on plugin settings
+    function convert_url($url, $code=null){
+        if(is_null($code)){
+            $code = $this->this_lang;
+        }
+        
+        if($code && $code != $this->get_default_language()){
+            $abshome = preg_replace('@\?lang=' . $code . '@i','',get_option('home'));
+            switch($this->settings['language_negotiation_type']){
+                case '1':            
+                    if(0 === strpos($url, 'https://')){
+                        $abshome = preg_replace('#^http://#', 'https://', $abshome);
+                    }
+                    if($abshome==$url) $url .= '/';
+                    $url = str_replace($abshome, $abshome . '/' . $code, $url);
+                    break;
+                case '2': 
+                    $url = str_replace($abshome, $this->settings['language_domains'][$code], $url);
+                    break;                
+                case '3':
+                default:
+                    if(false===strpos($url,'?')){
+                        $url_glue = '?';
+                    }else{
+                        if(isset($_POST['comment'])){ // will be used for a redirect
+                            $url_glue = '&';
+                        }else{
+                            $url_glue = '&amp;';
+                        }                                                
+                    }                    
+                    $url .= $url_glue . 'lang=' . $code;
+            }
+        }
+      return $url;  
+    } 
+        
+    function language_url($code=null){
+        if(is_null($code)) $code = $this->this_lang;
+        $abshome = get_option('home');
+        if($this->settings['language_negotiation_type'] == 1 || $this->settings['language_negotiation_type'] == 2){
+            $url = trailingslashit($this->convert_url($abshome, $code));  
+        }else{
+            $url = $this->convert_url($abshome, $code);
+        }        
+        return $url;
+    }
+    
+    function permalink_filter($p, $pid){ 
+        global $wpdb;
+        if(is_object($pid)){                        
+            $pid = $pid->ID;
+        }
+        if($pid == (int)get_option('page_on_front')){
+            /* preWP3 compatibility  - start */
+            if(ICL_PRE_WP3){
+                $p = $this->convert_url($p, $this->get_current_language());
+            }            
+            /* preWP3 compatibility  - end */
+            return $p;
+        }                
+        $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID={$pid}");
+        $element_lang_details = $this->get_element_language_details($pid,'post_'.$post_type);                
+        if($element_lang_details->language_code && $this->get_default_language() != $element_lang_details->language_code){
+            $p = $this->convert_url($p, $element_lang_details->language_code);
+        }elseif(isset($_POST['action']) && $_POST['action']=='sample-permalink'){ // check whether this is an autosaved draft 
+            $exp = explode('?', $_SERVER["HTTP_REFERER"]);
+            if(isset($exp[1])) parse_str($exp[1], $args);        
+            if(isset($args['lang']) && $this->get_default_language() != $args['lang']){
+                $p = $this->convert_url($p, $args['lang']);
+            }
+        }
+        if(is_feed()){
+            $p = str_replace("&lang=", "&#038;lang=", $p);
+        }
+        return $p;
+    }    
+    
+    function category_permalink_filter($p, $cat_id){
+        global $wpdb;
+        if (isset($this->icl_term_taxonomy_cache)) {
+            $term_cat_id = $this->icl_term_taxonomy_cache->get('category_'.$cat_id);
+        } else {
+            $term_cat_id = null;
+        }
+        if (!$term_cat_id) {
+            $term_cat_id = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id={$cat_id} AND taxonomy='category'");
+            if (isset($this->icl_term_taxonomy_cache)) {
+                $this->icl_term_taxonomy_cache->set('category_'.$cat_id, $term_cat_id);
+            }
+        }
+        $cat_id = $term_cat_id;
+        
+        $element_lang_details = $this->get_element_language_details($cat_id,'tax_category');
+        if($this->get_default_language() != $element_lang_details->language_code){
+            $p = $this->convert_url($p, $element_lang_details->language_code);
+        }
+        return $p;
+    }  
+          
+    function tax_permalink_filter($p, $tag){
+        global $wpdb;        
+        if(is_object($tag)){                        
+            $tag_id = $tag->term_taxonomy_id;
+            $taxonomy = $tag->taxonomy;
+        }else{
+            $taxonomy = 'post_tag';
+            if (!$tag_id) {
+                $tag_id = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id={$tag} AND taxonomy='{$taxonomy}'");
+                if (isset($this->icl_term_taxonomy_cache)) {
+                    $this->icl_term_taxonomy_cache->set($taxonomy . '_'.$tag, $tag_id);
+                }
+            }
+        }        
+        $element_lang_details = $this->get_element_language_details($tag_id,'tax_' . $taxonomy);
+        
+        if($this->get_default_language() != $element_lang_details->language_code){
+            $p = $this->convert_url($p, $element_lang_details->language_code);            
+        }
+        return $p;
+    }            
+    
+    function get_comment_link_filter($link){
+        // decode html characters since they are already encoded in the template for some reason
+        $link = html_entity_decode($link);
+        return $link;
+    }
+     
+    function get_ls_languages($template_args=array()){
+            global $wpdb, $post, $cat, $tag_id, $w_this_lang;
+            
+            if(is_null($this->wp_query)) $this->set_wp_query();
+             
+             // use original wp_query for this
+             // backup current $wp_query
+             global $wp_query;
+             $_wp_query_back = clone $wp_query;
+             $wp_query = $this->wp_query;
+             
+             
+            $w_active_languages = $this->get_active_languages();                                    
+            $this_lang = $this->this_lang;
+            if($this_lang=='all'){
+                $w_this_lang = array(
+                    'code'=>'all',
+                    'english_name' => 'All languages',
+                    'display_name' => __('All languages', 'sitepress')
+                );                
+            }else{
+                $w_this_lang = $this->get_language_details($this_lang);
+            }
+                       
+            if(isset($template_args['skip_missing'])){
+                //override default setting
+                $icl_lso_link_empty = !$template_args['skip_missing'];
+            }else{
+                $icl_lso_link_empty = $this->settings['icl_lso_link_empty'];
+            }                      
+                       
+            $user_agent = $_SERVER['HTTP_USER_AGENT'];
+            if(preg_match('#MSIE ([0-9]+)\.[0-9]#',$user_agent,$matches)){
+                $ie_ver = $matches[1];
+            }    
+            if(is_singular() && !empty($wp_query->posts)){
+                $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$this->wp_query->post->ID}' AND element_type LIKE 'post\\_%'");                     
+                $translations = $this->get_element_translations($trid,'post_'.$wp_query->posts[0]->post_type);
+            }elseif(is_category() && !empty($wp_query->posts)){                
+                $cat_id = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id={$cat} AND taxonomy='category'");
+                $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$cat_id}' AND element_type='tax_category'");                
+                $skip_empty = true;
+                $translations = $this->get_element_translations($trid,'tax_category', $skip_empty);                
+            }elseif(is_tag() && !empty($wp_query->posts)){                
+                $tag_id = $wpdb->get_var("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE term_id={$tag_id} AND taxonomy='post_tag'");
+                $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$tag_id}' AND element_type='tax_post_tag'");                
+                $skip_empty = true;
+                $translations = $this->get_element_translations($trid,'tax_post_tag', $skip_empty);             
+            }elseif(is_tax()){                
+                $tax_id = $wpdb->get_var("SELECT term_taxonomy_id 
+                    FROM {$wpdb->term_taxonomy} WHERE term_id='".$wp_query->get_queried_object_id()."' AND taxonomy='".$wpdb->escape(get_query_var('taxonomy'))."'");                
+                $trid = $this->get_element_trid($tax_id, 'tax_' . get_query_var('taxonomy'));
+                $translations = $this->get_element_translations($trid,'tax_' . get_query_var('taxonomy'), $skip_empty);                
+            }elseif(is_archive() && !empty($wp_query->posts)){                      
+                $translations = array();
+            }elseif( 'page' == get_option('show_on_front') && ($this->wp_query->queried_object_id == get_option('page_on_front') || $this->wp_query->queried_object_id == get_option('page_for_posts')) ){
+                $trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id='{$this->wp_query->queried_object_id}' AND element_type='post_page'");                
+                $translations = $this->get_element_translations($trid,'post_page');                                
+            }else{
+                $wp_query->is_singular = false;
+                $wp_query->is_archive = false;
+                $wp_query->is_category = false;
+                $wp_query->is_404 = true;
+            }
+                                                                                                                                                                 
+            foreach($w_active_languages as $k=>$lang){                
+                $skip_lang = false;
+                if(is_singular() || ($this->wp_query->queried_object_id && $this->wp_query->queried_object_id == get_option('page_for_posts'))){                 
+                    $this_lang_tmp = $this->this_lang; 
+                    $this->this_lang = $lang['code']; 
+                    $lang_page_on_front = get_option('page_on_front');                     
+                    $lang_page_for_posts = get_option('page_for_posts');                                         
+                    $this->this_lang = $this_lang_tmp; 
+                    if ( 'page' == get_option('show_on_front') && $translations[$lang['code']]->element_id == $lang_page_on_front ){
+                        $lang['translated_url'] = $this->language_url($lang['code']); 
+                    }elseif('page' == get_option('show_on_front') && $translations[$lang['code']]->element_id && $translations[$lang['code']]->element_id == $lang_page_for_posts){
+                        if($lang_page_for_posts){
+                            $lang['translated_url'] = get_permalink($lang_page_for_posts);
+                        }else{
+                            $lang['translated_url'] = $this->language_url($lang['code']);
+                        } 
+                    }else{                        
+                        if(isset($translations[$lang['code']]->post_title)){
+                            $lang['translated_url'] = get_permalink($translations[$lang['code']]->element_id);
+                        }else{
+                            if($icl_lso_link_empty){
+                                $lang['translated_url'] = $this->language_url($lang['code']);
+                            }else{
+                                $skip_lang = true;
+                            }                        
+                        }
+                    }
+                }elseif(is_tax()){                     
+                    if(isset($translations[$lang['code']])){
+                        if($this->settings['auto_adjust_ids']){
+                            global $icl_adjust_id_url_filter_off;  // force  the category_link_adjust_id to not modify this
+                            $icl_adjust_id_url_filter_off = true;
+                        }
+                        $lang['translated_url'] = get_term_link((int)$translations[$lang['code']]->term_id, get_query_var('taxonomy'));     
+                        if($this->settings['auto_adjust_ids']){
+                            $icl_adjust_id_url_filter_off = false; // restore default bahavior
+                        }                                                
+                    }else{  
+                        if($icl_lso_link_empty){
+                            $lang['translated_url'] = $this->language_url($lang['code']);
+                        }else{
+                            $skip_lang = true;
+                        }                        
+                    }
+                }elseif(is_category()){                      
+                    if(isset($translations[$lang['code']])){
+                        if($this->settings['auto_adjust_ids']){
+                            global $icl_adjust_id_url_filter_off;  // force  the category_link_adjust_id to not modify this
+                            $icl_adjust_id_url_filter_off = true;
+                        }
+                        $lang['translated_url'] = get_category_link($translations[$lang['code']]->term_id);
+                        if($this->settings['auto_adjust_ids']){
+                            $icl_adjust_id_url_filter_off = false; // restore default bahavior
+                        }                        
+                    }else{  
+                        if($icl_lso_link_empty){
+                            $lang['translated_url'] = $this->language_url($lang['code']);
+                        }else{
+                            $skip_lang = true;
+                        }                        
+                    }
+                }elseif(is_tag()){                                     
+                    if(isset($translations[$lang['code']])){
+                        if($this->settings['auto_adjust_ids']){
+                            global $icl_adjust_id_url_filter_off;  // force  the category_link_adjust_id to not modify this
+                            $icl_adjust_id_url_filter_off = true;
+                        }
+                        $lang['translated_url'] = get_tag_link($translations[$lang['code']]->term_id);
+                        if($this->settings['auto_adjust_ids']){
+                            $icl_adjust_id_url_filter_off = false; // restore default bahavior
+                        }                                                
+                    }else{
+                        if($icl_lso_link_empty){
+                            $lang['translated_url'] = $this->language_url($lang['code']);
+                        }else{
+                            $skip_lang = true;
+                        }                        
+                    }                    
+                }elseif(is_author()){     
+                    global $authordata;
+                    $post_type = get_query_var('post_type') ? get_query_var('post_type') : 'post';
+                    if($wpdb->get_var("SELECT COUNT(p.ID) FROM {$wpdb->posts} p 
+                    JOIN {$wpdb->prefix}icl_translations t ON p.ID=t.element_id AND t.element_type = 'post_{$post_type}' 
+                    WHERE p.post_author='{$authordata->ID}' AND post_type='{$post_type}' AND post_status='publish' AND language_code='{$lang['code']}'")
+                    ){
+                        remove_filter('home_url', array($this,'home_url'), 1, 4);          
+                        $author_url = get_author_posts_url($authordata->ID);
+                        add_filter('home_url', array($this,'home_url'), 1, 4);          
+                        $lang['translated_url'] = $this->convert_url($author_url, $lang['code']);                                     
+                        
+                    }else{
+                        if($icl_lso_link_empty){
+                            $lang['translated_url'] = $this->language_url($lang['code']);
+                        }else{
+                            $skip_lang = true;
+                        }                        
+                    }
+                }elseif(is_archive() && !is_tag()){
+                    global $icl_archive_url_filter_off;
+                    $icl_archive_url_filter_off = true;
+                    if($this->wp_query->is_year){
+                        if(isset($this->wp_query->query_vars['m']) && !$this->wp_query->query_vars['year'] ){
+                            $this->wp_query->query_vars['year'] = substr($this->wp_query->query_vars['m'], 0, 4);
+                        }                        
+                        $lang['translated_url'] = $this->archive_url(get_year_link( $this->wp_query->query_vars['year'] ), $lang['code']);
+                    }elseif($this->wp_query->is_month){
+                        if(isset($this->wp_query->query_vars['m']) && !$this->wp_query->query_vars['year'] ){
+                            $this->wp_query->query_vars['year'] = substr($this->wp_query->query_vars['m'], 0, 4);
+                            $this->wp_query->query_vars['monthnum'] = substr($this->wp_query->query_vars['m'], 4, 2);
+                        }
+                        $lang['translated_url'] = $this->archive_url(get_month_link( $this->wp_query->query_vars['year'], $this->wp_query->query_vars['monthnum'] ), $lang['code']);
+                    }elseif($this->wp_query->is_day){
+                        if(isset($this->wp_query->query_vars['m']) && !$this->wp_query->query_vars['year'] ){
+                            $this->wp_query->query_vars['year'] = substr($this->wp_query->query_vars['m'], 0, 4);
+                            $this->wp_query->query_vars['monthnum'] = substr($this->wp_query->query_vars['m'], 4, 2);
+                            $this->wp_query->query_vars['day'] = substr($this->wp_query->query_vars['m'], 6, 2);
+                            gmdate('Y', current_time('timestamp')); //force wp_timezone_override_offset to be called
+                        }
+                        $lang['translated_url'] = $this->archive_url(get_day_link( $this->wp_query->query_vars['year'], $this->wp_query->query_vars['monthnum'], $this->wp_query->query_vars['day'] ), $lang['code']);
+                    }
+                    $icl_archive_url_filter_off = false;
+                }elseif(is_search()){                    
+                    $url_glue = strpos($this->language_url($lang['code']),'?')===false ? '?' : '&';
+                    $lang['translated_url'] = $this->language_url($lang['code']) . $url_glue . 's=' . htmlspecialchars($_GET['s']);                                        
+                }else{                           
+                    global $icl_language_switcher_preview;                   
+                    if($icl_lso_link_empty || is_home() || is_404()  
+                        || ('page' == get_option('show_on_front') && ($this->wp_query->queried_object_id == get_option('page_on_front') 
+                        || $this->wp_query->queried_object_id == get_option('page_for_posts')))
+                        || $icl_language_switcher_preview){
+                        $lang['translated_url'] = $this->language_url($lang['code']);
+                        $skip_lang = false;                        
+                    }else{
+                        $skip_lang = true; 
+                        unset($w_active_languages[$k]);                       
+                    }                    
+                }
+                if(!$skip_lang){
+                    $w_active_languages[$k] = $lang;                    
+                }else{
+                    unset($w_active_languages[$k]); 
+                }                        
+            }              
+                   
+            foreach($w_active_languages as $k=>$v){
+                $lang_code = $w_active_languages[$k]['language_code'] = $w_active_languages[$k]['code'];
+                unset($w_active_languages[$k]['code']);
+
+                $native_name = $this->get_display_language_name($lang_code, $lang_code);        
+                if(!$native_name) $native_name = $w_active_languages[$k]['english_name'];    
+                $w_active_languages[$k]['native_name'] = $native_name;                
+                unset($w_active_languages[$k]['english_name']);
+                
+
+                $translated_name = $this->get_display_language_name($lang_code, $this->get_current_language());        
+                if(!$translated_name) $translated_name = $w_active_languages[$k]['english_name'];    
+                $w_active_languages[$k]['translated_name'] = $translated_name;                
+                unset($w_active_languages[$k]['display_name']);
+               
+                $w_active_languages[$k]['url'] = $w_active_languages[$k]['translated_url']; 
+                unset($w_active_languages[$k]['translated_url']);
+                                
+                $flag = $this->get_flag($lang_code);
+                    
+                if($flag->from_template){
+                    $flag_url = get_bloginfo('template_directory') . '/images/flags/'.$flag->flag;
+                }else{
+                    $flag_url = ICL_PLUGIN_URL . '/res/flags/'.$flag->flag;
+                }                    
+                $w_active_languages[$k]['country_flag_url'] = $flag_url;                
+                
+                $w_active_languages[$k]['active'] = $this->get_current_language()==$lang_code?'1':0;;
+            }     
+            
+            
+            // restore current $wp_query
+            $wp_query = clone $_wp_query_back;
+            unset($_wp_query_back);             
+              
+            // sort languages according to parameters  
+            if(isset($template_args['orderby'])){
+                if(isset($template_args['order'])){
+                    $order = $template_args['order'];
+                }else{
+                    $order = 'asc';
+                }
+                $comp = $order == 'asc' ? '>' : '<';
+                switch($template_args['orderby']){
+                    case 'id':                   
+                        uasort($w_active_languages, create_function('$a,$b','return $a[\'id\'] '.$comp.' $b[\'id\'];')); 
+                        break;
+                    case 'code':    
+                        ksort($w_active_languages);
+                        if($order == 'desc'){
+                            $w_active_languages = array_reverse($w_active_languages);
+                        }
+                        break;
+                    case 'name':                                        
+                    default:
+                        uasort($w_active_languages, create_function('$a,$b','return $a[\'translated_name\'] '.$comp.' $b[\'translated_name\'];')); 
+                }                
+            }                    
+            
+                                
+            return $w_active_languages;
+            
+    }
+
+    function get_display_language_name($lang_code, $display_code) {
+        global $wpdb;
+        if (isset($this->icl_language_name_cache)) {
+            $translated_name = $this->icl_language_name_cache->get($lang_code.$display_code);
+        } else {
+            $translated_name = null;
+        }
+        if (!$translated_name) {
+            $translated_name = $wpdb->get_var("SELECT name FROM {$wpdb->prefix}icl_languages_translations WHERE language_code='{$lang_code}' AND display_language_code='{$display_code}'");
+            if (isset($this->icl_language_name_cache)) {
+                $this->icl_language_name_cache->set($lang_code.$display_code, $translated_name);
+            }
+        }
+        return $translated_name;
+    }
+    
+    function get_flag($lang_code){
+        global $wpdb;
+        
+        if (isset($this->icl_flag_cache)) {
+            $flag = $this->icl_flag_cache->get($lang_code);
+        } else {
+            $flag = null;
+        }
+        if (!$flag) {
+            $flag = $wpdb->get_row("SELECT flag, from_template FROM {$wpdb->prefix}icl_flags WHERE lang_code='{$lang_code}'");
+            if (isset($this->icl_flag_cache)) {
+                $this->icl_flag_cache->set($lang_code, $flag);
+            }
+        }
+        
+        return $flag;
+    }
+                      
+    function language_selector(){        
+        if(is_single()){
+            $post_type = get_query_var('post_type');
+            if(!$post_type) $post_type = 'post';
+            if(!$this->is_translated_post_type($post_type)){
+                return;
+            }
+        }elseif(is_tax()){
+            $tax = get_query_var('taxonomy');
+            if(!$this->is_translated_taxonomy($tax)){
+                return;
+            }            
+        }
+        $active_languages = $this->get_ls_languages();
+        foreach($active_languages as $k=>$al){
+            if($al['active']==1){
+                $main_language = $al;
+                unset($active_languages[$k]);
+                break;
+            }
+        }
+        include ICL_PLUGIN_PATH . '/menu/language-selector.php';            
+    }
+    
+    function have_icl_translator($source, $target){
+        // returns true if we have ICL translators for the language pair
+        if (isset($this->settings['icl_lang_status'])){
+            foreach($this->settings['icl_lang_status'] as $lang) {
+                if ($lang['from'] == $source && $lang['to'] == $target) {
+                    return $lang['have_translators'];
+                }
+            }
+            
+        }
+        
+        return false;
+    }
+    
+    function get_default_categories(){
+        $default_categories_all = $this->settings['default_categories'];
+        
+        foreach($this->active_languages as $l) $alcodes[] = $l['code'];
+        foreach($default_categories_all as $c=>$v){
+            if(in_array($c, $alcodes)){
+                $default_categories[$c] = $v;
+            }
+        }
+        
+        return $default_categories;            
+    }
+    
+    function set_default_categories($def_cat){
+        $this->settings['default_categories'] = $def_cat;
+        $this->save_settings();
+    }
+    
+    function pre_option_default_category($setting){
+        global $wpdb;
+        if(isset($_POST['icl_post_language']) && $_POST['icl_post_language'] || (isset($_GET['lang']) && $_GET['lang']!='all')){
+            $lang = isset($_POST['icl_post_language'])  && $_POST['icl_post_language']?$_POST['icl_post_language']:$_GET['lang'];
+            $ttid = intval($this->settings['default_categories'][$lang]);
+            return $tid = $wpdb->get_var("SELECT term_id FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id={$ttid} AND taxonomy='category'");
+        }
+        return false;
+    }
+    
+    function update_option_default_category($oldvalue, $newvalue){
+        $translations = $this->get_element_translations($this->get_element_trid($newvalue, 'tax_category'));
+        if(!empty($translations)){
+            foreach($translations as $t){
+                $icl_settings['default_categories'][$t->language_code] = $t->element_id;    
+            }
+            $this->save_settings($icl_settings);
+        }
+    }    
+    
+    function the_category_name_filter($name){                    
+        if(is_array($name)){
+            foreach($name as $k=>$v){
+                $name[$k] = $this->the_category_name_filter($v);
+            }
+            return $name;
+        }        
+        if(false === strpos($name, '@')) return $name;        
+        if(false !== strpos($name, '<a')){                                                          
+            $int = preg_match_all('|<a([^>]+)>([^<]+)</a>|i',$name,$matches);
+            if($int && count($matches[0]) > 1){
+                $originals = $filtered = array();
+                foreach($matches[0] as $m){
+                    $originals[] = $m;
+                    $filtered[] = $this->the_category_name_filter($m);
+                }
+                $name = str_replace($originals, $filtered, $name);
+            }else{            
+                $name_sh = strip_tags($name);
+                $exp = explode('@', $name_sh);
+                $name = str_replace($name_sh, trim($exp[0]),$name);            
+            }
+        }else{
+            $name = preg_replace('#(.*) @(.*)#i','$1',$name);
+        }
+        return $name;
+    }
+    
+    function get_terms_filter($terms){
+        foreach($terms as $k=>$v){
+            if(isset($terms[$k]->name)) $terms[$k]->name = $this->the_category_name_filter($terms[$k]->name);
+        }
+        return $terms;
+    }
+    
+    function get_term_adjust_id($term){
+        global $icl_adjust_id_url_filter_off, $wpdb;
+        if($icl_adjust_id_url_filter_off) return $term; // special cases when we need the categiry in a different language
+                    
+        $translated_id = icl_object_id($term->term_id, $term->taxonomy, true);        
+        if($translated_id != $term->term_id){             
+            //$translated_id = $wpdb->get_var("SELECT term_id FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id='{$translated_id}'");       
+            remove_filter('get_term', array($this,'get_term_adjust_id'), 1);
+            $t_term = get_term($translated_id, $term->taxonomy); 
+            if(!is_wp_error($t_term)){
+                $term = $t_term;
+            }        
+            add_filter('get_term', array($this,'get_term_adjust_id'), 1, 1);
+        }
+        
+        return $term;
+    }
+    
+    function wp_list_pages_adjust_ids($out, $args){
+        static $__run_once = false; // only run for calls that have 'include' as an argument. ant only run once.
+        if($args['include'] && !$__run_once && $this->get_current_language() != $this->get_default_language()){
+            $__run_once = true;
+            $include = array_map('trim', explode(',', $args['include']));
+            $tr_include = array();
+            foreach($include as $i){
+                $t = icl_object_id($i, 'page',true);
+                if($t){
+                    $tr_include[] = $t;    
+                }            
+            }
+            $args['include'] = join(',',$tr_include);
+            $out = wp_list_pages($args);            
+        }
+        return $out;
+    }
+    
+    function get_terms_adjust_ids($terms, $taxonomies, $args){
+        static $__run_once = false; // only run for calls that have 'include' as an argument. ant only run once.
+        if($args['include'] && !$__run_once && $this->get_current_language() != $this->get_default_language()){
+            $__run_once = true;
+            if(is_array($args['include'])){
+                $include = $args['include'];
+            }else{
+                $include = array_map('trim', explode(',', $args['include']));
+            }            
+            $tr_include = array();
+            foreach($include as $i){
+                $t = icl_object_id($i, $taxonomies[0],true);
+                if($t){
+                    $tr_include[] = $t;    
+                }            
+            }
+            $args['include'] = join(',',$tr_include);
+            $terms = get_terms($taxonomies, $args);
+        }        
+        return $terms;
+    }
+
+    function get_pages_adjust_ids($pages, $args){
+        static $__run_once = false; // only run for calls that have 'include' as an argument. ant only run once.
+        if(!$__run_once && $this->get_current_language() != $this->get_default_language()){
+            $__run_once = true;
+            $args_updated = false;            
+            if($args['include']){                
+                $include = array_map('trim', explode(',', $args['include']));
+                $tr_include = array();
+                foreach($include as $i){
+                    $t = icl_object_id($i, 'page', true);
+                    if($t){
+                        $tr_include[] = $t;    
+                    }            
+                }
+                $args['include'] = join(',',$tr_include);                
+                $args_updated = true;
+            }
+            if($args['child_of']){
+                $args['child_of'] = icl_object_id($args['child_of'], 'page', true);   
+                $args_updated = true;
+            }        
+            if($args_updated){
+                $pages = get_pages($args);
+            }            
+        }
+        return $pages;
+    }
+    
+    function category_link_adjust_id($catlink, $cat_id){
+        global $icl_adjust_id_url_filter_off, $wpdb;
+        if($icl_adjust_id_url_filter_off) return $catlink; // special cases when we need the categiry in a different language
+         
+        $translated_id = icl_object_id($cat_id, 'category', true);
+        if($translated_id && $translated_id != $cat_id){
+            $translated_id = $wpdb->get_var("SELECT term_id FROM {$wpdb->term_taxonomy} WHERE term_taxonomy_id='{$translated_id}'");       
+            remove_filter('category_link', array($this,'category_link_adjust_id'), 1);
+            $catlink = get_category_link($translated_id, 'category'); 
+            add_filter('category_link', array($this,'category_link_adjust_id'), 1, 2);
+        }
+        return $catlink;        
+    } 
+    
+    // adiacent posts links
+    function get_adiacent_post_join($join){
+        global $wpdb;
+        $post_type = get_query_var('post_type');
+        if(!$post_type) $post_type = 'post';
+        $join .= " JOIN {$wpdb->prefix}icl_translations t ON t.element_id = p.ID AND t.element_type = 'post_{$post_type}'";        
+        return $join;
+    }    
+    
+    function get_adiacent_post_where($where){
+        global $wpdb;
+        $where .= " AND language_code = '{$wpdb->escape($this->this_lang)}'";
+        return $where;
+    }
+    
+    // feeds links
+    function feed_link($out){  
+        return $this->convert_url($out);
+    }
+    
+    // commenting links
+    function post_comments_feed_link($out){
+        if($this->settings['language_negotiation_type']==3){
+            $out = preg_replace('@(\?|&)lang=([^/]+)/feed/@i','feed/$1lang=$2',$out);
+        }
+        return $out;
+        //return $this->convert_url($out);
+    }
+    
+    function trackback_url($out){
+        return $this->convert_url($out);
+    }
+    
+    function user_trailingslashit($string, $type_of_url){
+        // fixes comment link for when the comments list pagination is enabled
+        if($type_of_url=='comment'){
+            $string = preg_replace('@(.*)/\?lang=([a-z-]+)/(.*)@is','$1/$3?lang=$2', $string);
+        }
+        return $string;
+    }
+    
+    // archives links
+    function getarchives_join($join){
+        global $wpdb;
+        $join .= " JOIN {$wpdb->prefix}icl_translations t ON t.element_id = {$wpdb->posts}.ID AND t.element_type='post_post'";        
+        return $join;        
+    }
+    
+    function getarchives_where($where){
+        global $wpdb;
+        $where .= " AND language_code = '{$wpdb->escape($this->this_lang)}'";
+        return $where;                
+    } 
+       
+    function archives_link($out){
+        global $icl_archive_url_filter_off;                 
+        if(!$icl_archive_url_filter_off){
+            $out = $this->archive_url($out, $this->this_lang);
+        }       
+        $icl_archive_url_filter_off = false;
+        return $out;
+    }
+    
+    function archive_url($url, $lang){        
+        $url = $this->convert_url($url, $lang);
+        return $url;
+    }
+    
+    function author_link($url){
+        return preg_replace('#^http://(.+)//(.+)$#','http://$1/$2', $url);
+    }
+       
+    // Navigation
+    function get_pagenum_link_filter($url){
+        // fix pagenum links for when using the language as a parameter 
+        // remove language query string appended by WP
+        // WPML adds the language parameter after the url is built
+        $url = str_replace(get_option('home') . '?lang=' . $this->get_current_language(), get_option('home'), $url);
+        return $url;
+    }
+    
+    function pre_option_home(){                              
+        $dbbt = debug_backtrace();                                     
+        
+        static $inc_methods = array('include','include_once','require','require_once');
+        if($dbbt['4']['function']=='get_bloginfo' && $dbbt['5']['function']=='bloginfo'){  // case of bloginfo
+            $is_template_file = false !== strpos($dbbt[5]['file'], realpath(TEMPLATEPATH));
+            $is_direct_call   = in_array($dbbt[6]['function'], $inc_methods) || (false !== strpos($dbbt[6]['file'], realpath(TEMPLATEPATH)));
+        }elseif($dbbt['4']['function']=='get_bloginfo'){  // case of get_bloginfo
+            $is_template_file = false !== strpos($dbbt[4]['file'], realpath(TEMPLATEPATH));
+            $is_direct_call   = in_array($dbbt[5]['function'], $inc_methods) || (false !== strpos($dbbt[5]['file'], realpath(TEMPLATEPATH)));
+        }elseif($dbbt['4']['function']=='get_settings'){  // case of get_settings
+            $is_template_file = false !== strpos($dbbt[4]['file'], realpath(TEMPLATEPATH));
+            $is_direct_call   = in_array($dbbt[5]['function'], $inc_methods) || (false !== strpos($dbbt[5]['file'], realpath(TEMPLATEPATH)));
+        }else{ // case of get_option
+            $is_template_file = false !== strpos($dbbt[3]['file'], realpath(TEMPLATEPATH));
+            $is_direct_call   = in_array($dbbt[4]['function'], $inc_methods) || (false !== strpos($dbbt[4]['file'], realpath(TEMPLATEPATH)));
+        }
+        
+        //if($dbbt[3]['file'] == @realpath(TEMPLATEPATH . '/header.php')){
+        if($is_template_file && $is_direct_call){
+            $ret = $this->language_url($this->this_lang);                                       
+        }else{
+            $ret = false;
+        }
+        return $ret;
+    }
+            
+    function query_vars($public_query_vars){
+        $public_query_vars[] = 'lang';
+        global $wp_query;        
+        $wp_query->query_vars['lang'] = $this->this_lang;                    
+        return $public_query_vars;
+    }
+        
+    function parse_query($q){
+        global $wp_query, $wpdb;        
+        //if($q == $wp_query) return; // not touching the WP query
+        if(is_admin()) return; 
+        
+        if($this->get_current_language() != $this->get_default_language()) {
+            $cat_array = array();
+            // cat
+            if(isset($q->query_vars['cat']) && !empty($q->query_vars['cat'])){
+                $cat_array = array_map('trim', explode(',', $q->query_vars['cat']));
+            }
+            // category_name
+            if(isset($q->query_vars['category_name']) && !empty($q->query_vars['category_name'])){
+                $cat = get_term_by( 'slug', basename($q->query_vars['category_name']), 'category' ); 
+                if(!$cat){
+                    $cat = get_term_by( 'name', $q->query_vars['category_name'], 'category' ); 
+                }
+                if($cat_id = $cat->term_id){
+                    $cat_array = array($cat_id);            
+                }else{
+                    $q->query_vars['p'] = -1;
+                }                
+            }
+            // category_and
+            if(isset($q->query_vars['category__and']) && !empty($q->query_vars['category__and'])){
+                $cat_array = $q->query_vars['category__and'];
+            }
+            // category_in
+            if(isset($q->query_vars['category__in']) && !empty($q->query_vars['category__in'])){
+                $cat_array = $q->query_vars['category__in'];
+            }            
+            // category__not_in
+            if(isset($q->query_vars['category__not_in']) && !empty($q->query_vars['category__not_in'])){
+                $cat_array = $q->query_vars['category__not_in'];
+            }
+            
+            if(!empty($cat_array)){
+                $translated_ids = array();
+                foreach($cat_array as $c){                    
+                    if(intval($c) < 0){
+                        $sign = -1;
+                    }else{
+                        $sign = 1;
+                    }
+                    $translated_ids[] = $sign * intval(icl_object_id(abs($c), 'category', true));
+                }
+            }
+            
+            //cat
+            if(isset($q->query_vars['cat']) && !empty($q->query_vars['cat'])){
+                $q->query_vars['cat'] = join(',', $translated_ids);    
+            }
+            // category_name
+            if(isset($q->query_vars['category_name']) && !empty($q->query_vars['category_name'])){
+                $q->query_vars['cat'] = $translated_ids[0];    
+                unset($q->query_vars['category_name']);
+            }
+            // category__and
+            if(isset($q->query_vars['category__and']) && !empty($q->query_vars['category__and'])){
+                $q->query_vars['category__and'] = $translated_ids;
+            }
+            // category__in
+            if(isset($q->query_vars['category__in']) && !empty($q->query_vars['category__in'])){
+                $q->query_vars['category__in'] = $translated_ids;
+            }            
+            // category__not_in
+            if(isset($q->query_vars['category__not_in']) && !empty($q->query_vars['category__not_in'])){
+                $q->query_vars['category__not_in'] = $translated_ids;
+            }
+            
+            // TAGS
+            $tag_array = array();
+            // tag
+            if(isset($q->query_vars['tag']) && !empty($q->query_vars['tag'])){
+                if(false !== strpos($q->query_vars['tag'],' ')){
+                    $tag_glue = '+';
+                    $exp = explode(' ', $q->query_vars['tag']);
+                }else{
+                    $tag_glue = ',';
+                    $exp = explode(',', $q->query_vars['tag']);                    
+                } 
+                $tag_ids = array();               
+                foreach($exp as $e){
+                    $tag_array[] = $wpdb->get_var($wpdb->prepare( "SELECT x.term_id FROM $wpdb->terms t 
+                        JOIN $wpdb->term_taxonomy x ON t.term_id=x.term_id WHERE x.taxonomy='post_tag' AND t.slug='%s'", $wpdb->escape($e)));    
+                }
+                $_tmp = array_unique($tag_array);
+                if(count($_tmp) == 1 && empty($_tmp[0])){
+                    $tag_array = array();    
+                }
+            }            
+            // tag_id
+            if(isset($q->query_vars['tag_id']) && !empty($q->query_vars['tag_id'])){
+                $tag_array = array_map('trim', explode(',', $q->query_vars['tag_id']));
+            }
+            
+            // tag__and
+            if(isset($q->query_vars['tag__and']) && !empty($q->query_vars['tag__and'])){
+                $tag_array = $q->query_vars['tag__and'];
+            }
+            // tag__in
+            if(isset($q->query_vars['tag__in']) && !empty($q->query_vars['tag__in'])){
+                $tag_array = $q->query_vars['tag__in'];
+            }            
+            // tag__not_in
+            if(isset($q->query_vars['tag__not_in']) && !empty($q->query_vars['tag__not_in'])){
+                $tag_array = $q->query_vars['tag__not_in'];
+            }
+            // tag_slug__in
+            if(isset($q->query_vars['tag_slug__in']) && !empty($q->query_vars['tag_slug__in'])){
+                foreach($q->query_vars['tag_slug__in'] as $t){
+                    $tag_array[] = $wpdb->get_var($wpdb->prepare( "SELECT x.term_id FROM $wpdb->terms t 
+                        JOIN $wpdb->term_taxonomy x ON t.term_id=x.term_id WHERE x.taxonomy='post_tag' AND t.slug='%s'", $wpdb->escape($t)));    
+                }
+            }            
+            // tag_slug__and
+            if(isset($q->query_vars['tag_slug__and']) && !empty($q->query_vars['tag_slug__and'])){
+                foreach($q->query_vars['tag_slug__and'] as $t){
+                    $tag_array[] = $wpdb->get_var($wpdb->prepare( "SELECT x.term_id FROM $wpdb->terms t 
+                        JOIN $wpdb->term_taxonomy x ON t.term_id=x.term_id WHERE x.taxonomy='post_tag' AND t.slug='%s'", $wpdb->escape($t)));    
+                }
+            }
+            
+            if(!empty($tag_array)){
+                $translated_ids = array();
+                foreach($tag_array as $c){                    
+                    if(intval($c) < 0){
+                        $sign = -1;
+                    }else{
+                        $sign = 1;
+                    }
+                     $_tid = intval(icl_object_id(abs($c), 'post_tag', true));
+                     $translated_ids[] = $sign * $_tid;
+                }
+            }
+            
+
+            //tag            
+            if(isset($q->query_vars['tag']) && !empty($q->query_vars['tag'])){
+                if(isset($translated_ids)){
+                    $slugs = $wpdb->get_col("SELECT slug FROM $wpdb->terms WHERE term_id IN (".join(',', $translated_ids).")");
+                    $q->query_vars['tag'] = join($tag_glue, $slugs);    
+                }                                
+            }
+            //tag_id
+            if(isset($q->query_vars['tag_id']) && !empty($q->query_vars['tag_id'])){
+                $q->query_vars['tag_id'] = join(',', $translated_ids);    
+            }                        
+            // tag__and
+            if(isset($q->query_vars['tag__and']) && !empty($q->query_vars['tag__and'])){
+                $q->query_vars['tag__and'] = $translated_ids;
+            }
+            // tag__in
+            if(isset($q->query_vars['tag__in']) && !empty($q->query_vars['tag__in'])){
+                $q->query_vars['tag__in'] = $translated_ids;
+            }            
+            // tag__not_in
+            if(isset($q->query_vars['tag__not_in']) && !empty($q->query_vars['tag__not_in'])){
+                $q->query_vars['tag__not_in'] = $translated_ids;
+            }   
+            // tag_slug__in
+            if(isset($q->query_vars['tag_slug__in']) && !empty($q->query_vars['tag_slug__in'])){
+                $q->query_vars['tag_slug__in'] = $wpdb->get_col("SELECT slug FROM $wpdb->terms WHERE term_id IN (".join(',', $translated_ids).")");
+            }            
+            // tag_slug__and
+            if(isset($q->query_vars['tag_slug__and']) && !empty($q->query_vars['tag_slug__and'])){
+                $q->query_vars['tag_slug__and'] = $wpdb->get_col("SELECT slug FROM $wpdb->terms WHERE term_id IN (".join(',', $translated_ids).")");
+            }
+               
+               
+            // POST & PAGES
+            $post_type = isset($q->query_vars['post_type']) ? $q->query_vars['post_type'] : 'post';
+            // page_id                        
+            if(isset($q->query_vars['page_id']) && !empty($q->query_vars['page_id'])){
+                $q->query_vars['page_id'] = icl_object_id($q->query_vars['page_id'], 'page', true);
+                $q->query = preg_replace('/page_id=[0-9]+/','page_id='.$q->query_vars['page_id'], $q->query);
+            }
+            
+            // p
+            if(isset($q->query_vars['p']) && !empty($q->query_vars['p'])){
+                $q->query_vars['p'] = icl_object_id($q->query_vars['p'], $post_type, true);
+            }
+            // name
+            if(isset($q->query_vars['name']) && !empty($q->query_vars['name'])){                
+                $pid = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name='".urlencode($wpdb->escape($q->query_vars['name']))."'");    
+                $q->query_vars['p'] = icl_object_id($pid, $post_type, true);
+                unset($q->query_vars['name']);
+            }
+            // pagename
+            if(isset($q->query_vars['pagename']) && !empty($q->query_vars['pagename'])){
+                $pid = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name='".urlencode($wpdb->escape($q->query_vars['pagename']))."'");                
+                $q->query_vars['page_id'] = icl_object_id($pid, 'page', true);
+                if($pid != $q->query_vars['page_id']){
+                    $q->query_vars['pagename'] = $wpdb->get_var("SELECT post_name FROM $wpdb->posts WHERE ID=" . $pid);                
+                }
+            }
+            // post__in
+            if(isset($q->query_vars['post__in']) && !empty($q->query_vars['post__in'])){
+                $pid = array();
+                foreach($q->query_vars['post__in'] as $p){
+                    $pid[] = icl_object_id($p, $post_type, true);                    
+                }
+                $q->query_vars['post__in'] = $pid;
+            }
+            // post__not_in
+            if(isset($q->query_vars['post__not_in']) && !empty($q->query_vars['post__not_in'])){
+                $pid = array();
+                foreach($q->query_vars['post__not_in'] as $p){
+                    $pid[] = icl_object_id($p, $post_type, true);                    
+                }
+                $q->query_vars['post__not_in'] = $pid;
+            }
+            // post_parent
+            if(isset($q->query_vars['post_parent']) && !empty($q->query_vars['post_parent']) && $q->query_vars['post_type']!='attachment'){
+                $q->query_vars['post_parent'] = icl_object_id($q->query_vars['post_parent'], $post_type, true);
+            } 
+            
+            // custom taxonomies
+            if(isset($q->query_vars['taxonomy'])){
+                $tax_id = $wpdb->get_var("SELECT term_id FROM {$wpdb->terms} WHERE slug='".$wpdb->escape($q->query_vars['term'])."'");
+                if($tax_id){
+                    $translated_tax_id = icl_object_id($tax_id, $q->query_vars['taxonomy'], true);
+                }
+                $q->query_vars['term'] = $wpdb->get_var("SELECT slug FROM {$wpdb->terms} WHERE term_id = " . $translated_tax_id);
+                $q->query[$q->query_vars['taxonomy']] = $q->query_vars['term'];
+            }                     
+        }
+                
+        return $q;
+    }
+    
+    function adjust_wp_list_pages_excludes($pages){
+        foreach($pages as $k=>$v){            
+            $pages[$k] = icl_object_id($v, 'page', true);
+        }
+        return $pages;
+    }
+        
+    function language_attributes($output){
+        if(preg_match('#lang="[a-z-]+"#i',$output)){
+            $output = preg_replace('#lang="([a-z-]+)"#i', 'lang="'.$this->this_lang.'"', $output);
+        }else{
+            $output .= ' lang="'.$this->this_lang.'"';
+        }
+        return $output;
+    }
+        
+    // Localization
+    function plugin_localization(){
+        load_plugin_textdomain( 'sitepress', false, ICL_PLUGIN_FOLDER . '/locale');
+    }
+    
+    function locale(){
+        global $wpdb, $locale;
+        
+        if(defined('WP_ADMIN')){            
+            $l = $this->get_locale($this->admin_language);
+        }else{
+            $l = $this->get_locale($this->this_lang);
+        }        
+        if($l){
+            $locale = $l;
+        }    
+        
+        add_filter('language_attributes', array($this, '_language_attributes'));
+        
+        // theme localization
+        if($this->settings['gettext_theme_domain_name']){
+            load_textdomain($this->settings['gettext_theme_domain_name'], TEMPLATEPATH . '/'.$locale.'.mo');
+        }   
+        return $locale;
+    }
+    
+    function _language_attributes($latr){
+        global $locale;
+        $latr = preg_replace('#lang="(.[a-z])"#i', 'lang="'.str_replace('_','-',$locale).'"', $latr);
+        return $latr;
+    }
+        
+    function get_locale($code) {
+        global $wpdb;        
+        
+        if (isset($this->icl_locale_cache) && $this->icl_locale_cache->has_key($code)){
+            return $this->icl_locale_cache->get($code);
+        }
+        
+        $locale = $wpdb->get_var("SELECT locale FROM {$wpdb->prefix}icl_locale_map WHERE code='{$code}'");
+        if (isset($this->icl_locale_cache)){
+            $this->icl_locale_cache->set($code, $locale);
+        }
+        return $locale;
+    }
+    
+    function get_locale_file_names(){
+        global $wpdb;
+        $locales = array();
+        $res = $wpdb->get_results("
+            SELECT lm.code, locale 
+            FROM {$wpdb->prefix}icl_locale_map lm JOIN {$wpdb->prefix}icl_languages l ON lm.code = l.code AND l.active=1");
+        foreach($res as $row){
+            $locales[$row->code] = $row->locale;
+        }
+        return $locales;        
+    }
+    
+    function set_locale_file_names($locale_file_names_pairs){
+        global $wpdb;        
+        $lfn = $this->get_locale_file_names();
+        
+        $new = array_diff(array_keys($locale_file_names_pairs), array_keys($lfn));        
+        if(!empty($new)){
+            foreach($new as $code){
+                $wpdb->insert($wpdb->prefix.'icl_locale_map', array('code'=>$code,'locale'=>$locale_file_names_pairs[$code]));
+            }
+        }        
+        $remove = array_diff(array_keys($lfn), array_keys($locale_file_names_pairs));
+        if(!empty($remove)){
+            $wpdb->query("DELETE FROM {$wpdb->prefix}icl_locale_map WHERE code IN (".join(',', array_map(create_function('$a','return "\'".$a."\'";'),$remove)).")");
+        }
+        
+        $update = array_diff($locale_file_names_pairs, $lfn);
+        foreach($update as $code=>$locale){
+            $wpdb->update($wpdb->prefix.'icl_locale_map', array('locale'=>$locale), array('code'=>$code));
+        }
+        
+        $this->icl_locale_cache->clear();
+        
+        return true;        
+    }
+    
+    function pre_option_page_on_front(){
+        global $wpdb;
+        static $page_on_front_sc = array();
+        if (@$page_on_front_sc[$this->this_lang] === null || ICL_DISABLE_CACHE) {
+            $page_on_front_sc[$this->this_lang] = false;
+            $page_on_front = $wpdb->get_var("SELECT option_value FROM {$wpdb->options} WHERE option_name='page_on_front'");
+            $trid = $this->get_element_language_details($page_on_front, 'post_page')->trid;
+            if($trid){            
+                $translations = $wpdb->get_results("SELECT element_id, language_code FROM {$wpdb->prefix}icl_translations WHERE trid={$trid}");
+                foreach($translations as $t){
+                    if($t->language_code==$this->this_lang){
+                        $page_on_front_sc[$this->this_lang] = $t->element_id;
+                    }
+                }        
+            }
+        }
+        return $page_on_front_sc[$this->this_lang];
+    }      
+      
+    function pre_option_page_for_posts(){
+        global $wpdb;
+        static $page_for_posts_sc = array();
+        if (@$page_for_posts_sc[$this->this_lang] === null || ICL_DISABLE_CACHE) {
+            $page_for_posts_sc[$this->this_lang] = false;
+            $page_for_posts = $wpdb->get_var("SELECT option_value FROM {$wpdb->options} WHERE option_name='page_for_posts'");            
+            $trid = $this->get_element_language_details($page_for_posts, 'post_page')->trid;
+            if($trid){
+                $translations = $wpdb->get_results("SELECT element_id, language_code FROM {$wpdb->prefix}icl_translations WHERE trid={$trid}");
+                foreach($translations as $t){
+                    if($t->language_code==$this->this_lang){
+                        $page_for_posts_sc[$this->this_lang] = $t->element_id;
+                    }
+                }                    
+            }
+        }
+        return $page_for_posts_sc[$this->this_lang];
+    } 
+    
+    function verify_home_and_blog_pages_translations(){
+        global $wpdb;
+        $warn_home = $warn_posts = '';
+        if( 'page' == get_option('show_on_front') && get_option('page_on_front')){
+            $page_on_front = get_option('page_on_front');
+            $page_home_trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id={$page_on_front} AND element_type='post_page'");
+            $page_home_translations = $this->get_element_translations($page_home_trid, 'post_page');                 
+            $missing_home = array();               
+            foreach($this->active_languages as $lang){
+             if(!isset($page_home_translations[$lang['code']])){
+                 $missing_home[] = '<a href="page-new.php?trid='.$page_home_trid.'&amp;lang='.$lang['code'].'" title="'.__('add translation', 'sitepress').'">' . $lang['display_name'] . '</a>';
+             }elseif($page_home_translations[$lang['code']]->post_status != 'publish'){
+                 $missing_home[] = '<a href="page.php?action=edit&amp;post='.$page_home_translations[$lang['code']]->element_id.'&amp;lang='.$lang['code'].'" title="'.__('Not published - edit page', 'sitepress').'">' . $lang['display_name'] . '</a>';                 
+             }
+            }
+            if(!empty($missing_home)){
+             $warn_home  = '<div class="icl_form_errors" style="font-weight:bold">';
+             $warn_home .= sprintf(__('Your home page does not exist or its translation is not published in %s', 'sitepress'), join(', ', $missing_home));
+             $warn_home .= '<br />';
+             $warn_home .= '<a href="page.php?action=edit&post='.$page_on_front.'">' . __('Edit this page to add translations', 'sitepress') . '</a>';
+             $warn_home .= '</div>';
+            }
+        }
+        if(get_option('page_for_posts')){
+            $page_for_posts = get_option('page_for_posts');
+            $page_posts_trid = $wpdb->get_var("SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_id={$page_for_posts} AND element_type='post_page'");
+            $page_posts_translations = $this->get_element_translations($page_posts_trid, 'post_page');                 
+            $missing_posts = array();               
+            foreach($this->active_languages as $lang){
+             if(!isset($page_posts_translations[$lang['code']])){
+                 $missing_posts[] = '<a href="page-new.php?trid='.$page_posts_trid.'&amp;lang='.$lang['code'].'" title="'.__('add translation', 'sitepress').'">' . $lang['display_name'] . '</a>';
+             }elseif($page_posts_translations[$lang['code']]->post_status != 'publish'){
+                 $missing_posts[] = '<a href="page.php?action=edit&amp;post='.$page_posts_translations[$lang['code']]->element_id.'&amp;lang='.$lang['code'].'" title="'.__('Not published - edit page', 'sitepress').'">' . $lang['display_name'] . '</a>';                 
+             }
+            }
+            if(!empty($missing_posts)){
+             $warn_posts  = '<div class="icl_form_errors" style="font-weight:bold">';
+             $warn_posts .= sprintf(__('Your blog page does not exist or its translation is not published in %s', 'sitepress'), join(', ', $missing_posts));
+             $warn_posts .= '<br />';
+             $warn_posts .= '<a href="page.php?action=edit&amp;post='.$page_for_posts.'">' . __('Edit this page to add translations', 'sitepress') . '</a>';
+             $warn_posts .= '</div>';
+            }         
+        }    
+        return array($warn_home, $warn_posts);                     
+    }   
+    
+    // adds the language parameter to the admin post filtering/search
+    function restrict_manage_posts(){
+        echo '<input type="hidden" name="lang" value="'.$this->this_lang.'" />';
+    }
+    
+    // adds the language parameter to the admin pages search
+    function restrict_manage_pages(){
+        ?>
+        <script type="text/javascript">        
+        addLoadEvent(function(){jQuery('p.search-box').append('<input type="hidden" name="lang" value="<?php echo $this->this_lang ?>">');});
+        </script>        
+        <?php
+    }
+    
+    function get_edit_post_link($link, $id, $context = 'display'){
+        global $wpdb;
+        if ( current_user_can( 'edit_post', $id ) ) {
+            if ( 'display' == $context )
+                $and = '&amp;';
+            else
+                $and = '&';
+            
+            if($id){
+                $post_type = $wpdb->get_var("SELECT post_type FROM {$wpdb->posts} WHERE ID='{$id}'");    
+                $details = $this->get_element_language_details($id, 'post_' . $post_type);
+                if(isset($details->language_code)){
+                    $lang = $details->language_code;
+                }else{                              
+                    $lang = $this->get_current_language();
+                }            
+                if($lang != $this->get_default_language()){
+                    $link .= $and . 'lang=' . $lang;
+                }        
+            }
+        }
+        return $link;
+    }
+    
+    function option_sticky_posts($posts){
+        global $wpdb;
+        if(is_array($posts) && !empty($posts)){
+            $posts = $wpdb->get_col("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_id IN (".join(',',$posts).") AND element_type='post_post' AND language_code = '{$this->this_lang}'");
+        }        
+        return $posts;
+    }
+    
+    function request_filter($request){
+        // bug http://forum.wpml.org/topic.php?id=5
+        if(!defined('WP_ADMIN') && $this->settings['language_negotiation_type']==3 && isset($request['lang']) && count($request)==1){
+            unset($request['lang']);
+        }
+        return $request;
+    }
+        
+    function noscript_notice(){
+        ?><noscript><div class="error"><?php echo __('WPML admin screens require JavaScript in order to display. JavaScript is currently off in your browser.', 'sitepress') ?></div></noscript><?php
+    }
+    
+    function filter_queries($sql){                                                                               
+        global $wpdb, $pagenow;
+        // keep a record of the queries
+        $this->queries[] = $sql;
+
+        if($pagenow=='categories.php' || $pagenow=='edit-tags.php'){
+            if(preg_match('#^SELECT COUNT\(\*\) FROM '.$wpdb->term_taxonomy.' WHERE taxonomy = \'(category|post_tag)\' $#',$sql,$matches)){
+                $element_type= 'tax_' . $matches[1];
+                $sql = "
+                    SELECT COUNT(*) FROM {$wpdb->term_taxonomy} tx 
+                        JOIN {$wpdb->prefix}icl_translations tr ON tx.term_taxonomy_id=tr.element_id  
+                    WHERE tx.taxonomy='{$matches[1]}' AND tr.element_type='{$element_type}' AND tr.language_code='".$this->get_current_language()."'";
+            }
+        }
+        
+        if($pagenow=='edit.php' || $pagenow=='edit-pages.php'){            
+            $element_type = isset($_GET['post_type']) ? 'post_' . $_GET['post_type'] : 'post_post';
+            if(preg_match('#SELECT post_status, COUNT\( \* \) AS num_posts FROM '.$wpdb->posts.' WHERE post_type = \'(.+)\' GROUP BY post_status#i',$sql,$matches)){
+                if('all'!=$this->get_current_language()){
+                    $sql = '
+                    SELECT post_status, COUNT( * ) AS num_posts 
+                    FROM '.$wpdb->posts.' p 
+                        JOIN '.$wpdb->prefix.'icl_translations t ON p.ID = t.element_id 
+                    WHERE p.post_type = \''.$matches[1].'\' 
+                        AND t.element_type=\''.$element_type.'\' 
+                        AND t.language_code=\''.$this->get_current_language().'\' 
+                    GROUP BY post_status';
+                }else{
+                    $sql = '
+                    SELECT post_status, COUNT( * ) AS num_posts 
+                    FROM '.$wpdb->posts.' p 
+                        JOIN '.$wpdb->prefix.'icl_translations t ON p.ID = t.element_id 
+                        JOIN '.$wpdb->prefix.'icl_languages l ON t.language_code = l.code AND l.active = 1
+                    WHERE p.post_type = \''.$matches[1].'\' 
+                        AND t.element_type=\''.$element_type.'\' 
+                    GROUP BY post_status';                    
+                }
+            }
+        }        
+        
+        if(isset($_GET['action']) && $_GET['action']=='ajax-tag-search'){
+            $search = 'SELECT t.name FROM '. $wpdb->term_taxonomy
+                .' AS tt INNER JOIN '.$wpdb->terms.' AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = \''. $wpdb->escape($_GET['tax'])
+                .'\' AND t.name LIKE (\'%' . $wpdb->escape($_GET['q']) . '%\')';            
+            if($sql == $search){
+                $parts = parse_url($_SERVER['HTTP_REFERER']);
+                parse_str($parts['query'], $query);
+                $lang = isset($query['lang']) ? $query['lang'] : $this->get_language_cookie();
+                $element_type = 'tax_' . $_GET['tax'];
+                $sql = 
+                    'SELECT t.name FROM '. $wpdb->term_taxonomy
+                    .' AS tt 
+                    INNER JOIN '.$wpdb->terms.' AS t ON tt.term_id = t.term_id 
+                    JOIN '.$wpdb->prefix.'icl_translations tr ON tt.term_taxonomy_id = tr.element_id
+                    WHERE tt.taxonomy = \''. $wpdb->escape($_GET['tax'])
+                    .'\' AND tr.language_code=\''.$lang.'\' AND element_type=\''.$element_type.'\'
+                    AND t.name LIKE (\'%' . $wpdb->escape($_GET['q']) . '%\')                
+                ';
+            }
+        }
+        
+        return $sql;
+    }
+    
+    function get_inactive_content(){
+        global $wpdb;
+        $inactive = array();
+        $res_p = $wpdb->get_results("
+           SELECT COUNT(p.ID) AS c, p.post_type, lt.name AS language FROM {$wpdb->prefix}icl_translations t 
+            JOIN {$wpdb->posts} p ON t.element_id=p.ID AND t.element_type LIKE 'post\\_%'
+            JOIN {$wpdb->prefix}icl_languages l ON t.language_code = l.code AND l.active = 0
+            JOIN {$wpdb->prefix}icl_languages_translations lt ON lt.language_code = l.code  AND lt.display_language_code='".$this->get_current_language()."'
+            GROUP BY p.post_type, t.language_code
+        ");
+        foreach($res_p as $r){
+            $inactive[$r->language][$r->post_type] = $r->c;
+        }
+        $res_t = $wpdb->get_results("
+           SELECT COUNT(p.term_taxonomy_id) AS c, p.taxonomy, lt.name AS language FROM {$wpdb->prefix}icl_translations t 
+            JOIN {$wpdb->term_taxonomy} p ON t.element_id=p.term_taxonomy_id
+            JOIN {$wpdb->prefix}icl_languages l ON t.language_code = l.code AND l.active = 0
+            JOIN {$wpdb->prefix}icl_languages_translations lt ON lt.language_code = l.code  AND lt.display_language_code='".$this->get_current_language()."'
+            WHERE t.element_type LIKE  'tax\\_%'
+            GROUP BY p.taxonomy, t.language_code 
+        ");        
+        foreach($res_t as $r){
+            if($r->taxonomy=='category' && $r->c == 1){
+                continue; //ignore the case of just the default category that gets automatically created for a new language
+            }
+            $inactive[$r->language][$r->taxonomy] = $r->c;
+        }        
+        return $inactive;
+    }
+    
+    function menu_footer(){
+        include ICL_PLUGIN_PATH . '/menu/menu-footer.php';
+    }
+    
+    function _allow_calling_template_file_directly(){
+        if(is_404()){  
+            global $wp_query, $wpdb;
+            $wp_query->is_404 = false;
+            $parts = parse_url(get_bloginfo('home'));
+            $req = str_replace($parts['path'], '', $_SERVER['REQUEST_URI']);
+            if(file_exists(ABSPATH . $req) && !is_dir(ABSPATH . $req)){
+                header('HTTP/1.1 200 OK');
+                include ABSPATH . $req;
+                exit;
+            }
+        }
+    }
+    
+    function show_user_options(){
+        global $current_user;
+        $active_languages = $this->get_active_languages();
+        $default_language = $this->get_default_language();
+        $user_language = get_usermeta($current_user->data->ID,'icl_admin_language',true);
+        if($this->settings['admin_default_language'] == '_default_'){
+            $this->settings['admin_default_language'] = $default_language;
+        }
+        $lang_details = $this->get_language_details($this->settings['admin_default_language']);
+        $admin_default_language = $lang_details['display_name'];
+        ?>
+        <a name="wpml"></a>
+        <h3><?php _e('WPML language settings','sitepress'); ?></h3>
+        <table class="form-table">
+            <tbody>
+                <tr>
+                    <th><?php _e('Select your language:', 'sitepress') ?></th>
+                    <td>                        
+                        <select name="icl_user_admin_language">
+                        <option value=""<?php if($user_language==$this->settings['admin_default_language']) echo ' selected="selected"'?>><?php printf(__('Default admin language (currently %s)','sitepress'), $admin_default_language );?>&nbsp;</option>
+                        <?php foreach($active_languages as $al):?>
+                        <option value="<?php echo $al['code'] ?>"<?php if($user_language==$al['code']) echo ' selected="selected"'?>><?php echo $al['display_name']; if($this->admin_language != $al['code']) echo ' ('. $al['native_name'] .')'; ?>&nbsp;</option>
+                        <?php endforeach; ?>
+                        </select>                        
+                        <span class="description"><?php _e('this will be your admin language and will also be used for translating comments.', 'sitepress'); ?></span>
+                    </td>
+                </tr>
+                <tr>
+                    <th><?php _e('Hidden languages:', 'sitepress') ?></th>
+                    <td>   
+                        <p>                     
+                        <?php if(!empty($this->settings['hidden_languages'])): ?>                        
+                            <?php
+                             if(1 == count($this->settings['hidden_languages'])){
+                                 printf(__('%s is currently hidden to visitors.', 'sitepress'), 
+                                    $active_languages[$this->settings['hidden_languages'][0]]['display_name']);
+                             }else{
+                                 foreach($this->settings['hidden_languages'] as $l){
+                                     $_hlngs[] = $active_languages[$l]['display_name'];
+                                 }                                 
+                                 $hlangs = join(', ', $_hlngs);
+                                 printf(__('%s are currently hidden to visitors.', 'sitepress'), $hlangs);
+                             }
+                            ?>                            
+                        <?php else: ?>
+                        <?php _e('All languages are currently displayed. Choose what to do when site languages are hidden.', 'sitepress'); ?>
+                        <?php endif; ?>                        
+                        </p>
+                        <p>
+                        <label><input name="icl_show_hidden_languages" type="checkbox" value="1" <?php 
+                            if(get_usermeta($current_user->data->ID, 'icl_show_hidden_languages')):?>checked="checked"<?php endif?> />&nbsp;<?php 
+                            _e('Display hidden languages', 'sitepress') ?></label>
+                        </p>
+                    </td>
+                </tr>                
+            </tbody>
+        </table>        
+        <?php
+    }
+    
+    function  save_user_options(){
+        $user_id = $_POST['user_id'];
+        if($user_id){
+            update_usermeta($user_id,'icl_admin_language',$_POST['icl_user_admin_language']);        
+            update_usermeta($user_id,'icl_show_hidden_languages',intval($_POST['icl_show_hidden_languages']));        
+            $this->icl_locale_cache->clear();
+        }        
+    }
+    
+    function help_admin_notice(){  
+        $q = http_build_query(array(
+            'name'      => 'wpml-intro',
+            'iso'       => WPLANG,
+            'src'    => get_option('home')
+        ));
+        ?>                                                                                                           
+        <br clear="all" />
+        <div id="message" class="updated message fade" style="clear:both;margin-top:5px;"><p>
+        <?php _e('WPML is a powerful plugin with many features. Would you like to see a quick overview?', 'sitepress'); ?>
+        </p>
+        <p>
+        <a href="<?php echo ICL_API_ENDPOINT ?>/destinations/go?<?php echo $q ?>" target="_blank" class="button-primary"><?php _e('Yes', 'sitepress')?></a>&nbsp;
+        <a href="admin.php?page=<?php echo basename(ICL_PLUGIN_PATH).'/menu/languages.php&icl_action=dismiss_help'; ?>"  class="button"><?php _e('No thanks, I will configure myself', 'sitepress')?></a>&nbsp;
+        <a title="<?php _e('Stop showing this message', 'sitepress') ?>" id="icl_dismiss_help" href=""><?php _e('Dismiss', 'sitepress')?></a>
+        </p>
+        </div>
+        <?php 
+    }
+    
+    function upgrade_notice(){
+        include ICL_PLUGIN_PATH . '/menu/upgrade_notice.php';
+    }
+    
+    function icl_reminders(){
+        include ICL_PLUGIN_PATH . '/menu/icl_reminders.php';
+    }
+    
+    function add_posts_management_column($columns){
+        global $posts, $wpdb, $__management_columns_posts_translations;
+        $element_type = isset($_REQUEST['post_type']) ? 'post_' . $_REQUEST['post_type'] : 'post_post';
+        if(count($this->get_active_languages()) <= 1 || get_query_var('post_status') == 'trash'){
+            return $columns;
+        }
+        
+        if($_POST['action']=='inline-save' && $_POST['post_ID']){
+            $p = new stdClass();
+            $p->ID = $_POST['post_ID'];
+            $posts = array($p);
+        }elseif(empty($posts)){
+            return $columns;
+        }         
+        if(is_null($__management_columns_posts_translations)){        
+            foreach($posts as $p){
+                $post_ids[] = $p->ID;
+            }
+            // get posts translations
+            // get trids
+            $trids = $wpdb->get_col("
+                SELECT trid FROM {$wpdb->prefix}icl_translations WHERE element_type='{$element_type}' AND element_id IN (".join(',', $post_ids).")
+            ");
+            $ptrs = $wpdb->get_results("
+                SELECT trid, element_id, language_code, source_language_code FROM {$wpdb->prefix}icl_translations WHERE trid IN (".join(',', $trids).")
+            ");
+            foreach($ptrs as $v){
+                $by_trid[$v->trid][] = $v;
+            }
+
+            foreach($ptrs as $v){
+                if(in_array($v->element_id, $post_ids)){
+                    $el_trid = $v->trid;
+                    foreach($ptrs as $val){
+                        if($val->trid == $el_trid){
+                            $__management_columns_posts_translations[$v->element_id][$val->language_code] = $val;
+                        }
+                    }
+                }
+            }
+        }
+        $active_languages = $this->get_active_languages();
+        foreach($active_languages as $k=>$v){
+            if($v['code']==$this->get_current_language()) continue;
+            $langs[] = $v['code'];
+        }                
+        $res = $wpdb->get_results("
+            SELECT f.lang_code, f.flag, f.from_template, l.name 
+            FROM {$wpdb->prefix}icl_flags f 
+                JOIN {$wpdb->prefix}icl_languages_translations l ON f.lang_code = l.language_code
+            WHERE l.display_language_code = '".$this->admin_language."' AND f.lang_code IN('".join("','",$langs)."')
+        ");
+        foreach($res as $r){
+            if($r->from_template){
+                $fpath = get_bloginfo('template_directory') . '/images/flags/';
+            }else{
+            }   $fpath = ICL_PLUGIN_URL . '/res/flags/';
+            $flags[$r->lang_code] = '<img src="'.$fpath.$r->flag.'" width="18" height="12" alt="'.$r->name.'" title="'.$r->name.'" />';
+        }
+        $colh = '';
+        foreach($active_languages as $v){
+            $colh .= $flags[$v['code']];
+        }
+        foreach($columns as $k=>$v){
+            $new_columns[$k] = $v;
+            if($k=='title'){
+                $new_columns['icl_translations'] = $colh;
+            }
+        }  
+        return $new_columns;
+    }
+    
+    function add_content_for_posts_management_column($column_name){
+        if($column_name != 'icl_translations') return;        
+        global $id, $__management_columns_posts_translations, $pagenow;
+        $active_languages = $this->get_active_languages();
+        foreach($active_languages as $k=>$v){
+            if($v['code']==$this->get_current_language()) continue;
+            $post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : 'post';            
+            if($__management_columns_posts_translations[$id][$v['code']]){
+                $img = 'edit_translation.png';
+                $alt = sprintf(__('Edit the %s translation','sitepress'), $v['display_name']);                
+                $link = 'post.php?post_type='.$post_type.'&action=edit&amp;post='.$__management_columns_posts_translations[$id][$v['code']]->element_id.'&amp;lang='.$v['code'];
+            }else{
+                $img = 'add_translation.png';
+                $alt = sprintf(__('Add translation to %s','sitepress'), $v['display_name']);
+                $src_lang = $this->get_current_language() == 'all' ? $this->get_default_language() : $this->get_current_language();
+                $link = 'post-new.php?post_type='.$post_type.'&trid=' . $__management_columns_posts_translations[$id][$this->get_current_language()]->trid.'&amp;lang='.$v['code'].'&amp;source_lang=' . $src_lang;
+            }
+            echo '<a href="'.$link.'" title="'.$alt.'">';
+            echo '<img style="padding:1px;margin:2px;" border="0" src="'.ICL_PLUGIN_URL . '/res/img/' .$img.'" alt="'.$alt.'" width="16" height="16" />';
+            echo '</a>';
+        }
+    }
+    
+    function __set_posts_management_column_width(){
+        $w = 22 * count($this->get_active_languages());
+        echo '<style type="text/css">.column-icl_translations{width:'.$w.'px;}.column-icl_translations img{margin:2px;}</style>';
+    }
+    
+    function display_wpml_footer(){
+        if($this->settings['promote_wpml']){
+            $footers = array(
+                '1' => __('Multilingual thanks to WPML', 'sitepress'),
+                '2' => __('Multilingual WordPress by WPML', 'sitepress'),
+                '3' => __('Translated with WPML', 'sitepress'),
+                '4' => __('Translating with WPML', 'sitepress'),
+                '5' => __('We translate using WPML', 'sitepress')
+            );
+            if(!isset($this->settings['promote_wpml_footer_version'])){
+                $iclsettings['promote_wpml_footer_version'] = $this->settings['promote_wpml_footer_version'] = rand(1,5);
+                $this->save_settings($iclsettings);
+            }
+            $wpml_in_other_langs = array('es','de','ja','zh-hans');
+            $cl = in_array(ICL_LANGUAGE_CODE, $wpml_in_other_langs) ? '/' . ICL_LANGUAGE_CODE . '/' : ''; 
+            echo '<p id="wpml_credit_footer"><a href="http://wpml.org'.$cl.'">' . $footers[$this->settings['promote_wpml_footer_version']] . '</a></p>';
+        }
+    }
+    
+    function enable_advanced_mode(){
+        $this->settings['basic_menu'] = 0;
+        $this->save_settings();
+    }
+    
+    function enable_basic_mode(){
+        $this->settings['basic_menu'] = 1;
+        $this->save_settings();
+    }
+    
+    function xmlrpc_methods($methods){
+        $methods['icanlocalize.get_languages_list'] = array($this, 'xmlrpc_get_languages_list');
+        return $methods;
+    }
+    
+    function xmlrpc_call_actions($action){
+        global $HTTP_RAW_POST_DATA, $wpdb;
+        $params = xml2array($HTTP_RAW_POST_DATA);
+        switch($action){
+            case 'wp.getPage':    
+            case 'blogger.getPost': // yet this doesn't return custom fields
+                if(isset($params['methodCall']['params']['param'][1]['value']['int']['value'])){
+                    $page_id = $params['methodCall']['params']['param'][1]['value']['int']['value'];
+                    $lang_details = $this->get_element_language_details($page_id, 'post_post');
+                    update_post_meta($page_id, '_wpml_language', $lang_details->language_code);
+                    update_post_meta($page_id, '_wpml_trid', $lang_details->trid);
+                    $active_languages = $this->get_active_languages();
+                    $res = $this->get_element_translations($lang_details->trid);
+                    $translations = array();
+                    foreach($active_languages as $k=>$v){
+                        if($page_id != $res[$k]->element_id){
+                            $translations[$k] = isset($res[$k]->element_id) ? $res[$k]->element_id : 0;
+                        }
+                    }
+                    update_post_meta($page_id, '_wpml_translations', json_encode($translations));
+                }
+                break;
+            case 'metaWeblog.getPost':
+                if(isset($params['methodCall']['params']['param'][0]['value']['int']['value'])){
+                    $page_id = $params['methodCall']['params']['param'][0]['value']['int']['value'];
+                    $lang_details = $this->get_element_language_details($page_id, 'post_post');
+                    update_post_meta($page_id, '_wpml_language', $lang_details->language_code);
+                    update_post_meta($page_id, '_wpml_trid', $lang_details->trid);
+                    $active_languages = $this->get_active_languages();
+                    $res = $this->get_element_translations($lang_details->trid);
+                    $translations = array();
+                    foreach($active_languages as $k=>$v){
+                        if($page_id != $res[$k]->element_id){
+                            $translations[$k] = isset($res[$k]->element_id) ? $res[$k]->element_id : 0;
+                        }
+                    }
+                    update_post_meta($page_id, '_wpml_translations', json_encode($translations));
+                }
+                break;   
+            case 'metaWeblog.getRecentPosts':
+                $num_posts = intval($params['methodCall']['params']['param'][3]['value']['int']['value']);
+                if($num_posts){
+                    $posts = get_posts('suppress_filters=false&numberposts='.$num_posts);
+                    foreach($posts as $p){
+                        $lang_details = $this->get_element_language_details($p->ID, 'post_post');
+                        update_post_meta($p->ID, '_wpml_language', $lang_details->language_code);
+                        update_post_meta($p->ID, '_wpml_trid', $lang_details->trid);
+                        $active_languages = $this->get_active_languages();
+                        $res = $this->get_element_translations($lang_details->trid);
+                        $translations = array();
+                        foreach($active_languages as $k=>$v){
+                            if($p->ID != $res[$k]->element_id){
+                                $translations[$k] = isset($res[$k]->element_id) ? $res[$k]->element_id : 0;
+                            }
+                        }
+                        update_post_meta($p->ID, '_wpml_translations', json_encode($translations));
+                    }
+                }
+                break;         
+            
+            case 'metaWeblog.newPost':
+                $custom_fields = $params['methodCall']['params']['param'][3]['value']['struct']['member'][3]['value']['array']['data']['value'];
+                if(is_array($custom_fields)){                    
+                    foreach($custom_fields as $cf){
+                        if($cf['struct']['member'][0]['value']['string']['value'] == '_wpml_language'){
+                            $icl_post_language = $cf['struct']['member'][1]['value']['string']['value'];
+                        }elseif($cf['struct']['member'][0]['value']['string']['value'] == '_wpml_trid'){
+                            $icl_trid = $cf['struct']['member'][1]['value']['string']['value'];
+                        }
+                    }
+                    if($icl_trid && $icl_post_language && 
+                        !$wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE element_type='post_post' 
+                            AND trid={$icl_trid} AND language_code='{$icl_post_language}'")){
+                        $_POST['icl_post_language'] = $icl_post_language;
+                        $_POST['icl_trid']          = $icl_trid;
+                    }else{
+                        $IXR_Error = new IXR_Error( 401, __('A translation for this post already exists', 'sitepress') );    
+                        echo $IXR_Error->getXml();
+                        exit(1);
+                    }
+                }
+                break;
+            case 'metaWeblog.editPost':
+                $post_id = $params['methodCall']['params']['param'][0]['value']['int']['value'];
+                if(!$post_id){
+                    break;
+                }                
+                $custom_fields = $params['methodCall']['params']['param'][3]['value']['struct']['member'][3]['value']['array']['data']['value'];
+                if(is_array($custom_fields)){                    
+                    foreach($custom_fields as $cf){
+                        if($cf['struct']['member'][0]['value']['string']['value'] == '_wpml_language'){
+                            $icl_post_language = $cf['struct']['member'][1]['value']['string']['value'];
+                        }elseif($cf['struct']['member'][0]['value']['string']['value'] == '_wpml_trid'){
+                            $icl_trid = $cf['struct']['member'][1]['value']['string']['value'];
+                        }
+                    }
+                    
+                    $epost_id = $wpdb->get_var("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE element_type='post_post' 
+                        AND trid={$icl_trid} AND language_code='{$icl_post_language}'");                    
+                    if($icl_trid && $icl_post_language && (!$epost_id || $epost_id == $post_id)){
+                        $_POST['icl_post_language'] = $icl_post_language;
+                        $_POST['icl_trid']          = $icl_trid;                        
+                    }else{
+                        $IXR_Error = new IXR_Error( 401, __('A translation in this language already exists', 'sitepress') );    
+                        echo $IXR_Error->getXml();
+                        exit(1);
+                    }
+                }
+                break;
+        }
+    }
+    
+    function xmlrpc_get_languages_list($lang){
+        global $wpdb;                                                                          
+        if(!is_null($lang)){
+            if(!$wpdb->get_var("SELECT code FROM {$wpdb->prefix}icl_languages WHERE code='".mysql_real_escape_string($lang)."'")){
+                $IXR_Error = new IXR_Error( 401, __('Invalid language code', 'sitepress') );    
+                echo $IXR_Error->getXml();
+                exit(1);
+            }
+            $this->admin_language = $lang;
+        }                 
+        define('WP_ADMIN', true); // hack - allow to force display language
+        $active_languages = $this->get_active_languages(true);
+        return $active_languages;
+        
+    }
+    
+    function get_current_action_step() {
+        global $wpdb;
+        
+        $icl_lang_status = $this->settings['icl_lang_status'];
+        
+        $has_translators = false;
+        foreach((array)$icl_lang_status as $k => $lang){
+            if(!is_numeric($k)) continue;
+            if(!empty($lang['translators'])){
+                $has_translators = true;
+                break;
+            }
+        }
+        if(!$has_translators){ return 0; }
+        
+        $cms_count = $wpdb->get_var("SELECT COUNT(rid) FROM {$wpdb->prefix}icl_core_status WHERE status=3");
+        
+        if($cms_count > 0) {
+            return 4;
+        }        
+        $cms_count = $wpdb->get_var("SELECT COUNT(rid) FROM {$wpdb->prefix}icl_core_status WHERE 1");
+        if($cms_count == 0) {
+            // No documents sent yet
+            return 1;
+        }
+        
+        if ($this->settings['icl_balance'] <= 0) {
+            return 2;
+        }
+
+        
+        return 3;
+        
+    }
+    
+    function show_action_list() {
+        $steps = array(__('Select translators', 'sitepress'),
+                        __('Send documents to translation', 'sitepress'),
+                        __('Deposit payment', 'sitepress'),
+                        __('Translations will be returned to your site', 'sitepress'));
+
+        $current_step = $this->get_current_action_step();
+        if ($current_step >= sizeof($steps)) {
+            // everything is already setup.
+            if ($this->settings['last_action_step_shown']) {
+                return '';
+            } else {
+                $this->save_settings(array('last_action_step_shown' => 1));
+            }
+        }
+        
+        $output = '
+            <h3>' . __('Setup check list', 'sitepress') . '</h3>
+            <ul id="icl_check_list">';
+            
+        foreach($steps as $index => $step) {
+            $step_data = $step;
+            
+            if ($index < $current_step || ($index == 4 && $this->settings['icl_balance'] > 0)) {
+                $attr = ' class="icl_tick"';
+            } else {
+                $attr = ' class="icl_next_step"';
+            }
+            
+            if ($index == $current_step) {
+                $output .= '<li class="icl_info"><b>' . $step_data . '</b></li>';
+            } else {
+                $output .= '<li' . $attr. '>' . $step_data . '</li>';
+            }
+            $output .= "\n";
+        }
+                
+        $output .= '
+            </ul>';
+        
+        return $output;
+    }
+    
+    function show_pro_sidebar() {
+        $output = '<div id="icl_sidebar" class="icl_sidebar" style="display:none">';
+        
+        $action_list = $this->show_action_list();
+        $show_minimized = $this->settings['icl_sidebar_minimized'];
+        if ($action_list != '') {
+            $show_minimized = false;
+        }
+
+        if ($show_minimized) {
+            $output .= '<div id="icl_sidebar_full" style="display:none">';
+        } else {
+            $output .= '<div id="icl_sidebar_full">';
+        }
+
+        if ($action_list == '') {
+            $output .= '<a id="icl_sidebar_hide" href="#">hide</a>';
+        } else {
+            $output .= $action_list;
+        }
+        
+        $output .= '<h3>' . __('Help', 'sitepress') . '</h3>';
+        $output .= '<div id="icl_help_links"></div>';
+        $output .= '</div>';
+        if ($show_minimized) {
+            $output .= '<div id="icl_sidebar_hide_div">';
+        } else {
+            $output .= '<div id="icl_sidebar_hide_div" style="display:none">';
+        }
+        $output .= '<a id="icl_sidebar_show" href="#"><img width="16" height="16" src="' . ICL_PLUGIN_URL . '/res/img/question1.png' . '" alt="'.__('Get help','sitepress').'" title="'.__('Get help','sitepress').'" /></a>';
+        $output .= '</div>';
+        $output .= '</div>';
+        
+        return $output;
+        
+    }
+    
+    function meta_generator_tag(){
+        $lids = array();
+        foreach($this->get_active_languages() as $l){
+            $lids[] = $l['id'];
+        }
+        $stt = join(",",$lids);
+        $stt .= ";" . intval($this->settings['modules']['cms-navigation']['enabled']);
+        $stt .= ";" . intval($this->settings['modules']['absolute-links']['enabled']);
+        $stt .= ";" . intval($this->get_icl_translation_enabled());
+        printf('<meta name="generator" content="WPML ver:%s stt:%s" />' . PHP_EOL, ICL_SITEPRESS_VERSION, $stt);        
+    }
+    
+    function set_language_cookie(){ 
+        if (!headers_sent()){
+            if(preg_match('@\.(css|js|png|jpg|gif|jpeg|bmp)@i',basename(preg_replace('@\?.*$@','',$_SERVER['REQUEST_URI']))) ||
+                isset($_POST['icl_ajx_action']) || isset($_POST['_ajax_nonce'])){
+                return;
+            }
+            
+            $cookie_domain = defined('COOKIE_DOMAIN') ? COOKIE_DOMAIN : $_SERVER['HTTP_HOST'];
+            $cookie_path = defined('COOKIEPATH') ? COOKIEPATH : '/';                
+            setcookie('_icl_current_language', $this->get_current_language(), time()+86400, $cookie_path, $cookie_domain);
+        }
+    }
+    
+    function get_language_cookie(){
+        if(isset($_COOKIE['_icl_current_language'])){
+            $lang = $_COOKIE['_icl_current_language'];
+        }else{
+            $lang = '';
+        }
+        return $lang;
+    }
+    
+    function rewrite_rules_filter($value){
+        foreach($value as $k=>$v){
+            $value[$this->get_current_language().'/'.$k] = $v;
+            unset($value[$k]);
+        }
+        $value[$this->get_current_language()] = 'index.php';
+        return $value;
+    }
+    
+    function is_rtl(){
+        return in_array($this->get_current_language(), array('ar','he','fa'));
+    }
+    
+    function get_translatable_documents($include_not_synced = false){
+        global $wp_post_types;
+        $icl_post_types = array();
+        foreach($wp_post_types as $k=>$v){
+            if(!in_array($k, array('attachment','revision','nav_menu_item'))){
+                if(!$include_not_synced && $this->settings['custom_posts_sync_option'][$k] != 1 && !in_array($k, array('post','page'))) continue;
+                $icl_post_types[$k] = $v;
+                /* preWP3 compatibility  - start */
+                if(ICL_PRE_WP3){
+                    if(is_array($v->labels)){
+                        $icl_post_types[$k]->labels = (object) $icl_post_types[$k]->labels;        
+                    }
+                }
+                /* preWP3 compatibility  - end */        
+            }        
+        }
+        /* preWP3 compatibility  - start */
+        if(ICL_PRE_WP3){
+            $icl_post_types['post']->labels->singular_name = 'Post';
+            $icl_post_types['post']->labels->name = 'Posts';
+            $icl_post_types['page']->labels->singular_name = 'Page';
+            $icl_post_types['page']->labels->name = 'Pages';
+        }
+        /* preWP3 compatibility  - end */                
+        return $icl_post_types;        
+    }
+    
+    function is_translated_taxonomy($tax){
+        switch($tax){
+            case 'category':
+            case 'post_tag':
+                $ret = true;
+                break;
+            default:
+                $ret = $this->settings['taxonomies_sync_option'][$tax]; 
+        }
+        return $ret;
+    }
+
+    function is_translated_post_type($type){
+        switch($type){
+            case 'post':
+            case 'page':
+                $ret = true;
+                break;
+            default:
+                $ret = $this->settings['custom_posts_sync_option'][$type]; 
+        }
+        return $ret;
+    }
+    
+    function print_translatable_custom_content_status(){
+        global $wp_taxonomies;
+        $icl_post_types = $this->get_translatable_documents(true);
+        $cposts = array();
+        $notice = '';
+        foreach($icl_post_types as $k=>$v){
+            if(!in_array($k, array('post','page'))){
+                $cposts[$k] = $v;        
+            }
+        }
+        foreach($cposts as $k=>$cpost){
+            if(!isset($this->settings['custom_posts_sync_option'][$k])){
+                $cposts_sync_not_set[] = $cpost->labels->name;
+            }    
+        }    
+        if(!empty($cposts_sync_not_set)){
+            $notice = '<p class="updated fade">';
+            $notice .= sprintf(__("You haven't set your <a %s>synchronization preferences</a> for these custom posts: %s. Default value was selected.", 'sitepress'), 
+                'href="admin.php?page='. ICL_PLUGIN_FOLDER . '/menu/translation-synchronization.php"' , '<i>'.join('</i>, <i>', $cposts_sync_not_set) . '</i>');
+            $notice .= '</p>';
+        }
+        
+        $ctaxonomies = array_diff(array_keys((array)$wp_taxonomies), array('post_tag','category', 'nav_menu', 'link_category'));    
+        foreach($ctaxonomies as $ctax){
+            if(!isset($this->settings['taxonomies_sync_option'][$ctax])){
+                $tax_sync_not_set[] = $wp_taxonomies[$ctax]->label;
+            }    
+        }
+        if(!empty($tax_sync_not_set)){
+            $notice .= '<p class="updated">';
+            $notice .= sprintf(__("You haven't set your <a %s>synchronization preferences</a> for these taxonomies: %s. Default value was selected.", 'sitepress'), 
+                'href="admin.php?page='. ICL_PLUGIN_FOLDER . '/menu/translation-synchronization.php"', '<i>'.join('</i>, <i>', $tax_sync_not_set) . '</i>');
+            $notice .= '</p>';
+        }
+        
+        echo $notice;        
+    }
+    function dashboard_widget_setup(){        
+        $dashboard_widgets_order = (array)get_user_option( "meta-box-order_dashboard" );        
+        $icl_dashboard_widget_id = 'icl_dashboard_widget';
+        $all_widgets = array();
+        foreach($dashboard_widgets_order as $k=>$v){
+            $all_widgets = array_merge($all_widgets, explode(',', $v));
+        }        
+        if(!in_array($icl_dashboard_widget_id, $all_widgets)){
+            $install = true;
+        }else{$install = false;}        
+        wp_add_dashboard_widget($icl_dashboard_widget_id, __('WPML Status', 'sitepress'), array($this, 'dashboard_widget'), null);
+        if($install){
+            $dashboard_widgets_order['side'] = $icl_dashboard_widget_id . ',' . $dashboard_widgets_order['side'];   
+            $user = wp_get_current_user();            
+            update_user_option($user->ID, 'meta-box-order_dashboard', $dashboard_widgets_order);
+            /* preWP3 compatibility  - start */
+            if(ICL_PRE_WP3){
+                // bug with WP 2.9 reading the correct data after update_user_option
+                header("Location: index.php");
+                exit;
+            }
+            /* preWP3 compatibility  - end   */
+        }
+    }
+    function dashboard_widget(){        
+        do_action('icl_dashboard_widget_notices');        
+        $active_languages = $this->get_active_languages();    
+        foreach($active_languages as $lang){
+            if($default_language != $lang['code']){$default = '';}else{$default = ' ('.__('default','sitepress').')';}
+            $alanguages_links[] = $lang['display_name'] . $default;
+        }
+        require_once(ICL_PLUGIN_PATH . '/inc/support.php');
+        $SitePress_Support = new SitePress_Support;
+        $pss_status = $SitePress_Support->get_subscription();
+        if(!isset($pss_status['valid'])){
+            $pss_string_status = __('None', 'sitepress'); 
+        }else{
+            if($pss_status['valid']){
+                $pss_string_status = '<span class="icl_valid_text">' . sprintf(__('Valid! (amount: $%d - until %s)', 'sitepress'), $pss_status['amount'], date('d/m/Y', $pss_status['expires'])) . '</span>';
+            }else{
+                $pss_string_status = '<span class="icl_error_text">' . sprintf(__('Expired! - since %s', 'sitepress'), date('d/m/Y', $pss_status['expires'])) . '</span>';
+            }
+        }
+        ?>
+        <p><?php echo sprintf(__('WPML version: %s'), '<strong>' . ICL_SITEPRESS_VERSION . '</strong>'); ?></p>        
+        <?php if(!$this->settings['setup_complete']): ?>
+        <p class="updated" style="padding:4px"><a href="admin.php?page=<?php echo ICL_PLUGIN_FOLDER ?>/menu/languages.php"><strong><?php _e('Finish the WPML setup.', 'sitepress') ?></strong></a></p>
+        <?php else: ?>
+        <p><?php _e('Currently configured languages:', 'sitepress')?> <b><?php echo join(', ', (array)$alanguages_links)?></b> (<a href="admin.php?page=<?php echo ICL_PLUGIN_FOLDER ?>/menu/languages.php"><?php _e('edit', 'sitepress'); ?></a>)</p>
+        <?php endif; ?>
+        <p><?php printf(__('Support Subscription - %s', 'sitepress'), $pss_string_status); ?> 
+            <?php if(!$pss_status['valid']):?>(<a href="admin.php?page=<?php echo ICL_PLUGIN_FOLDER ?>/menu/support.php"><?php _e('purchase', 'sitepress'); ?></a>)<?php endif; ?></p>
+        <?php do_action('icl_dashboard_widget_content'); ?>
+        <?php if(!$this->settings['basic_menu']):?>
+        <p><a href="admin.php?page=<?php echo ICL_PLUGIN_FOLDER ?>/menu/overview.php"><?php _e('more', 'sitepress')?></a></p>
+        <?php endif; ?>
+        <?php
+    }
+    
+    function verify_post_translations($post_type){
+        global $wpdb;
+        $post_ids = $wpdb->get_col("SELECT ID FROM {$wpdb->posts} WHERE post_type='{$post_type}' AND post_status <> 'auto-draft'");
+        if(!empty($post_ids)){
+            foreach($post_ids as $id){
+                $translation_id = $wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE element_id='{$id}' AND element_type='post_{$post_type}'");
+                if(!$translation_id){
+                    $this->set_element_language_details($id, 'post_' . $post_type , false, $this->get_default_language());
+                }
+            }
+        }
+    }
+    
+    function verify_taxonomy_translations($taxonomy){
+        global $wpdb;
+        $element_ids = $wpdb->get_col("SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy} WHERE taxonomy='{$taxonomy}'");
+        if(!empty($element_ids)){
+            foreach($element_ids as $id){
+                $translation_id = $wpdb->get_var("SELECT translation_id FROM {$wpdb->prefix}icl_translations WHERE element_id='{$id}' AND element_type='tax_{$taxonomy}'");
+                if(!$translation_id){
+                    $this->set_element_language_details($id, 'tax_' . $taxonomy , false, $this->get_default_language());
+                }
+            }
+        }
+    }
+    
+       
+}
+?>
diff --git a/wp-content/plugins/sitepress-multilingual-cms/sitepress.php b/wp-content/plugins/sitepress-multilingual-cms/sitepress.php
new file mode 100644
index 0000000..2a961dd
--- /dev/null
+++ b/wp-content/plugins/sitepress-multilingual-cms/sitepress.php
@@ -0,0 +1,142 @@
+<?php  
+/*
+Plugin Name: WPML Multilingual CMS
+Plugin URI: http://wpml.org/
+Description: WPML Multilingual CMS. <a href="http://wpml.org";>Documentation</a>.
+Author: OnTheGoSystems
+Author URI: http://www.onthegosystems.com
+Version: 1.8.1.2
+*/
+
+/*
+    This file is part of ICanLocalize Translator.
+
+    ICanLocalize Translator is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    ICanLocalize Translator is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with ICanLocalize Translator.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+if(defined('ICL_SITEPRESS_VERSION')) return;
+define('ICL_SITEPRESS_VERSION', '1.8.1.2');
+define('ICL_PLUGIN_PATH', dirname(__FILE__));
+define('ICL_PLUGIN_FOLDER', basename(ICL_PLUGIN_PATH));
+
+if(defined('WP_ADMIN') && defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN){
+    define('ICL_PLUGIN_URL', rtrim(str_replace('http://','https://',get_option('siteurl')),'/') . '/'. PLUGINDIR . '/' . basename(dirname(__FILE__)) );
+}else{
+    define('ICL_PLUGIN_URL', rtrim(get_option('siteurl'),'/') . '/'. PLUGINDIR . '/' . basename(dirname(__FILE__)) );
+}
+if(defined('WP_ADMIN')){
+    require ICL_PLUGIN_PATH . '/inc/php-version-check.php';
+    if(defined('PHP_VERSION_INCOMPATIBLE')) return;
+}
+require ICL_PLUGIN_PATH . '/inc/not-compatible-plugins.php';
+if(!empty($icl_ncp_plugins)){
+    return;
+}  
+
+
+if(isset($_REQUEST['action']) && $_REQUEST['action']=='addblog' && false !== strpos($_SERVER['REQUEST_URI'], '/wpmu-edit.php')){
+    /**
+    * Activate the plugin for WPMU new blogs when WPML is enabled sitewide
+    * 
+    */
+    add_action('wpmu_new_blog', 'icl_wpmu_new_blog');
+    function icl_wpmu_new_blog($blog_id){
+        $wpmu_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );
+        if(isset($wpmu_sitewide_plugins[ICL_PLUGIN_FOLDER.'/'.basename(__FILE__)])){
+            require ICL_PLUGIN_PATH . '/inc/sitepress-schema.php';
+            switch_to_blog($blog_id);
+            icl_sitepress_activate();
+            restore_current_blog();            
+            remove_action('admin_footer', 'icl_display_errors_stack');
+        }
+    }
+    return;
+} 
+
+require ICL_PLUGIN_PATH . '/inc/constants.inc';
+if(defined('ICL_DEBUG_DEVELOPMENT') && ICL_DEBUG_DEVELOPMENT){
+    include ICL_PLUGIN_PATH . '/inc/hacks/debug-actions.php';
+}     
+    
+
+require ICL_PLUGIN_PATH . '/inc/pre-wp3-compatibility.php';
+require ICL_PLUGIN_PATH . '/inc/sitepress-schema.php';
+require ICL_PLUGIN_PATH . '/inc/template-functions.php';
+//require ICL_PLUGIN_PATH . '/inc/translation-management/translation-management.class.php';
+require ICL_PLUGIN_PATH . '/inc/icl-recent-comments-widget.php';
+require ICL_PLUGIN_PATH . '/sitepress.class.php';
+require ICL_PLUGIN_PATH . '/inc/functions.php';
+require ICL_PLUGIN_PATH . '/inc/hacks.php';
+require ICL_PLUGIN_PATH . '/inc/upgrade.php';
+require ICL_PLUGIN_PATH . '/inc/functions-string-translation.php';
+require ICL_PLUGIN_PATH . '/inc/compatibility-packages/functions-packages.php';
+require ICL_PLUGIN_PATH . '/inc/compatibility-packages/wpml-package.class.php';
+require ICL_PLUGIN_PATH . '/inc/affiliate-info.php';
+require ICL_PLUGIN_PATH . '/inc/language-switcher.php';
+require ICL_PLUGIN_PATH . '/inc/import-xml.php';
+
+
+
+if( !isset($_REQUEST['action'])     || ($_REQUEST['action']!='activate' && $_REQUEST['action']!='activate-selected') 
+    || (($_REQUEST['plugin'] != basename(ICL_PLUGIN_PATH).'/'.basename(__FILE__)) 
+        && !in_array(basename(ICL_PLUGIN_PATH).'/'.basename(__FILE__), (array)$_REQUEST['checked']))){
+        
+    $sitepress = new SitePress();
+    $sitepress_settings = $sitepress->get_settings();    
+    
+    // modules load
+    // CMS Navigation
+    if(isset($_GET['enable-cms-navigation'])){
+        $sitepress_settings['modules']['cms-navigation']['enabled'] = intval($_GET['enable-cms-navigation']);
+        $sitepress->save_settings($sitepress_settings);
+    }    
+    if($sitepress_settings['modules']['cms-navigation']['enabled']){
+        require ICL_PLUGIN_PATH . '/modules/cms-navigation/cms-navigation.php';
+        $iclCMSNavigation = new CMSNavigation();
+    }
+    
+    // Sticky Links
+    if(isset($_REQUEST['icl_enable_alp'])){
+        $sitepress_settings['modules']['absolute-links']['enabled'] = intval($_REQUEST['icl_enable_alp']);
+        $sitepress->save_settings($sitepress_settings);
+    }
+    if($sitepress_settings['modules']['absolute-links']['enabled']){
+        require ICL_PLUGIN_PATH . '/modules/absolute-links/absolute-links-plugin.php';
+        $iclAbsoluteLinks = new AbsoluteLinksPlugin();
+    }
+
+    // Professional Translation    
+    require ICL_PLUGIN_PATH . '/modules/icl-translation/icl-translation.php';
+    
+    // Comments translation
+    if($sitepress_settings['existing_content_language_verified']){
+        require ICL_PLUGIN_PATH . '/inc/comments-translation/functions.php';
+    }
+	
+	if (is_admin() && isset($_GET['page']) && $_GET['page'] == ICL_PLUGIN_FOLDER . '/menu/support.php'){
+		require_once ICL_PLUGIN_PATH . '/inc/support.php';
+		$icl_support = new SitePress_Support();
+	}
+    
+    require ICL_PLUGIN_PATH . '/inc/compatibility-packages/init-packages.php';
+    require ICL_PLUGIN_PATH . '/modules/cache-plugins-integration/cache-plugins-integration.php';
+    
+}
+ 
+// activation hook
+register_activation_hook( __FILE__, 'icl_sitepress_activate' );
+register_deactivation_hook(__FILE__, 'icl_sitepress_deactivate');
+
+add_filter('plugin_action_links', 'icl_plugin_action_links', 10, 2); 
+?>
\ No newline at end of file
diff --git a/wp-content/themes/gnome-grass/960.css b/wp-content/themes/gnome-grass/960.css
new file mode 100644
index 0000000..8b5101c
--- /dev/null
+++ b/wp-content/themes/gnome-grass/960.css
@@ -0,0 +1,405 @@
+/*
+	960 Grid System ~ Core CSS.
+	Learn more ~ http://960.gs/
+
+	Licensed under GPL and MIT.
+*/
+
+/* `Containers
+----------------------------------------------------------------------------------------------------*/
+
+.container_12,
+.container_16 {
+	margin-left: auto;
+	margin-right: auto;
+	width: 960px;
+}
+
+/* `Grid >> Global
+----------------------------------------------------------------------------------------------------*/
+
+.grid_1,
+.grid_2,
+.grid_3,
+.grid_4,
+.grid_5,
+.grid_6,
+.grid_7,
+.grid_8,
+.grid_9,
+.grid_10,
+.grid_11,
+.grid_12,
+.grid_13,
+.grid_14,
+.grid_15,
+.grid_16 {
+	display: inline;
+	float: left;
+	margin-left: 10px;
+	margin-right: 10px;
+}
+
+.container_12 .grid_3,
+.container_16 .grid_4 {
+	width: 220px;
+}
+
+.container_12 .grid_6,
+.container_16 .grid_8 {
+	width: 460px;
+}
+
+.container_12 .grid_9,
+.container_16 .grid_12 {
+	width: 700px;
+}
+
+.container_12 .grid_12,
+.container_16 .grid_16 {
+	width: 940px;
+}
+
+/* `Grid >> Children (Alpha ~ First, Omega ~ Last)
+----------------------------------------------------------------------------------------------------*/
+
+.alpha {
+	margin-left: 0;
+}
+
+.omega {
+	margin-right: 0;
+}
+
+/* `Grid >> 12 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.container_12 .grid_1 {
+	width: 60px;
+}
+
+.container_12 .grid_2 {
+	width: 140px;
+}
+
+.container_12 .grid_4 {
+	width: 300px;
+}
+
+.container_12 .grid_5 {
+	width: 380px;
+}
+
+.container_12 .grid_7 {
+	width: 540px;
+}
+
+.container_12 .grid_8 {
+	width: 620px;
+}
+
+.container_12 .grid_10 {
+	width: 780px;
+}
+
+.container_12 .grid_11 {
+	width: 860px;
+}
+
+/* `Grid >> 16 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.container_16 .grid_1 {
+	width: 40px;
+}
+
+.container_16 .grid_2 {
+	width: 100px;
+}
+
+.container_16 .grid_3 {
+	width: 160px;
+}
+
+.container_16 .grid_5 {
+	width: 280px;
+}
+
+.container_16 .grid_6 {
+	width: 340px;
+}
+
+.container_16 .grid_7 {
+	width: 400px;
+}
+
+.container_16 .grid_9 {
+	width: 520px;
+}
+
+.container_16 .grid_10 {
+	width: 580px;
+}
+
+.container_16 .grid_11 {
+	width: 640px;
+}
+
+.container_16 .grid_13 {
+	width: 760px;
+}
+
+.container_16 .grid_14 {
+	width: 820px;
+}
+
+.container_16 .grid_15 {
+	width: 880px;
+}
+
+/* `Prefix Extra Space >> Global
+----------------------------------------------------------------------------------------------------*/
+
+.container_12 .prefix_3,
+.container_16 .prefix_4 {
+	padding-left: 240px;
+}
+
+.container_12 .prefix_6,
+.container_16 .prefix_8 {
+	padding-left: 480px;
+}
+
+.container_12 .prefix_9,
+.container_16 .prefix_12 {
+	padding-left: 720px;
+}
+
+/* `Prefix Extra Space >> 12 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.container_12 .prefix_1 {
+	padding-left: 80px;
+}
+
+.container_12 .prefix_2 {
+	padding-left: 160px;
+}
+
+.container_12 .prefix_4 {
+	padding-left: 320px;
+}
+
+.container_12 .prefix_5 {
+	padding-left: 400px;
+}
+
+.container_12 .prefix_7 {
+	padding-left: 560px;
+}
+
+.container_12 .prefix_8 {
+	padding-left: 640px;
+}
+
+.container_12 .prefix_10 {
+	padding-left: 800px;
+}
+
+.container_12 .prefix_11 {
+	padding-left: 880px;
+}
+
+/* `Prefix Extra Space >> 16 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.container_16 .prefix_1 {
+	padding-left: 60px;
+}
+
+.container_16 .prefix_2 {
+	padding-left: 120px;
+}
+
+.container_16 .prefix_3 {
+	padding-left: 180px;
+}
+
+.container_16 .prefix_5 {
+	padding-left: 300px;
+}
+
+.container_16 .prefix_6 {
+	padding-left: 360px;
+}
+
+.container_16 .prefix_7 {
+	padding-left: 420px;
+}
+
+.container_16 .prefix_9 {
+	padding-left: 540px;
+}
+
+.container_16 .prefix_10 {
+	padding-left: 600px;
+}
+
+.container_16 .prefix_11 {
+	padding-left: 660px;
+}
+
+.container_16 .prefix_13 {
+	padding-left: 780px;
+}
+
+.container_16 .prefix_14 {
+	padding-left: 840px;
+}
+
+.container_16 .prefix_15 {
+	padding-left: 900px;
+}
+
+/* `Suffix Extra Space >> Global
+----------------------------------------------------------------------------------------------------*/
+
+.container_12 .suffix_3,
+.container_16 .suffix_4 {
+	padding-right: 240px;
+}
+
+.container_12 .suffix_6,
+.container_16 .suffix_8 {
+	padding-right: 480px;
+}
+
+.container_12 .suffix_9,
+.container_16 .suffix_12 {
+	padding-right: 720px;
+}
+
+/* `Suffix Extra Space >> 12 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.container_12 .suffix_1 {
+	padding-right: 80px;
+}
+
+.container_12 .suffix_2 {
+	padding-right: 160px;
+}
+
+.container_12 .suffix_4 {
+	padding-right: 320px;
+}
+
+.container_12 .suffix_5 {
+	padding-right: 400px;
+}
+
+.container_12 .suffix_7 {
+	padding-right: 560px;
+}
+
+.container_12 .suffix_8 {
+	padding-right: 640px;
+}
+
+.container_12 .suffix_10 {
+	padding-right: 800px;
+}
+
+.container_12 .suffix_11 {
+	padding-right: 880px;
+}
+
+/* `Suffix Extra Space >> 16 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.container_16 .suffix_1 {
+	padding-right: 60px;
+}
+
+.container_16 .suffix_2 {
+	padding-right: 120px;
+}
+
+.container_16 .suffix_3 {
+	padding-right: 180px;
+}
+
+.container_16 .suffix_5 {
+	padding-right: 300px;
+}
+
+.container_16 .suffix_6 {
+	padding-right: 360px;
+}
+
+.container_16 .suffix_7 {
+	padding-right: 420px;
+}
+
+.container_16 .suffix_9 {
+	padding-right: 540px;
+}
+
+.container_16 .suffix_10 {
+	padding-right: 600px;
+}
+
+.container_16 .suffix_11 {
+	padding-right: 660px;
+}
+
+.container_16 .suffix_13 {
+	padding-right: 780px;
+}
+
+.container_16 .suffix_14 {
+	padding-right: 840px;
+}
+
+.container_16 .suffix_15 {
+	padding-right: 900px;
+}
+
+/* `Clear Floated Elements
+----------------------------------------------------------------------------------------------------*/
+
+/* http://sonspring.com/journal/clearing-floats */
+
+.clear {
+	clear: both;
+	display: block;
+	overflow: hidden;
+	visibility: hidden;
+	width: 0;
+	height: 0;
+}
+
+/* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */
+
+.clearfix:after {
+	clear: both;
+	content: ' ';
+	display: block;
+	font-size: 0;
+	line-height: 0;
+	visibility: hidden;
+	width: 0;
+	height: 0;
+}
+
+.clearfix {
+	display: inline-block;
+}
+
+* html .clearfix {
+	height: 1%;
+}
+
+.clearfix {
+	display: block;
+}
\ No newline at end of file
diff --git a/wp-content/themes/gnome-grass/editor_style.css b/wp-content/themes/gnome-grass/editor_style.css
new file mode 100644
index 0000000..92af725
--- /dev/null
+++ b/wp-content/themes/gnome-grass/editor_style.css
@@ -0,0 +1,239 @@
+ import url("text.css");
+
+body.mceContentBody {
+    font-family: 'Droid Sans', 'DejaVu Sans', Verdana, sans-serif;
+    font-size: 14px;
+    line-height: 1.7em;
+    color: #2e3436;
+}
+
+
+/* `Grid >> Global
+----------------------------------------------------------------------------------------------------*/
+
+.grid_1,
+.grid_2,
+.grid_3,
+.grid_4,
+.grid_5,
+.grid_6,
+.grid_7,
+.grid_8,
+.grid_9,
+.grid_10,
+.grid_11,
+.grid_12,
+.grid_13,
+.grid_14,
+.grid_15,
+.grid_16 {
+	display: inline;
+	float: left;
+	margin-left: 10px;
+	margin-right: 10px;
+}
+
+.grid_3,
+	width: 220px;
+}
+
+.grid_6,
+	width: 460px;
+}
+
+.grid_9,
+	width: 700px;
+}
+
+.grid_12,
+	width: 940px;
+}
+
+/* `Grid >> Children (Alpha ~ First, Omega ~ Last)
+----------------------------------------------------------------------------------------------------*/
+
+.alpha {
+	margin-left: 0;
+}
+
+.omega {
+	margin-right: 0;
+}
+
+/* `Grid >> 12 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.grid_1 {
+	width: 60px;
+}
+
+.grid_2 {
+	width: 140px;
+}
+
+.grid_4 {
+	width: 300px;
+}
+
+.grid_5 {
+	width: 380px;
+}
+
+.grid_7 {
+	width: 540px;
+}
+
+.grid_8 {
+	width: 620px;
+}
+
+.grid_10 {
+	width: 780px;
+}
+
+.grid_11 {
+	width: 860px;
+}
+
+
+/* `Prefix Extra Space >> Global
+----------------------------------------------------------------------------------------------------*/
+
+.prefix_3,
+	padding-left: 240px;
+}
+
+.prefix_6,
+	padding-left: 480px;
+}
+
+.prefix_9,
+	padding-left: 720px;
+}
+
+/* `Prefix Extra Space >> 12 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.prefix_1 {
+	padding-left: 80px;
+}
+
+.prefix_2 {
+	padding-left: 160px;
+}
+
+.prefix_4 {
+	padding-left: 320px;
+}
+
+.prefix_5 {
+	padding-left: 400px;
+}
+
+.prefix_7 {
+	padding-left: 560px;
+}
+
+.prefix_8 {
+	padding-left: 640px;
+}
+
+.prefix_10 {
+	padding-left: 800px;
+}
+
+.prefix_11 {
+	padding-left: 880px;
+}
+
+
+
+/* `Suffix Extra Space >> Global
+----------------------------------------------------------------------------------------------------*/
+
+.suffix_3,
+	padding-right: 240px;
+}
+
+.suffix_6,
+	padding-right: 480px;
+}
+
+.suffix_9,
+	padding-right: 720px;
+}
+
+/* `Suffix Extra Space >> 12 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.suffix_1 {
+	padding-right: 80px;
+}
+
+.suffix_2 {
+	padding-right: 160px;
+}
+
+.suffix_4 {
+	padding-right: 320px;
+}
+
+.suffix_5 {
+	padding-right: 400px;
+}
+
+.suffix_7 {
+	padding-right: 560px;
+}
+
+.suffix_8 {
+	padding-right: 640px;
+}
+
+.suffix_10 {
+	padding-right: 800px;
+}
+
+.suffix_11 {
+	padding-right: 880px;
+}
+
+
+/* `Clear Floated Elements
+----------------------------------------------------------------------------------------------------*/
+
+/* http://sonspring.com/journal/clearing-floats */
+
+.clear {
+	clear: both;
+	display: block;
+	overflow: hidden;
+	visibility: hidden;
+	width: 0;
+	height: 0;
+}
+
+/* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */
+
+.clearfix:after {
+	clear: both;
+	content: ' ';
+	display: block;
+	font-size: 0;
+	line-height: 0;
+	visibility: hidden;
+	width: 0;
+	height: 0;
+}
+
+.clearfix {
+	display: inline-block;
+}
+
+* html .clearfix {
+	height: 1%;
+}
+
+.clearfix {
+	display: block;
+}
diff --git a/wp-content/themes/gnome-grass/footer.php b/wp-content/themes/gnome-grass/footer.php
new file mode 100644
index 0000000..de4295d
--- /dev/null
+++ b/wp-content/themes/gnome-grass/footer.php
@@ -0,0 +1,39 @@
+    <div id="footer">
+        <div class="container_12">
+            <div class="links grid_9">
+                <?php
+                wp_nav_menu('menu=footer-1');
+                wp_nav_menu('menu=footer-2');
+                wp_nav_menu('menu=footer-3');
+                wp_nav_menu('menu=footer-4');
+                wp_nav_menu('menu=footer-5');
+                ?>
+            </div>
+            <div class="links grid_3 right">
+                <?php /* <div>
+                    <strong>Also available in:</strong>
+                    <a href="#">Español</a>
+                    <a href="#">Français</a>
+                    <a href="#">Deutsch</a>
+                    <a href="#">Italiano</a>
+                    <a href="#">Português</a>
+                    <a href="#">中æ?? (Chinese)</a>
+                    <a href="#">More...</a>
+                </div>
+                */ ?>
+                <?php
+                $sitepress->language_selector();
+                ?>
+            </div>
+            
+            <div id="footnotes" class="grid_9">
+                Copyright © 2005â??2010 <strong class="gnome_logo"><?php _e( 'The GNOME Project', 'grass' ); ?></strong><br />
+                <small><?php _e( 'Optimised for standards', 'grass' ); ?>. <?php _e( 'Hosted by', 'grass' ); ?> <a href="#">Red Hat</a>.</small>
+            </div>
+            
+            <div class="clear"></div>
+        </div>
+    </div>
+    <?php
+    wp_footer();
+    ?>
diff --git a/wp-content/themes/gnome-grass/footer_art.php b/wp-content/themes/gnome-grass/footer_art.php
new file mode 100644
index 0000000..53da3fe
--- /dev/null
+++ b/wp-content/themes/gnome-grass/footer_art.php
@@ -0,0 +1,14 @@
+            <!-- footer artwork -->
+            <?php
+            
+            $footer = get_post_meta($post->ID, 'footer_art');
+            if(count($footer) > 0) {
+                $footer_art = $footer[0];
+            } else {
+                $footer_art = 'default';
+            }
+            
+            ?>
+            <div id="footer_art" class="grid_12" style="background-image: url(<?php bloginfo('stylesheet_directory') ?>/images/footer_arts/<?php echo $footer_art;?>.png);">
+                <?php print_r($post_meta[$post->ID]); ?>
+            </div>
diff --git a/wp-content/themes/gnome-grass/functions.php b/wp-content/themes/gnome-grass/functions.php
new file mode 100644
index 0000000..c23262d
--- /dev/null
+++ b/wp-content/themes/gnome-grass/functions.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * @package WordPress
+ * @subpackage Default_Theme
+ */
+
+add_editor_style("editor_style.css");
+
+add_theme_support('menus');
+
+add_theme_support( 'post-thumbnails', array( 'banner' ) );
+set_post_thumbnail_size(940, 350);
+
+add_action( 'init', 'create_post_type' );
+function create_post_type() {
+  register_post_type( 'banner',
+    array(
+      'labels' => array(
+        'name' => __( 'Banners' ),
+        'singular_name' => __( 'Banner' )
+      ),
+      'labels' => array(
+        'name' => __( 'Banners' ),
+        'singular_name' => __( 'Banner' ),
+        'add_new' => __( 'Add New' ),
+        'add_new_item' => __( 'Add New Banner' ),
+        'edit' => __( 'Edit' ),
+        'edit_item' => __( 'Edit' ),
+        'new_item' => __( 'New Banner' ),
+        'view' => __( 'View' ),
+        'view_item' => __( 'View Banner' ),
+        'search_items' => __( 'Search Banners' ),
+        'not_found' => __( 'No banners found' ),
+        'not_found_in_trash' => __( 'No banners found in Trash' ),
+        'parent' => __( 'Parent Banner' ),
+      ),
+      'public' => true,
+      'exclude_from_search' => false,
+      'supports' => array(
+        'title', 'thumbnail', 'excerpt', 'revisions', 'author', 'custom-fields'
+      )
+    )
+  );
+}
+
+
+?>
diff --git a/wp-content/themes/gnome-grass/header.php b/wp-content/themes/gnome-grass/header.php
new file mode 100644
index 0000000..0e46f60
--- /dev/null
+++ b/wp-content/themes/gnome-grass/header.php
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+<head>
+	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+    <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
+    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
+    <link rel="icon" type="image/png" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon.png" />
+	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
+	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery-1.4.2.min.js"></script>
+	<script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/template.js"></script>
+	<?php wp_head(); ?>
+</head>
+<body>
+
+    <!-- accessibility access -->
+    <div id="accessibility_access">
+        <ul>
+            <li><a href="#container"><?php _e( 'Go to page content', 'grass' ); ?></a></li>
+            <li><a href="#top_bar"><?php _e( 'Go to main menu', 'grass' ); ?></a></li>
+            <li><a href="#search"><?php _e( 'Go to the search field', 'grass' ); ?></a></li>
+        </ul>
+    </div>
+    
+    <!-- header -->
+    <div id="header" class="container_12">
+        <div id="logo" class="grid_3">
+            <h1><a href="<?php bloginfo('url'); ?>/"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/gnome-logo.png" alt="GNOME" /></a></h1>
+        </div>
+        <div id="top_bar" class="grid_9">
+            <div class="left">
+                <?php wp_nav_menu('menu=globalnav'); ?>
+                <?php /*<ul>
+                    <li class="selected"><a href="index.html">About</a></li>
+                    <li><a href="../products/index.html">Products</a></li>
+                    <li><a href="../download/index.html">Download</a></li>
+                    <li><a href="../support/index.html">Support</a></li>
+                    <li><a href="../community/index.html">Community</a></li>
+                    <li><a href="../contact/index.html">Contact</a></li>
+                </ul> */ ?>
+            </div>
+            <div class="right">
+                <form role="search" method="get" id="searchform" action="<?php bloginfo('url'); ?>/" >
+                    <div>
+                        <input type="text" value="<?php if(isset($_GET['s'])) { echo htmlentities(strip_tags($_GET['s'])); } ?>" name="s" id="s" placeholder="<?php _e( 'Search', 'grass' ); ?>" />
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+
+    <div class="clearfix"></div>
diff --git a/wp-content/themes/gnome-grass/home.php b/wp-content/themes/gnome-grass/home.php
new file mode 100644
index 0000000..66e913e
--- /dev/null
+++ b/wp-content/themes/gnome-grass/home.php
@@ -0,0 +1,79 @@
+<?php
+/*
+Template Name: Single Column
+*/
+
+require_once("header.php"); ?>
+
+    <!-- container -->
+    <div id="container" class="two_columns">
+        <div class="container_12">
+            
+            <div class="content without_sidebar">
+            <?php
+            
+            $temp_query = clone $wp_query;
+            
+            query_posts(array('post_type' => 'banner', 'posts_per_page' => 1));
+            
+            while ( have_posts() ) : the_post();
+            
+            ?>
+                <?php
+                
+                $home_link = get_post_meta($post->ID, 'link', true);
+                
+                echo '<div id="home_banner">';
+                if($home_link != '') {echo '<a href="'.$home_link.'">'; } ?>
+                <?php the_post_thumbnail(array(940, 350), array('alt' => get_the_excerpt($post->ID), 'title' => get_the_title($post->ID))); ?>
+                <?php if($home_link != '') {echo '</a>'; }
+                echo '</div>';
+                ?>
+                
+            <?php endwhile; // End the loop. Whew.
+
+            $wp_query = clone $temp_query;
+            
+            ?><div class="news_list grid_9 alpha"><?php
+            while ( have_posts() ) : the_post();
+            ?>
+                <div class="news">
+                    <div class="date grid_3 alpha">
+                        <?php the_date(); ?>
+                    </div>
+                    
+                    <div class="grid_6 omega">
+                        <a href="<?php the_permalink(); ?>">
+                            <strong><?php the_title(); ?></strong><br />
+                            <?php echo strip_tags(get_the_excerpt()); ?>
+                        </a>
+                    </div>
+                    <div class="clear"></div>
+                </div>
+            <?php
+            endwhile;
+            ?>
+            </div>
+                <div class="grid_3 omega">
+                    <div class="subtle_box">
+                        <p>For more GNOME news, check out the <a href="#">Planet GNOME</a>.</p>
+                        <p><strong>Planet GNOME</strong> groups blogs of GNOME hackers and contribuitors.</p>
+                    </div>
+                </div>
+            <?php
+            
+            ?>
+                <br />
+                <div class="clear"></div>
+            </div>
+            
+            <!-- footer artwork -->
+            <?php require_once("footer_art.php"); ?>
+        </div>
+    </div>
+    
+    <div class="clearfix"></div>
+    
+    <?php require_once("footer.php"); ?>
+</body>
+</html>
diff --git a/wp-content/themes/gnome-grass/images/12_col.gif b/wp-content/themes/gnome-grass/images/12_col.gif
new file mode 100644
index 0000000..52833df
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/12_col.gif differ
diff --git a/wp-content/themes/gnome-grass/images/16_col.gif b/wp-content/themes/gnome-grass/images/16_col.gif
new file mode 100644
index 0000000..93c1b1b
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/16_col.gif differ
diff --git a/wp-content/themes/gnome-grass/images/action_box-bg.png b/wp-content/themes/gnome-grass/images/action_box-bg.png
new file mode 100644
index 0000000..eed7939
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/action_box-bg.png differ
diff --git a/wp-content/themes/gnome-grass/images/favicon.png b/wp-content/themes/gnome-grass/images/favicon.png
new file mode 100644
index 0000000..5d5e45f
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/favicon.png differ
diff --git a/wp-content/themes/gnome-grass/images/focus-bg.png b/wp-content/themes/gnome-grass/images/focus-bg.png
new file mode 100644
index 0000000..101bda1
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/focus-bg.png differ
diff --git a/wp-content/themes/gnome-grass/images/footer_arts/art-2.png b/wp-content/themes/gnome-grass/images/footer_arts/art-2.png
new file mode 100644
index 0000000..71dcd96
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/footer_arts/art-2.png differ
diff --git a/wp-content/themes/gnome-grass/images/footer_arts/art.png b/wp-content/themes/gnome-grass/images/footer_arts/art.png
new file mode 100644
index 0000000..f5fc590
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/footer_arts/art.png differ
diff --git a/wp-content/themes/gnome-grass/images/footer_arts/community.png b/wp-content/themes/gnome-grass/images/footer_arts/community.png
new file mode 100644
index 0000000..0c2237d
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/footer_arts/community.png differ
diff --git a/wp-content/themes/gnome-grass/images/footer_arts/default.png b/wp-content/themes/gnome-grass/images/footer_arts/default.png
new file mode 100644
index 0000000..9de5530
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/footer_arts/default.png differ
diff --git a/wp-content/themes/gnome-grass/images/footer_arts/i18n.png b/wp-content/themes/gnome-grass/images/footer_arts/i18n.png
new file mode 100644
index 0000000..82c0db4
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/footer_arts/i18n.png differ
diff --git a/wp-content/themes/gnome-grass/images/footer_arts/readme.txt b/wp-content/themes/gnome-grass/images/footer_arts/readme.txt
new file mode 100644
index 0000000..b6554d6
--- /dev/null
+++ b/wp-content/themes/gnome-grass/images/footer_arts/readme.txt
@@ -0,0 +1,19 @@
+So, you're about to create a footer art for the GNOME Website! Thank you very 
+much for this! These are the guidelines on how to create your own awesome footer
+art:
+
+- Use drawings based on silhouette, one color based (light gray #d3d7cf).
+- Use transparent background with PNG alpha channels
+- Image size is 940x180 pixels. Don't forget that ;)
+- Putting a fancy animal in the footer art is a plus
+- Inkscape is awesome for this kind of work
+
+After that, set a custom field named "footer_art" right on the custom fields of
+wordpress pages with the name of the file without the extension. For example:
+
+{"footer_art" : "community"}
+
+Sweden hugs from Brazil,
+
+-- Vinicius Depizzol
+vdepizzol gmail com
diff --git a/wp-content/themes/gnome-grass/images/footer_arts/support.png b/wp-content/themes/gnome-grass/images/footer_arts/support.png
new file mode 100644
index 0000000..5343fbc
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/footer_arts/support.png differ
diff --git a/wp-content/themes/gnome-grass/images/gnome-logo.png b/wp-content/themes/gnome-grass/images/gnome-logo.png
new file mode 100644
index 0000000..e5ea779
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/gnome-logo.png differ
diff --git a/wp-content/themes/gnome-grass/images/grass.png b/wp-content/themes/gnome-grass/images/grass.png
new file mode 100644
index 0000000..a2bfc4e
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/grass.png differ
diff --git a/wp-content/themes/gnome-grass/images/search-icon.png b/wp-content/themes/gnome-grass/images/search-icon.png
new file mode 100644
index 0000000..90e8d2c
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/search-icon.png differ
diff --git a/wp-content/themes/gnome-grass/images/selected-language.png b/wp-content/themes/gnome-grass/images/selected-language.png
new file mode 100644
index 0000000..ff67dbc
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/selected-language.png differ
diff --git a/wp-content/themes/gnome-grass/images/top_bar-bg.png b/wp-content/themes/gnome-grass/images/top_bar-bg.png
new file mode 100644
index 0000000..567188c
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/top_bar-bg.png differ
diff --git a/wp-content/themes/gnome-grass/images/top_bar-item-bg.png b/wp-content/themes/gnome-grass/images/top_bar-item-bg.png
new file mode 100644
index 0000000..fbd50fe
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/top_bar-item-bg.png differ
diff --git a/wp-content/themes/gnome-grass/images/top_bar-item-home.png b/wp-content/themes/gnome-grass/images/top_bar-item-home.png
new file mode 100644
index 0000000..1e5a591
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/top_bar-item-home.png differ
diff --git a/wp-content/themes/gnome-grass/images/top_bar-item-hover-bg.png b/wp-content/themes/gnome-grass/images/top_bar-item-hover-bg.png
new file mode 100644
index 0000000..bcfe84d
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/top_bar-item-hover-bg.png differ
diff --git a/wp-content/themes/gnome-grass/images/waterbrush-body-bg.jpg b/wp-content/themes/gnome-grass/images/waterbrush-body-bg.jpg
new file mode 100644
index 0000000..ebee2f6
Binary files /dev/null and b/wp-content/themes/gnome-grass/images/waterbrush-body-bg.jpg differ
diff --git a/wp-content/themes/gnome-grass/index.php b/wp-content/themes/gnome-grass/index.php
new file mode 100644
index 0000000..5c04694
--- /dev/null
+++ b/wp-content/themes/gnome-grass/index.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * @package GNOME Website
+ * @subpackage Grass Theme
+ */
+
+require_once("header.php"); ?>
+
+    <!-- container -->
+    <div id="container" class="two_columns">
+        <div class="container_12">
+        
+            <div class="page_title">
+                <h1><?php the_title(); ?></h1>
+            </div>
+            
+            <div class="content">
+            <?php while ( have_posts() ) : the_post(); ?>
+                <?php the_content(); ?>
+            <?php endwhile; // End the loop. Whew. ?>
+                <br />
+                <div class="clear"></div>
+            </div>
+            
+            <div class="sidebar">
+                
+                <?php
+                $parent_id  = $post->post_parent;
+                $breadcrumbs = array();
+                while ($parent_id) {
+                    $page = get_page($parent_id);
+                    $breadcrumbs[] = get_page($parent_id);
+                    $parent_id  = $page->post_parent;
+                }
+                $breadcrumbs = array_reverse($breadcrumbs);
+                $first_page = $breadcrumbs[0];
+                ?>
+
+                <?php if(is_page()) {?>
+                <ul class="navigation_list">
+                    <?php
+                    if($first_page->ID != '') {
+                        wp_list_pages(array('title_li' => '', 'include' => $first_page->ID));
+                        wp_list_pages(array('title_li' => '', 'child_of' => $first_page->ID));
+                    } else {
+                        wp_list_pages(array('title_li' => '', 'include' => $post->ID));
+                        wp_list_pages(array('title_li' => '', 'child_of' => $post->ID));
+                    }
+                    ?>
+                </ul>
+                <?php } ?>            
+            </div>
+            <?php require_once("footer_art.php"); ?>
+        </div>
+    </div>
+    
+    <div class="clearfix"></div>
+    
+    <?php require_once("footer.php"); ?>
+</body>
+</html>
diff --git a/wp-content/themes/gnome-grass/js/jquery-1.4.2.min.js b/wp-content/themes/gnome-grass/js/jquery-1.4.2.min.js
new file mode 100644
index 0000000..7c24308
--- /dev/null
+++ b/wp-content/themes/gnome-grass/js/jquery-1.4.2.min.js
@@ -0,0 +1,154 @@
+/*!
+ * jQuery JavaScript Library v1.4.2
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Sat Feb 13 22:33:48 2010 -0500
+ */
+(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
+e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
+j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
+"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
+true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
+Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
+(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
+a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
+"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
+function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
+c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
+L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
+"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
+d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
+a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
+!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
+true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
+parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
+s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
+applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
+else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
+a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
+w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
+cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
+i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
+" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
+this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
+e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
+c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
+a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
+function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
+k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
+C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
+null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
+e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
+f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
+if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
+"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
+a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
+isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
+{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
+if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
+e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
+"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
+d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
+!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
+toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
+u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
+function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
+if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
+t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
+g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
+for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
+1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.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(g){return g.getAttribute("href")}},
+relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
+l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
+h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
+CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
+g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
+text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
+setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
+h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
+m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
+"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
+h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
+!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
+h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
+q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
+if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
+(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
+function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
+gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
+c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
+{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
+"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
+d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
+a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
+1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
+a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
+""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
+this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
+u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
+1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
+return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
+""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
+c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
+c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
+function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
+Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
+"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
+a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
+a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
+"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
+serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
+function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
+global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
+e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
+"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
+false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
+false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
+c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
+d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
+g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
+1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
+"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
+if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
+this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
+"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
+animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
+j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
+this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
+"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
+c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
+this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
+this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
+e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
+c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
+function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
+this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
+k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
+f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
+a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
+c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
+d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
+f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
+"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
+e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/wp-content/themes/gnome-grass/js/template.js b/wp-content/themes/gnome-grass/js/template.js
new file mode 100644
index 0000000..4c48c85
--- /dev/null
+++ b/wp-content/themes/gnome-grass/js/template.js
@@ -0,0 +1,26 @@
+$(document).ready(function() {
+    
+    /* Global search placeholder
+     * ====================================================================== */
+    
+    var search_input = $('#s');
+    var search_placeholder = search_input.attr('placeholder');
+    
+    if (!("placeholder" in document.createElement("input"))) {
+        if(search_input.val() == '' || search_input.val() == search_placeholder) {
+            search_input.addClass('placeholder').val(search_placeholder);
+        }
+        
+        search_input.click(function() {
+            if(search_input.hasClass('placeholder')) {
+                search_input.val('').removeClass('placeholder');
+            }
+        });
+        
+        search_input.blur(function() {
+            if(search_input.val() == '' || search_input.val() == search_placeholder) {
+                search_input.addClass('placeholder').val(search_placeholder);
+            }
+        });        
+    }    
+});
diff --git a/wp-content/themes/gnome-grass/reset.css b/wp-content/themes/gnome-grass/reset.css
new file mode 100644
index 0000000..11a1387
--- /dev/null
+++ b/wp-content/themes/gnome-grass/reset.css
@@ -0,0 +1 @@
+html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
diff --git a/wp-content/themes/gnome-grass/screenshot.png b/wp-content/themes/gnome-grass/screenshot.png
new file mode 100644
index 0000000..08652c3
Binary files /dev/null and b/wp-content/themes/gnome-grass/screenshot.png differ
diff --git a/wp-content/themes/gnome-grass/search.php b/wp-content/themes/gnome-grass/search.php
new file mode 100644
index 0000000..9ddce22
--- /dev/null
+++ b/wp-content/themes/gnome-grass/search.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * @package GNOME Website
+ * @subpackage Grass Theme
+ */
+
+require_once("header.php"); ?>
+
+    <!-- container -->
+    <div id="container" class="two_columns">
+        <div class="container_12">
+        
+            <div class="page_title">
+                <h1><?php _e( 'Looking for', 'grass' ); ?> <em><?php echo htmlentities(strip_tags($_GET['s']));?></em>...</h1>
+            </div>
+            
+            <div class="content without_sidebar">
+                <dl>
+                <?php while ( have_posts() ) : the_post(); ?>
+                    <dt><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></dt>
+                    <dd><?php the_excerpt(); ?></dd>
+                <?php endwhile; // End the loop. Whew. ?>
+                </dl>
+                <div class="clear"></div>
+            </div>
+            
+            <?php require_once("footer_art.php"); ?>
+        </div>
+    </div>
+    
+    <div class="clearfix"></div>
+    
+    <?php require_once("footer.php"); ?>
+</body>
+</html>
diff --git a/wp-content/themes/gnome-grass/single-column.php b/wp-content/themes/gnome-grass/single-column.php
new file mode 100644
index 0000000..15cc7cd
--- /dev/null
+++ b/wp-content/themes/gnome-grass/single-column.php
@@ -0,0 +1,45 @@
+<?php
+/*
+Template Name: Single Column
+*/
+
+require_once("header.php"); ?>
+
+    <!-- container -->
+    <div id="container" class="two_columns">
+        <div class="container_12">
+        
+            <div class="page_title">
+                <h1><?php the_title(); ?></h1>
+            </div>
+            
+            <div class="content without_sidebar">
+            <?php while ( have_posts() ) : the_post(); ?>
+                <?php the_content(); ?>
+            <?php endwhile; // End the loop. Whew. ?>
+                <br />
+                <div class="clear"></div>
+            </div>
+            
+            <!-- footer artwork -->
+            <?php
+            
+            $footer = get_post_meta($post->ID, 'footer');
+            if(count($footer) > 0) {
+                $footer_art = $footer[0];
+            } else {
+                $footer_art = 'default';
+            }
+            
+            ?>
+            <div id="footer_art" class="grid_12 <?php echo $footer_art; ?>">
+                <?php print_r($post_meta[$post->ID]); ?>
+            </div>
+        </div>
+    </div>
+    
+    <div class="clearfix"></div>
+    
+    <?php require_once("footer.php"); ?>
+</body>
+</html>
diff --git a/wp-content/themes/gnome-grass/style.css b/wp-content/themes/gnome-grass/style.css
new file mode 100644
index 0000000..e662ea1
--- /dev/null
+++ b/wp-content/themes/gnome-grass/style.css
@@ -0,0 +1,624 @@
+/*
+Theme Name: GNOME Grass
+Theme URI: http://gnome.org/
+Author: Vinicius Depizzol <vdepizzol gmail com>
+Description: The original theme for the GNOME Project website.
+
+*/
+
+
+ import url("reset.css");
+ import url("text.css");
+ import url("960.css");
+
+/* Base information */
+/* ========================================================================== */
+
+html {
+    background: white url("images/waterbrush-body-bg.jpg") top center no-repeat;
+}
+body {
+    
+}
+a {
+    color: #204a87;
+}
+a:hover {
+    color: #3465a4;
+}
+a:visited {
+   color: #5d396e;
+}
+.left {
+    float: left;
+}
+.right {
+    float: right;
+}
+
+
+
+/* Accessibility access */
+/* ========================================================================== */
+
+
+
+#accessibility_access {
+    position: absolute;
+    left: 0;
+    /* Not visible by default? */
+    top: -200px;
+}
+
+
+
+/* Header */
+/* ========================================================================== */
+
+
+
+#header {
+    margin: 20px auto 0;
+}
+#header img {
+    vertical-align: middle;
+    float: left;
+    margin-right: 10px;
+}
+#header #logo {
+   float: left;
+}
+#header #logo h1 {
+    margin: 0;
+}
+#header #logo img {
+   -webkit-transition-duration: 200ms;
+   opacity: 1;
+   margin-left: -3px;
+   height: 76px;
+   width: 199px;
+}
+#header #logo img:hover {
+   opacity: 0.85;
+}
+
+
+
+/* Top bar */
+/* ========================================================================== */
+
+
+
+#top_bar {
+    background: #2e3436 url("images/top_bar-bg.png") top repeat-x;
+    padding: 8px 0;
+    margin-top: 23px;
+    font-size: 13px;
+    line-height: normal;
+    -moz-border-radius: 6px;
+    -webkit-border-radius: 6px;
+    border-radius: 6px;
+    -moz-box-shadow: 0 1px 8px #b9bec4;
+    -webkit-box-shadow: 0 1px 8px #b9bec4;
+    box-shadow: 0 1px 8px #b9bec4;
+}
+#top_bar ul {
+    list-style: none;
+    margin: 0;
+    padding: 0 5px;
+}
+#top_bar ul li {
+    display: inline;
+    margin: 0 5px 0 0;
+}
+#top_bar a {
+    color: #fff;
+    text-decoration: none;
+    padding: 4px 8px;
+    -moz-border-radius: 4px;
+    -webkit-border-radius: 4px;
+    border-radius: 4px;
+    outline: 0;
+    -webkit-transition-duration: 200ms;
+    text-shadow: 0 1px 0 #000;
+}
+#top_bar a:hover {
+    background: #64696d;
+}
+#top_bar a:focus {
+    background: #2e3436 url("images/top_bar-bg.png") bottom repeat-x;
+}
+#top_bar a:active, #top_bar li.current-menu-item a, #top_bar li.current-page-ancestor a {
+    background: #1c2021 url("images/top_bar-item-bg.png") top repeat-x;
+    -moz-box-shadow: inset 0 -1px 0 rgba(100%,100%,100%, 0.4), inset 0 1px 3px rgba(0,0,0,0.4);
+    -webkit-box-shadow: inset 0 -1px 0 rgba(100%,100%,100%, 0.4), inset 0 1px 3px rgba(0,0,0,0.4);
+    box-shadow: inset 0 -1px 0 rgba(100%,100%,100%, 0.4), inset 0 1px 3px rgba(0,0,0,0.4);
+}
+#top_bar li.selected a {
+    font-weight: bold;
+}
+#top_bar li a span.home {
+    background: url("images/top_bar-item-home.png") no-repeat;
+    padding-left: 18px;
+}
+#top_bar #main_search {
+    text-align: right;
+}
+#top_bar input {
+    margin: -8px 0 -8px -8px;
+    line-height: 22px;
+    width: 150px;
+    border: 0;
+    font: inherit;
+    color: inherit;
+    padding: 8px 8px 8px 28px;
+    background: transparent url(images/search-icon.png) 8px center no-repeat;
+    color: #fff;
+    border-left: 1px solid rgba(100%,100%,100%,0.3);
+    outline: none;
+}
+#top_bar input.placeholder {
+    color: #CCC;
+}
+#top_bar input:focus {
+    background-color: rgba(100%,100%,100%,0.1);
+    -moz-border-radius-topright: 5px;
+    -moz-border-radius-bottomright: 5px;
+    -webkit-border-top-right-radius: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    border-top-right-radius: 6px;
+    border-bottom-right-radius: 6px;
+}
+
+
+/* Page Title */
+/* ========================================================================== */
+
+
+
+.page_title {
+   margin: 10px 10px 20px;
+   border-bottom: 1px solid #9fb1c3;
+}
+.page_title h1 {
+    margin: 0;
+    font-size: 42px;
+    color: #6cc23d;
+    text-shadow: 0 1px 0 #fff;
+}
+
+/* -> subpages list */
+
+.page_title .subpages_list {
+   list-style: none;
+   clear: left;
+   margin: 0;
+   padding-bottom: 4px;
+   display: table-cell;
+   text-align: right;
+   white-space: nowrap;
+   vertical-align: bottom;
+}
+.page_title .subpages_list li {
+   display: inline;
+   padding: 0;
+   margin: 0 0 0 0.5em;
+}
+.page_title .subpages_list li a {
+   color: inherit;
+   text-decoration: none;
+   padding: 3px 6px;
+}
+.page_title .subpages_list li a:hover {
+   outline: 0;
+   background: red;
+   background: #dde5ef url(images/focus-bg.png) top repeat-x;
+   border: 1px solid #bbc5d5;
+   padding: 2px 5px;
+   -moz-border-radius: 4px;
+   -webkit-border-radius: 4px;
+   border-radius: 4px;
+}
+.page_title .subpages_list li a.active,
+.page_title .subpages_list li a.navTreeCurrentItem {
+   font-weight: bold;
+}
+
+
+/* Presentation banner */
+
+#home_banner {
+    width: 940px;
+    margin-bottom: 20px;
+    padding-bottom: 20px;
+    border-bottom: 1px solid #ececec;
+    display: block;
+}
+#home_banner img {
+    display: block;
+    margin: 0 auto;
+}
+
+
+
+/* Container */
+/* ========================================================================== */
+
+
+
+#container {
+    padding-top: 20px;
+    color: #555;
+    width: 960px;
+    margin: auto;
+    min-height: 240px;
+}
+#container .page_title, #container .content, #container .sidebar {
+   display: inline;
+   float: left;
+   margin-left: 10px;
+   margin-right: 10px;
+}
+#container .content, #container .page_title {
+   width: 940px;
+}
+#container.two_columns .content {
+   width: 700px;
+}
+#container.two_columns .content.without_sidebar {
+    width: 940px;
+}
+#container.two_columns .sidebar {
+   width: 220px;
+}
+
+/* (...) */
+
+
+
+/* Content specs */
+/* ========================================================================== */
+
+
+/*
+ * -> Call to Action boxes
+ *
+ *
+ */
+
+.action_box {
+   background: #fffae5 url(images/action_box-bg.png) repeat-x bottom;
+   -moz-box-shadow: 0 1px 2px #e5d693, inset 0 1px rgba(100%, 100%, 100%, 0.4);
+   -webkit-box-shadow: 0 1px 2px #e5d693, inset 0 1px rgba(100%, 100%, 100%, 0.4);
+   box-shadow: 0 1px 2px #e5d693, inset 0 1px rgba(100%, 100%, 100%, 0.4);
+   padding: 10px;
+   -moz-border-radius: 5px;
+   -webkit-border-radius: 5px;
+   border-radius: 5px;
+   border: 1px solid #e7d172;
+}
+
+
+/*
+ * -> Subtle boxes
+ *
+ * .subtle_box can be used inside grid classes to make simple box delimiters
+ * (without grids inside of it) or as a child of container class to allow columns on it
+ *
+ * Examples:
+ *
+ * <div class="grid_3">
+ *     <div class="subtle_box">Lorem ipsum dolor sit amet</div>
+ * </div>
+ *
+ * <div class="container_12">
+ *     <div class="subtle_box">
+ *         <div class="grid_3 alpha">(...)</div>
+ *         <div class="grid_9 omega">(...)</div>
+ *     </div>
+ * </div>
+ *
+ */
+
+.subtle_box {
+    margin: 0 0 20px;
+    padding: 9px;
+    background: #fff;
+    border: 1px solid #d3d7cf;
+    border-color: rgba(0,0,0,0.15);
+    -moz-border-radius: 5px;
+    -webkit-border-radius: 5px;
+    border-radius: 5px;
+    -moz-box-shadow: 0 1px 5px rgba(0,0,0,0.1);
+    -webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.1);
+    box-shadow: 0 1px 5px rgba(0,0,0,0.1);
+}
+
+/*
+ * --> Navigation list
+ *
+ * Navigation lists are used to generate a list of links which are in the same
+ * hierarchical level of the current page. Use it in a grid_3 element.
+ *
+ * Don't forget to highlight with <li class="current_page_item"> the current page.
+ *
+ */
+
+.navigation_list {
+    background: #fff;
+    margin: 0 0 20px;
+    padding: 0;
+    border: 1px solid #d3d7cf;
+    border: 1px solid rgba(0, 0, 0, 0.2);
+    -moz-border-radius: 6px;
+    -webkit-border-radius: 6px;
+    border-radius: 6px;
+    list-style: none;
+    font-size: small;
+    -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 1px 2px #fff;
+    -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 1px 2px #fff;
+    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), inset 0 1px 2px #fff;
+}
+.navigation_list > li {
+    margin: 0;
+    background: #f5f5f4;
+    border: 1px solid #fff;
+    border-bottom-color: #d3d7cf;
+}
+.navigation_list > li.current_page_item,
+.navigation_list > li a.navTreeCurrentItem {
+   background: #dde5ef url(images/focus-bg.png) top repeat-x;
+}
+.navigation_list li:first-child {
+   -moz-border-radius-topleft: 5px;
+   -moz-border-radius-topright: 5px;
+   -webkit-border-top-left-radius: 5px;
+   -webkit-border-top-right-radius: 5px;
+   border-top-left-radius: 5px;
+   border-top-right-radius: 5px;
+}
+.navigation_list li:last-child {
+   border-bottom: 0;
+}
+.navigation_list li:last-child {
+   -moz-border-radius-bottomleft: 5px;
+   -moz-border-radius-bottomright: 5px;
+   -webkit-border-bottom-left-radius: 5px;
+   -webkit-border-bottom-right-radius: 5px;
+   border-bottom-left-radius: 5px;
+   border-bottom-right-radius: 5px;
+}
+.navigation_list a {
+    padding: 6px 9px;
+    color: inherit;
+    text-decoration: none;
+    font-weight: bold;
+    display: block;
+    text-shadow:  white 0 1px 0;
+}
+.navigation_list a.without_icon {
+   padding-left: 37px;
+}
+.navigation_list a:hover {
+    color: #3465a4;
+    background: rgba(100%,100%,100%,0.5);
+    /*-webkit-transition: all 200ms linear;*/
+}
+.navigation_list a:focus {
+   background: #dde5ef url(images/focus-bg.png) top repeat-x;
+   outline: 0;
+   padding: 2px 5px;
+   margin: 3px;
+   border: 1px solid #bbc5d5;
+   -moz-border-radius: 4px;
+   -webkit-border-radius: 4px;
+   border-radius: 4px;
+}
+.navigation_list a.without_icon:focus {
+   padding-left: 33px;
+}
+.navigation_list a img {
+    vertical-align: middle;
+    margin-right: 6px;
+}
+.navigation_list > li ul {
+    background: #fff;
+    margin: 0;
+    padding: 0;
+    list-style: none;
+}
+.navigation_list > li ul li {
+    border-top: 1px solid #ececec;
+    margin: 0;
+    padding: 0;
+}
+.navigation_list > li ul li:first-child {
+   border-top: 0;
+}
+.navigation_list > li ul li a {
+    font-weight: normal;
+    padding: 4px 9px;
+    color: #555753;
+}
+.navigation_list > li ul li.current_page_item a {
+    font-weight: bold;
+}
+.navigation_list > li ul li a:focus {
+   padding: 0 5px;
+}
+.navigation_list > li ul  {
+   padding-top: 1px;
+}
+
+/* -> Iconified Menu */
+
+ul.iconified_menu {
+   list-style: none;
+   margin: 0 0 20px;
+   font-size: small;
+}
+ul.iconified_menu li {
+   margin: 0 0 5px;
+}
+ul.iconified_menu li a {
+   padding: 5px;
+   display: block;
+   text-decoration: none;
+   border: 1px solid transparent;
+   overflow: hidden;
+   -moz-border-radius: 5px;
+   -webkit-border-radius: 5px;
+   border-radius: 5px;
+}
+ul.iconified_menu li a:hover, ul.iconified_menu li a:focus {
+   background: #dde5ef url(images/focus-bg.png) top repeat-x;
+   outline: 0;
+   border: 1px solid #bbc5d5;
+}
+ul.iconified_menu li a img {
+   float: left;
+   margin-right: 5px;
+}
+
+/* -> Definition Lists */
+
+dl dt {
+    font-weight: 700;
+}
+dl dt a {
+    color: inherit;
+}
+dl dt a:visited {
+    color: #ef8e4f;
+}
+
+/* -> Definition Lists with icons */
+
+/* Icons are defined as 48x48 pixels by default */
+
+dl.icon_list dt, dl.icon_list dd {
+   margin-left: 58px;
+}
+dl.icon_list dt img {
+   float: left;
+   width: 48px;
+   height: 48px;
+   margin: 0 10px 0 -58px;
+}
+
+/*
+ * --> News list
+ *
+ * This is initially used in the home page for displaying the news
+ *
+ */
+
+.news_list {
+
+}
+.news_list .news {
+    margin-bottom: 20px;
+}
+.news_list .news .date {
+    text-align: right;
+    font-family: 'Droid Serif', Georgia, serif;
+    color: #888a85;
+    margin-top: 0.1em;
+}
+.news_list .news a {
+    color: #555753;
+    display: block;
+    text-decoration: none;
+}
+.news_list .news a strong {
+    font-size: 18px;
+    color: #000;
+    line-height: 1.5;
+}
+.news_list .news a:hover strong {
+    text-decoration: underline;
+}
+
+
+/* Footer Artwork */
+/* ========================================================================== */
+
+
+
+#footer_art {
+    background: transparent no-repeat;
+    height: 180px;
+    margin-top: 0;
+    clear: left;
+    margin-bottom: -33px;-webkit-transition: all 200ms linear;
+}
+#footer_art.none {
+    height: 30px;
+    margin-top: 0;
+}
+
+
+/* Footer */
+/* ========================================================================== */
+
+
+
+#footer {
+    clear: left;
+    background: #d3d7cf url(images/grass.png) top center repeat-x;
+    color: #555753;
+    padding: 60px 0 20px 0;
+}
+#footer div.links div {
+    float: left;
+    margin-right: 20px;
+}
+#footer div.links.right div {
+    float: right;
+    text-align: right;
+}
+#footer div.links div a, #footer div.links div strong {
+    display: block;
+    text-decoration: none;
+}
+#footer div.links div a:hover, #footer div.links div a:focus {
+    text-decoration: underline;
+}
+#footer ul {
+    margin: 0;
+    padding: 0;
+    list-style: none;
+}
+#footer ul li {
+    margin: 0;
+    padding: 0;
+}
+#footer ul.menu > li > a {
+    font-weight: bold;
+}
+#footer a {
+    color: inherit;
+    background: #d3d7cf;
+    -webkit-transition: background-color 100ms ease-in;
+}
+#footer a.lang_sel_sel {
+    background: url(images/selected-language.png) no-repeat right center;
+    margin-right: -10px;
+    padding-right: 10px;
+}
+#footer a:focus {
+   background: #ececec;
+   padding: 1px 3px;
+   margin: -1px -3px;
+   text-decoration: none !important;
+   outline: 0;
+   -moz-border-radius: 5px;
+   -webkit-border-radius: 5px;
+   border-radius: 5px;
+}
+#footer #footnotes {
+    margin-top: 20px;
+}
+#footer #footnotes small {
+    font-size: 80%;
+}
diff --git a/wp-content/themes/gnome-grass/text.css b/wp-content/themes/gnome-grass/text.css
new file mode 100644
index 0000000..ebd9fee
--- /dev/null
+++ b/wp-content/themes/gnome-grass/text.css
@@ -0,0 +1,87 @@
+/* Main Elements */
+/* ========================================================================== */
+
+
+body {
+    font-family: 'Droid Sans', 'DejaVu Sans', Verdana, sans-serif;
+    font-size: 14px;
+    line-height: 1.7em;
+    color: #2e3436;
+}
+hr {
+    border: 0 #ccc solid;
+    border-top-width: 1px;
+    clear: both;
+    height: 0;
+}
+h1, h2, h3, h4, h5, h6, dt {
+    font-family: 'Droid Serif', Georgia, serif;
+    color: #3465a4;
+    font-weight: 500;
+    line-height: normal;
+    color: #0489B7;
+}
+h1 {
+    font-size: 42px;
+}
+h2 {
+    font-size: 25px;
+}
+h3, dt {
+    font-size: 21px;
+    margin: 0.4em 0 0.5em;
+}
+dt {
+    color: #E36615;
+}
+dt a:hover {
+    color: #fa7721;    
+}
+h4 {
+    font-size: 19px;
+}
+h5 {
+    font-size: 17px;
+}
+h6 {
+    font-size: 15px;
+}
+ol {
+    list-style:decimal;
+}
+ul {
+    list-style:square;
+}
+li {
+    margin-left:30px;
+}
+dl,dt,hr,h1,h2,h3,h4,h5,h6,pre,table,address,fieldset {
+    margin: 0.8em 0 0.4em;
+}
+p, dd, .action_box, ul, ol {
+    margin: 0.4em 0 0.5em;
+}
+
+
+/* Text classes */
+/* ========================================================================== */
+
+.highlight {
+    background: yellow;
+}
+
+.main_feature {
+    font-size: 18pt;
+    font-family: 'Droid Serif', Georgia, serif;
+    line-height: 130%;  
+}
+
+.footnotes {
+    font-size: 11px;
+    color: #888a85;
+}
+
+#footer {
+    font-size: smaller;
+    line-height: 1.5em;
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]