checkBrowserWidth();$(document).ready(function(){parseCode("thickbox-code/thickbox.js","ajaxJS");parseCode("thickbox-code/thickbox.css","ajaxCSS");parseCode("thickbox-code/thickbox-compressed.js","ajaxJSCompressed");$(window).resize(checkBrowserWidth);$("div.roundbox").corner("round 9px");$("div.anchor").corner("round bottom 9px");$.tabs("container-1");$.tabs("container-2");$.tabs("container-3");$.tabs("container-4");$.tabs("container-5");$.tabs("container-6");$("#overviewBtn").click(function(){$("#overviewTitle").ScrollTo(800);if(document.getElementById("overview").style.display=="none"){$("#overview").slideDown(500);$("#toggleBtnOverview").html("-")}return false});$("#examplesBtn").click(function(){$("#examplesTitle").ScrollTo(800);if(document.getElementById("examples").style.display=="none"){$("#examples").slideDown(500);$("#toggleBtnExample").html("-")}return false});$("#qaBtn").click(function(){$("#qaTitle").ScrollTo(800);if(document.getElementById("qa").style.display=="none"){$("#qa").slideDown(500);$("#toggleBtnQa").html("-")}return false});$("#supportBtn").click(function(){$("#supportTitle").ScrollTo(800);if(document.getElementById("support").style.display=="none"){$("#support").slideDown(500);$("#toggleBtnSupport").html("-")}return false});$("#donateBtn").click(function(){$("#donateTitle").ScrollTo(800);if(document.getElementById("donate").style.display=="none"){$("#donate").slideDown(500);$("#toggleBtnDonate").html("-")}return false});$(".BTT").click(function(){$("#pageTop").ScrollTo(800);return false});$(".toggleBtn").toggle(function(){if(document.getElementById(this.rel).style.display=="none"){$("#"+this.rel).slideDown(500);this.innerHTML="-";return}this.innerHTML="+";$("#"+this.rel).slideUp(500)},function(){if(document.getElementById(this.rel).style.display=="block"){$("#"+this.rel).slideUp(500);this.innerHTML="+";return}this.innerHTML="-";$("#"+this.rel).slideDown(500)})});function parseCode(b,a){$.get(b,function(c){c=c.replace(/&/mg,"&#38;");c=c.replace(/</mg,"&#60;");c=c.replace(/>/mg,"&#62;");c=c.replace(/\"/mg,"&#34;");c=c.replace(/\t/g,"  ");c=c.replace(/\r?\n/g,"<br>");c=c.replace(/<br><br>/g,"<br>");c=c.replace(/ /g,"&nbsp;");$("#"+a).html(c)})}function checkBrowserWidth(){var b=getBrowserWidth();if(b==0){var a=document.cookie.match(/(^|;)tmib_res_layout[^;]*(;|$)/);if(a!=null){setStylesheet(unescape(a[0].split("=")[1]))}$(document).load(checkBrowserWidth);return false}if(b>900){setStylesheet("1024 x 768");document.cookie="tmib_res_layout="+escape("1024 x 768")}else{setStylesheet("");document.cookie="tmib_res_layout="}return true}function getBrowserWidth(){if(window.innerWidth){return window.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth!=0){return document.documentElement.clientWidth}else{if(document.body){return document.body.clientWidth}}}return 0}function setStylesheet(b){var c;if(document.getElementsByTagName){for(var a=0;(c=document.getElementsByTagName("link")[a]);a++){if(c.getAttribute("rel").indexOf("style")!=-1&&c.getAttribute("title")){c.disabled=true;if(c.getAttribute("title")==b){c.disabled=false}}}}return true}$.fn.corner=function(e){e=e||"";var b=parseInt((e.match(/(\d+)px/)||[])[1])||10;var d=(e.match(/round|bevel|fold|notch/)||["round"])[0];var c={TL:/top|tl/i.test(e),TR:/top|tr/i.test(e),BL:/bottom|bl/i.test(e),BR:/bottom|br/i.test(e)};if(!c.TL&&!c.TR&&!c.BL&&!c.BR){c={TL:1,TR:1,BL:1,BR:1}}var a=document.createElement("div");a.style.overflow="hidden";a.style.height="1px";a.style.backgroundColor="transparent";a.style.borderStyle="solid";return this.each(function(){var n={T:parseInt($.css(this,"paddingTop"))||0,R:parseInt($.css(this,"paddingRight"))||0,B:parseInt($.css(this,"paddingBottom"))||0,L:parseInt($.css(this,"paddingLeft"))||0};a.style.borderColor="#ffffff";if(c.TL||c.TR){a.style.borderStyle="none "+(c.TR?"solid":"none")+" none "+(c.TL?"solid":"none");var k=document.createElement("div");k.style.margin="-"+n.T+"px -"+n.R+"px "+(n.T-b)+"px -"+n.L+"px";k.style.backgroundColor="transparent";for(var j=0;j<b;j++){var g=d=="round"?Math.round(b*(1-Math.cos(Math.asin(j/b)))):j+1;var m=a.cloneNode(false);m.style.borderWidth="0 "+(c.TR?g:0)+"px 0 "+(c.TL?g:0)+"px";k.insertBefore(m,k.firstChild)}this.insertBefore(k,this.firstChild)}if(c.BL||c.BR){a.style.borderStyle="none "+(c.BR?"solid":"none")+" none "+(c.BL?"solid":"none");var f=document.createElement("div");f.style.margin=(n.B-b)+"px -"+n.R+"px -"+n.B+"px -"+n.L+"px";f.style.backgroundColor="transparent";for(var j=0;j<b;j++){var g=d=="round"?Math.round(b*(1-Math.cos(Math.asin(j/b)))):j+1;var m=a.cloneNode(false);m.style.borderWidth="0 "+(c.BR?g:0)+"px 0 "+(c.BL?g:0)+"px";f.appendChild(m)}this.appendChild(f)}})};$.tabs=function(a,e){var c="on";var d="#"+a;var b=(typeof e=="number")?e-1:0;$(d+">div:eq("+b+")").css({display:"block"});$(d+">ul>li:nth-child("+(b+1)+")").addClass(c);$(d+">ul>li>a").click(function(){if(!$(this.parentNode).is("."+c)){var f=/([_\-\w]+$)/i;var g=$("#"+f.exec(this.href)[1]);if(g.size()>0){$(d+">div:visible").css({display:"none"});g.css({display:"block"});$(d+">ul>li").removeClass(c);$(this.parentNode).addClass(c)}else{alert("There is no such container.")}}return false})};var CodeHighlighter={styleSets:new Array};CodeHighlighter.addStyle=function(a,c){if([].push){this.styleSets.push({name:a,rules:c,ignoreCase:arguments[2]||false})}function b(){setTimeout("$(document).ready(function(){CodeHighlighter.init()})",1000)}if(this.styleSets.length==1){b()}};CodeHighlighter.init=function(){if(!document.getElementsByTagName){return}if("a".replace(/a/,function(){return"b"})!="b"){return}var d=document.getElementsByTagName("CODE");d.filter=function(k){var g=new Array;for(var j=0;j<this.length;j++){if(k(this[j])){g[g.length]=this[j]}}return g};var f=new Array;f.toString=function(){var j=new Array;for(var g=0;g<this.length;g++){j.push(this[g].exp)}return j.join("|")};function a(g,i){var j=(typeof i.exp!="string")?String(i.exp).substr(1,String(i.exp).length-2):i.exp;f.push({className:g,exp:"("+j+")",length:(j.match(/(^|[^\\])\([^?]/g)||"").length+1,replacement:i.replacement||null})}function e(i,g){return i.replace(new RegExp(f,(g)?"gi":"g"),function(){var p=0,n=1,q;while(q=f[p++]){if(arguments[n]){if(!q.replacement){return'<span class="'+q.className+'">'+arguments[0]+"</span>"}else{var r=q.replacement.replace("$0",q.className);for(var m=1;m<=q.length-1;m++){r=r.replace("$"+m,arguments[n+m])}return r}}else{n+=q.length}}})}function b(n){var g;f.length=0;var m=d.filter(function(i){return(i.className.indexOf(n.name)>=0)});for(var k in n.rules){a(k,n.rules[k])}for(var j=0;j<m.length;j++){if(/MSIE/.test(navigator.appVersion)&&m[j].parentNode.nodeName=="PRE"){m[j]=m[j].parentNode;g=m[j].innerHTML.replace(/(<code[^>]*>)([^<]*)<\/code>/i,function(){return arguments[1]+e(arguments[2],n.ignoreCase)+"</code>"});g=g.replace(/\n( *)/g,function(){var p="";for(var q=0;q<arguments[1].length;q++){p+="&nbsp;"}return"\n"+p});g=g.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");g=g.replace(/\n(<\/\w+>)?/g,"<br />$1").replace(/<br \/>[\n\r\s]*<br \/>/g,"<p><br></p>")}else{g=e(m[j].innerHTML,n.ignoreCase)}m[j].innerHTML=g}}for(var c in this.styleSets){b(this.styleSets[c])}};CodeHighlighter.addStyle("javascript",{comment:{exp:/(\/\/[^\n]*\n)|(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)/},brackets:{exp:/\(|\)/},string:{exp:/'[^']*'|"[^"]*"/},keywords:{exp:/\b(arguments|break|case|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|typeof|var|void|while|with)\b/},global:{exp:/\b(toString|valueOf|window|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/}});CodeHighlighter.addStyle("html",{comment:{exp:/&lt;!\s*(--([^-]|[\r\n]|-[^-])*--\s*)&gt;/},tag:{exp:/(&lt;\/?)([a-zA-Z]+\s?)/,replacement:'$1<span class="$0">$2</span>'},string:{exp:/'[^']*'|"[^"]*"/},attribute:{exp:/\b([a-zA-Z-:]+)(=)/,replacement:'<span class="$0">$1</span>$2'},doctype:{exp:/&lt;!DOCTYPE([^&]|&[^g]|&g[^t])*&gt;/}});CodeHighlighter.addStyle("css",{comment:{exp:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//},keywords:{exp:/@\w[\w\s]*/},selectors:{exp:"([\\w-:\\[.#][^{};>]*)(?={)"},properties:{exp:"([\\w-]+)(?=\\s*:)"},units:{exp:/([0-9])(em|en|px|%|pt)\b/,replacement:'$1<span class="$0">$2</span>'},urls:{exp:/url\([^\)]*\)/}});jQuery.getPos=function(g){var b=0;var c=0;var a=jQuery.intval(jQuery.css(g,"width"));var d=jQuery.intval(jQuery.css(g,"height"));var f=g.offsetWidth;var i=g.offsetHeight;while(g.offsetParent){b+=g.offsetLeft+(g.currentStyle?jQuery.intval(g.currentStyle.borderLeftWidth):0);c+=g.offsetTop+(g.currentStyle?jQuery.intval(g.currentStyle.borderTopWidth):0);g=g.offsetParent}b+=g.offsetLeft+(g.currentStyle?jQuery.intval(g.currentStyle.borderLeftWidth):0);c+=g.offsetTop+(g.currentStyle?jQuery.intval(g.currentStyle.borderTopWidth):0);return{x:b,y:c,w:a,h:d,wb:f,hb:i}};jQuery.getClient=function(a){if(a){w=a.clientWidth;h=a.clientHeight}else{w=(window.innerWidth)?window.innerWidth:(document.documentElement&&document.documentElement.clientWidth)?document.documentElement.clientWidth:document.body.offsetWidth;h=(window.innerHeight)?window.innerHeight:(document.documentElement&&document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.offsetHeight}return{w:w,h:h}};jQuery.getScroll=function(a){if(a){t=a.scrollTop;l=a.scrollLeft;w=a.scrollWidth;h=a.scrollHeight}else{if(document.documentElement&&document.documentElement.scrollTop){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight}else{if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight}}}return{t:t,l:l,w:w,h:h}};jQuery.intval=function(a){a=parseInt(a);return isNaN(a)?0:a};jQuery.fn.ScrollTo=function(a){o=jQuery.speed(a);return this.each(function(){new jQuery.fx.ScrollTo(this,o)})};jQuery.fx.ScrollTo=function(a,c){var b=this;b.o=c;b.e=a;b.p=jQuery.getPos(a);b.s=jQuery.getScroll();b.clear=function(){clearInterval(b.timer);b.timer=null};b.t=(new Date).getTime();b.step=function(){var d=(new Date).getTime();var e=(d-b.t)/b.o.duration;if(d>=b.o.duration+b.t){b.clear();setTimeout(function(){b.scroll(b.p.y,b.p.x)},13)}else{st=((-Math.cos(e*Math.PI)/2)+0.5)*(b.p.y-b.s.t)+b.s.t;sl=((-Math.cos(e*Math.PI)/2)+0.5)*(b.p.x-b.s.l)+b.s.l;b.scroll(st,sl)}};b.scroll=function(e,d){window.scrollTo(d,e)};b.timer=setInterval(function(){b.step()},13)};