var template = {"url":"http://jsbin.com/ozenu","html" : "<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\"\n  \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\">\n<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n<script src=\"http:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.3.2\/jquery.min.js\"><\/script>\n\n<script src=\"http:\/\/jquery-translate.googlecode.com\/files\/jquery.translate-1.3.7.min.js\"><\/script>\n<script src=\"http:\/\/stilbuero.de\/jquery\/cookie\/jquery.cookie.pack.js\"><\/script>\n\n<title>Sandbox<\/title>\n<meta http-equiv=\"Content-type\" content=\"text\/html; charset=utf-8\" \/>\n<style type=\"text\/css\" media=\"screen\">\nbody { background-color: #000; font: 16px Helvetica, Arial; color: #fff; }\n<\/style>\n<\/head>\n<body>\n  <p>Hello from JS Bin<\/p>\n  <p id=\"hello\"><\/p>\n<script type=\"text\/javascript\">\n<!-- we run in the footer so no need to use onload -->\n%code%\n<\/script>\n<\/body>\n<\/html>","javascript":"document.getElementById(\"hello\").innerHTML = \"Hello World - this was inserted using JavaScript\";\n\njQuery(function($){ \/\/when DOM is ready\n\n  $('body').css('height','800px');\n\n\n  $.translate(function(){  \/\/when the Google Language API is loaded\n  \n    function translateTo( destLang ){ \/\/this can be declared in the global scope too if you need it somewhere else\n        $('body').translate( 'english', destLang, {   \/\/translate from english to the selected language\n          not: '.jq-translate-ui',  \/\/by default the generated element has this className\n          fromOriginal:true   \/\/always translate from english (even after the page has been translated)\n                              \/\/unnecessary in v1.4, the default value is true\n        });\n    }\n    \n        \n    \/\/you can generate other controls as well, not just a dropdown:\n    \/\/there are new features in v1.4: http:\/\/code.google.com\/p\/jquery-translate\/wiki\/Extensions\n    $.translate.ui('ul', 'li', 'span')  \n      .appendTo('body')    \/\/insert the element to the page\n      .css({'color':'blue', 'background-color':'white'})\n      .find('span')\n      .css('cursor','pointer')\n      .click(function(){   \/\/when selecting another language\n        \n        \/\/in v1.4 $(this).val() or $(this).attr(\"value\") \n        \/\/ is always the exact language code!\n        \n        translateTo( $(this).text() );\n        \n        $.cookie('destLang', $(this).text() ); \n        \/\/ set a cookie to remember the selected language\n        \/\/ see: http:\/\/plugins.jquery.com\/project\/Cookie\n        \n        return false; \/\/prevent default browser action\n      })\n    \n\n    \n    var destLang = $.cookie('destLang'); \/\/get previously translated language\n    \n    if( destLang )  \/\/if it was set then\n        translateTo( destLang );\n    \n\n  }); \/\/end of Google Language API loaded\n  \n}) \/\/end of DOM ready\n"}
