/* *
 * Javascript Pack
 * Basic Method
 * Author Deo 2010.01.05
 * */
if(typeof jPack=="undefined"||!jPack){var jPack={}}jPack.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=(""+a[i]).split(".");o=jPack;for(j=(d[0]==="jPack")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]]}}return o};jPack.namespace("jPack.structure","jPack");jPack.structure=(function(){var j=navigator.userAgent.toLowerCase();function trim(a){return a.replace(/^\s*|\s*$/g,'')}return{browser:{version:(j.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1],safari:/webkit/.test(j),opera:/opera/.test(j),msie:/msie/.test(j)&&!/opera/.test(j),mozilla:/mozilla/.test(j)&&!/(compatible|webkit)/.test(j)},$:function(a){return document.getElementById(a)},extend:function(a,b){for(var c in b)a[c]=b[c]},each:function(b,c){var i=0,d=b.length;for(;i<d;i++){if(c&&typeof c=='function'){var a=b[i];c(a,i)}}},instring:function(a,b){var c=a.split(/\s+/);for(var i=0;i<c.length;i++)if(c[i]==b)return true;return false},classEvent:function(d){var e=[],f={},g=false;function eachClass(a,b){var c=a.className.split(/\s+/);for(var i=0;i<c.length;i++){if(c[i]!=b){f[c[i]]=c[i]}else{g=true}e.push(c[i])}}return{add:function(a){eachClass(d,a);if(!g){e.push(a)}d.className=e.join(" ").replace(/^\s*|\s*$/g,'')},remove:function(a){eachClass(d,a);e=[];for(var b in f){e.push(b)}d.className=e.join(" ").replace(/^\s*|\s*$/g,'')}}},css:function(c,d){var e=[];if(typeof c=='object'&&d&&typeof d=='object'){if(c.length!=undefined)e=c;else e.push(c);for(var i=0;i<e.length;i++){for(var f in d){var nameCase=f.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()});e[i].style[nameCase]=d[f];if(document.all&&f=='opacity')e[i].style.filter='alpha(opacity='+d["opacity"]*100+')'}}}},getCurrentStyle:function(a,b,c){if(a.style[b]){return a.style[b]}if(a.currentStyle){return a.currentStyle[b]}else if(document.defaultView.getComputedStyle(a,null)){var d=document.defaultView.getComputedStyle(a,null);var e=d.getPropertyValue(c);if(!e){e=d[b]}return e}else if(window.getComputedStyle){var d=window.getComputedStyle(a,"");return d.getPropertyValue(c)}},trim:function(a){return a.replace(/^\s*|\s*$/g,'')},tween:{quint:function(t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b}},moving:function(b,e,f,g){var h=this;var t=0,s=b,c=e,d=f;_0();function _0(){clearTimeout(_0._1);if(t<d){t++;var a=Math.ceil(jPack.tween.quint(t,s,c,d));if(g&&typeof g=='function')g(a);_0._1=setTimeout(_0,0)}else{if(g&&typeof g=='function')g(false)}}},insertAfter:function(a,b){var c=b.parentNode;if(c.lastChild==b)c.appendChild(a);else c.insertBefore(a,b.nextSibling)},breakHref:function(a){var b=trim(a.href),c=trim(document.all?a.getAttribute('href',2):a.getAttribute('href'));if(!/^http(s*):\/\/\w+/i.test(b)||/\w*#+$/.test(c)||c==''){return true}}}})();jPack=jPack.structure;
