(function(b){b.extend({createElm:function(e,a,f){e=b(document.createElement(e));e.attr(a).html(f);return e},appendElements:function(g,h){var a,f;if(typeof(h)=="string"){g.appendChild(document.createTextNode(h))}else{if(h.length){g=g.appendChild(b.createElm(h[0],h[1])[0]);for(a=2;a<h.length;a++){b.appendElements(g,h[a])}}}},scrollPos:function(){var a=window,e=document.body;return{x:a.pageXOffset||e.scrollLeft,y:a.pageYOffset||e.scrollTop}},winWidth:function(){return window.innerWidth||b(window).width()},winHeight:function(){return window.innerHeight||b(window).height()}});b.fn.extend({appendAll:function(a){this.each(function(e,f){b.appendElements(f,a)})}})})(jQuery);