/* * Pixastic Lib - Core Functions - v0.1.3 * Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk, http://blog.nihilogic.dk/ * License: [http://www.pixastic.com/lib/license.txt] */ var Pixastic = (function() { function addEvent(el, event, handler) { if (el.addEventListener) el.addEventListener(event, handler, false); else if (el.attachEvent) el.attachEvent("on" + event, handler); } function onready(handler) { var handlerDone = false; var execHandler = function() { if (!handlerDone) { handlerDone = true; handler(); } } document.write("<"+"script defer src=\"//:\" id=\"__onload_ie_pixastic__\">"); var script = document.getElementById("__onload_ie_pixastic__"); script.onreadystatechange = function() { if (script.readyState == "complete") { script.parentNode.removeChild(script); execHandler(); } } if (document.addEventListener) document.addEventListener("DOMContentLoaded", execHandler, false); addEvent(window, "load", execHandler); } function init() { var imgEls = getElementsByClass("pixastic", null, "img"); var canvasEls = getElementsByClass("pixastic", null, "canvas"); var elements = imgEls.concat(canvasEls); for (var i=0;i -1) { var tmp = actionName; actionName = tmp.substr(0, tmp.indexOf("(")); var arg = tmp.match(/\((.*?)\)/); if (arg[1]) { arg = arg[1].split(";"); for (var a=0;a