Commits

petraszd committed 02e1cac

Colors

Comments (0)

Files changed (3)

 </head>
 <body onload="initialize()">
   <div id="everything">
-    <h1>Bankrotai Lietuvoje (Nuo 1993-04 iki 2012-01)</h1>
+    <h1 id="header">Bankrotai Lietuvoje (Nuo 1993-04 iki 2012-01)</h1>
     <div id="map"></div>
     <div id="canvas"></div>
   </div>
 var CFG = {
   scatttering: 40.0,
-  fillColor: '#122F24',
-  textColor: '#122F24',
+  fillColor: '#F02375',
+  textColor: '#3B2D38',
+  sliderColor: '#3B2D38',
   growAnim: 150,
   opacityAnim: (1000 / 5) * 8,
   stepLength: 1000 / 5,
   overlay.setMap(map);
   paper = new Raphael(document.getElementById("canvas"), CFG.w, CFG.h + 20);
 
-  line = paper.rect(0, CFG.h, CFG.w, 5).attr({'fill': '#05291B'});
+  line = paper.rect(0, CFG.h, CFG.w, 5).attr({'fill': CFG.sliderColor});
   line.click(onLineClick);
 
-  slider = paper.rect(0, CFG.h - 7, 30, 20, 10).attr({'fill': '#05291B'});
+  slider = paper.rect(0, CFG.h - 7, 30, 20, 10).attr({'fill': CFG.sliderColor});
   slider.drag(onSliderMove, onSliderStart);
   paper.rect(10, 335, 200, 70, 20).attr({
     fill: '#fff',
   setTimeout(function () {
     timer = setInterval(next, CFG.stepLength);
   }, 10);
+
+  document.getElementById('header').addEventListener('click', function () {
+    restart();
+  }, false);
 }
 
 function changeText (newText) {
   slider.attr({x: newX});
   onManualStep();
 }
+
+function restart () {
+  step = 0;
+  for (var i = 0, c; c = circles[i]; ++i) {
+    c.remove();
+  }
+  timer = setInterval(next, CFG.stepLength);
+}
   height: 100%;
   padding: 0;
   margin: 0;
-  background-color: #CEEFE3;
+  background-color: #BCBDAC;
   font-family: Arial,sans-serif;
-  color: #05291B;
+  color: #3B2D38;
 }
 
 body {
   width: 600px;
   height: 420px;
   z-index: 1;
+  box-shadow: 0px 3px 30px #3B2D38;
 }
 
 #canvas {