// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
//

// Suckerfish dropdowns, see CSS  ... used for "more options"
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

// Prototype.js ?!
function drawSVGObject(svg) {
      var svgObject = document.createElement('object');
      svgObject.setAttribute('type', 'image/svg+xml');
      svgObject.setAttribute('data', 'data:image/svg+xml,'+ svg); 
      document.body.appendChild(svgObject);  
}

//  <script type="application/x-javascript">
//    var svg = '<%= escape_javascript(@svgCode) -%>'  ;
//    drawSVGObject(svg);
//  </script>


