task=null; $(function() { var taskData = [{"content":"
","type":"html"},{"content":"var params = {\"f1\": [\"string\", \"flowergood\"], \"question\": \"http://static.beverwedstrijd.nl/9/8/7/2014_si_07_question.png\", \"height\": [\"number\", \"280\"], \"flowergood\": \"http://static.beverwedstrijd.nl/f/a/5/2014_si_07_flowergood.png\", \"width\": [\"number\", \"200\"], \"flowerbad\": \"http://static.beverwedstrijd.nl/5/6/8/2014_si_07_flowerbad.png\"};params.loaded = function() {var containers = [];$.each(containers, function(){var cont=this[0]; $.each(this[1],function(){cont.add(task.get(this))})});var switches = new Array();\r\n\r\nfor (var i=0;i<3;i++) {\r\n switches[i] = new task.Switch({\r\n on_state: new task.Picture({url: task.params.flowergood}),\r\n off_state: new task.Picture({url: task.params.flowerbad}),\r\n answer:true\r\n });\r\n switches[i].toggle(0);\r\n switches[i].move(i*70,210);\r\n} \r\n\r\nnew task.Picture({url: task.params.question});\r\n\r\n/* \r\n This is to reset the solution to an answer given\r\n by the contest system. It has no effect when there\r\n is no element with id \"answer\".\r\n If it exists, it should contain the empty string (initial configuration)\r\n or the String returned by task.getAnswer().\r\n*/\r\n\r\nvar answerEl = document.getElementById('answer');\r\n//answerEl = {value:\"[0,1,1]\"}; // for testing within the lodge\r\nif (answerEl) {\r\n var iniAnswer = answerEl.value;\r\n if (iniAnswer != \"\") {\r\n iniAnswer = eval(unescape(iniAnswer));\r\n for (var i=0; i