/*--------------------------------------------------------------------------*
 * 
 * Tabs 3 - New Wave Tabs
 *
 * Copyright (c) 2007 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Tabs
 * 
 *--------------------------------------------------------------------------*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.4=$.4||{};$.2o.3=6(){7 b=1f 1c[0]==\'1W\'&&1c[0];7 c=b&&1N.1M.2f.2b(1c,1)||1c;w 2.P(6(){5(b){7 a=$.u(2,\'4-3\');a[b].2p(a,c)}E 2l $.4.3(2,c[0]||{})})};$.4.3=6(e,f){7 d=2;2.q=e;2.8=$.1t({t:0,S:f.t===14,Z:\'1F\',Q:[],G:14,1k:\'2F&#2z;\',1T:H,1Q:\'4-3-\',1j:{},X:14,1O:\'<D><a z="#{z}"><1i>#{1h}</1i></a></D>\',1y:\'<1L></1L>\',1g:\'4-3-2i\',x:\'4-3-t\',1u:\'4-3-S\',I:\'4-3-Q\',U:\'4-3-1e\',L:\'4-3-19\',1n:\'4-3-2W\'},f);2.8.Z+=\'.4-3\';2.8.G=$.G&&$.G.27==2T&&2.8.G;$(e).1d(\'2R.4-3\',6(b,c,a){d.8[c]=a;2.13()}).1d(\'2Q.4-3\',6(a,b){w d.8[b]});$.u(e,\'4-3\',2);2.13(1a)};$.1t($.4.3.1M,{1v:6(a){w a.22&&a.22.W(/\\s/g,\'1Y\').W(/[^A-2I-2C-9\\-1Y:\\.]/g,\'\')||2.8.1Q+$.u(a)},4:6(a,b){w{2y:2,8:2.8,1X:a,1e:b}},13:6(g){2.$p=$(\'D:2v(a[z])\',2.q);2.$3=2.$p.1A(6(){w $(\'a\',2)[0]});2.$m=$([]);7 f=2,o=2.8;2.$3.P(6(i,a){5(a.J&&a.J.W(\'#\',\'\'))f.$m=f.$m.Y(a.J);E 5($(a).V(\'z\')!=\'#\'){$.u(a,\'z.4-3\',a.z);$.u(a,\'B.4-3\',a.z);7 b=f.1v(a);a.z=\'#\'+b;7 c=$(\'#\'+b);5(!c.C){c=$(o.1y).V(\'17\',b).v(o.U).2n(f.$m[i-1]||f.q);c.u(\'16.4-3\',1a)}f.$m=f.$m.Y(c)}E o.Q.2m(i+1)});5(g){$(2.q).K(o.1g)||$(2.q).v(o.1g);2.$m.P(6(){7 a=$(2);a.K(o.U)||a.v(o.U)});2k(7 i=0,k=o.Q.C;i<k;i++)2.$p.y(o.Q[i]).v(o.I);2.$3.P(6(i,a){5(1x.J){5(a.J==1x.J){o.t=i;5($.O.15||$.O.2j){7 b=$(1x.J),1K=b.V(\'17\');b.V(\'17\',\'\');1w(6(){b.V(\'17\',1K)},2h)}2g(0,0);w H}}E 5(o.G){7 c=2e($.G(\'4-3\'+$.u(f.q)),10);5(c&&f.$3[c]){o.t=c;w H}}E 5(f.$p.y(i).K(o.x)){o.t=i;w H}});7 n=2.$p.C;2d(2.$p.y(o.t).K(o.I)&&n){o.t=++o.t<2.$p.C?o.t:0;n--}5(!n)o.S=1a;2.$m.v(o.L);2.$p.F(o.x);5(!o.S){2.$m.y(o.t).N().F(o.L);2.$p.y(o.t).v(o.x)}7 j=!o.S&&$.u(2.$3[o.t],\'B.4-3\');5(j)2.B(o.t,j);5(!(/^1F/).2c(o.Z))2.$3.1d(\'1F\',6(e){e.2a()})}7 l,T,12={\'29-28\':0,1s:1},1r=\'2V\';5(o.X&&o.X.27==1N)l=o.X[0]||12,T=o.X[1]||12;E l=T=o.X||12;7 h={1q:\'\',2U:\'\',2S:\'\'};5(!$.O.15)h.1J=\'\';6 1I(b,c,a){c.26(l,l.1s||1r,6(){c.v(o.L).1b(h);5($.O.15&&l.1J)c[0].25.M=\'\';5(a)1H(b,a,c)})}6 1H(b,a,c){5(T===12)a.1b(\'1q\',\'1G\');a.26(T,T.1s||1r,6(){a.F(o.L).1b(h);5($.O.15&&T.1J)a[0].25.M=\'\';$(f.q).R("N.4-3",[f.4(b,a[0])])})}6 24(c,a,d,b){a.v(o.x).2P().F(o.x);1I(c,d,b)}2.$3.1E(o.Z).1d(o.Z,6(){7 b=$(2).2O(\'D:y(0)\'),$19=f.$m.M(\':2N\'),$N=$(2.J);5((b.K(o.x)&&!o.S)||b.K(o.I)||$(f.q).R("1D.4-3",[f.4(2,$N[0])])===H){2.1o();w H}f.8.t=f.$3.11(2);5(o.S){5(b.K(o.x)){f.8.t=14;b.F(o.x);f.$m.1C();1I(2,$19);2.1o();w H}E 5(!$19.C){f.$m.1C();7 a=2;f.B(f.$3.11(2),6(){b.v(o.x).v(o.1u);1H(a,$N)});2.1o();w H}}5(o.G)$.G(\'4-3\'+$.u(f.q),f.8.t,o.G);f.$m.1C();5($N.C){7 a=2;f.B(f.$3.11(2),6(){24(a,b,$19,$N)})}E 21\'1B 20 1Z: 2M 2L 2J.\';5($.O.15)2.1o();w H})},Y:6(d,e,f){5(d&&e){f=f||2.$3.C;7 o=2.8;7 a=$(o.1O.W(/#\\{z\\}/,d).W(/#\\{1h\\}/,e));a.u(\'16.4-3\',1a);7 b=d.2H(\'#\')==0?d.W(\'#\',\'\'):2.1v($(\'a:2G-2B\',a)[0]);7 c=$(\'#\'+b);5(!c.C){c=$(o.1y).V(\'17\',b).v(o.U).v(o.L);c.u(\'16.4-3\',1a)}5(f>=2.$p.C){a.1U(2.q);c.1U(2.q.2A)}E{a.1V(2.$p[f]);c.1V(2.$m[f])}2.13();5(2.$3.C==1){a.v(o.x);c.F(o.L);7 g=$.u(2.$3[0],\'B.4-3\');5(g)2.B(f,g)}$(2.q).R("Y.4-3",[2.4(2.$3[f],2.$m[f])])}E 21\'1B 20 1Z: 2D 2E 1c 2x Y 1X.\';},18:6(a){7 o=2.8,$D=2.$p.y(a).18(),$1e=2.$m.y(a).18();5($D.K(o.x)&&2.$3.C>1)2.1D(a+(a+1<2.$3.C?1:-1));2.13();$(2.q).R("18.4-3",[2.4($D.2w(\'a\')[0],$1e[0])])},23:6(a){7 b=2,o=2.8,$D=2.$p.y(a);$D.F(o.I);5($.O.2u){$D.1b(\'1q\',\'2K-1G\');1w(6(){$D.1b(\'1q\',\'1G\')},0)}o.Q=$.1A(2.$p.M(\'.\'+o.I),6(n,i){w b.$p.11(n)});$(2.q).R("23.4-3",[2.4(2.$3[a],2.$m[a])])},1S:6(a){7 b=2,o=2.8;2.$p.y(a).v(o.I);o.Q=$.1A(2.$p.M(\'.\'+o.I),6(n,i){w b.$p.11(n)});$(2.q).R("1S.4-3",[2.4(2.$3[a],2.$m[a])])},1D:6(a){5(1f a==\'1W\')a=2.$3.11(2.$3.M(\'[z$=\'+a+\']\')[0]);2.$3.y(a).2t(2.8.Z)},B:6(d,b){7 f=2,o=2.8,$a=2.$3.y(d),a=$a[0];7 e=$a.u(\'B.4-3\');5(!e){1f b==\'6\'&&b();w}5(o.1k){7 h=$(\'1i\',a),1h=h.1l();h.1l(\'<1R>\'+o.1k+\'</1R>\')}7 c=6(){f.$3.M(\'.\'+o.1n).P(6(){$(2).F(o.1n);5(o.1k)$(\'1i\',2).1l(1h)});f.1m=14};7 g=$.1t({},o.1j,{1P:e,1z:6(r,s){$(a.J).1l(r);c();1f b==\'6\'&&b();5(o.1T)$.1p(a,\'B.4-3\');$(f.q).R("B.4-3",[f.4(f.$3[d],f.$m[d])]);o.1j.1z&&o.1j.1z(r,s)}});5(2.1m){2.1m.2s();c()}$a.v(o.1n);1w(6(){f.1m=$.2r(g)},0)},1P:6(a,b){2.$3.y(a).u(\'B.4-3\',b)},16:6(){7 o=2.8;$(2.q).1E(\'.4-3\').F(o.1g).1p(\'4-3\');2.$3.P(6(){7 a=$.u(2,\'z.4-3\');5(a)2.z=a;$(2).1E(\'.4-3\').1p(\'z.4-3\').1p(\'B.4-3\')});2.$p.Y(2.$m).P(6(){5($.u(2,\'16.4-3\'))$(2).18();E $(2).F([o.x,o.1u,o.I,o.U,o.L].2q(\' \'))})}})})(1B);',62,183,'||this|tabs|ui|if|function|var|options||||||||||||||panels|||lis|element|||selected|data|addClass|return|selectedClass|eq|href||load|length|li|else|removeClass|cookie|false|disabledClass|hash|hasClass|hideClass|filter|show|browser|each|disabled|triggerHandler|unselect|showFx|panelClass|attr|replace|fx|add|event||index|baseFx|tabify|null|msie|destroy|id|remove|hide|true|css|arguments|bind|panel|typeof|navClass|label|span|ajaxOptions|spinner|html|xhr|loadingClass|blur|removeData|display|baseDuration|duration|extend|unselectClass|tabId|setTimeout|location|panelTemplate|success|map|jQuery|stop|select|unbind|click|block|showTab|hideTab|opacity|toShowId|div|prototype|Array|tabTemplate|url|idPrefix|em|disable|cache|appendTo|insertBefore|string|tab|_|Tabs|UI|throw|title|enable|switchTab|style|animate|constructor|width|min|preventDefault|call|test|while|parseInt|slice|scrollTo|500|nav|opera|for|new|push|insertAfter|fn|apply|join|ajax|abort|trigger|safari|has|find|to|instance|8230|parentNode|child|z0|Not|enough|Loading|first|indexOf|Za|identifier|inline|fragment|Mismatching|visible|parents|siblings|getData|setData|height|Function|overflow|normal|loading'.split('|'),0,{}))

/*--------------------------------------------------------------------------*
 *
 *  ui.tabs
 *
 *--------------------------------------------------------------------------*/
$(function() {
	$('.tab > ul').tabs({ fx: { opacity: 'toggle' } });

	// •\Ž¦
	$(".switch").mouseover(function(){ 
		if(document.getElementById){
			if(document.getElementById("stage").style.display == "none"){
				$( "#stage:hidden").slideDown('normal');
			}else{
				//$( "#stage:visible").slideUp('normal');
			}
		}
	});
	// close
	$(".close").click(function(){ 
		if(document.getElementById){
			if(document.getElementById("stage").style.display == "none"){
				$( "#stage:hidden").slideDown('normal');
			}else{
				$( "#stage:visible").slideUp('normal');
			}
		}
	});

});

/*--------------------------------------------------------------------------*
 *
 * Copyright (c) 2006/2007 Sam Collett (http://www.texotela.co.uk)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 *--------------------------------------------------------------------------*/
 
(function($) {
/*
 * A basic news ticker.
 *
 * @name     newsticker (or newsTicker)
 * @param    delay      Delay (in milliseconds) between iterations. Default 4 seconds (4000ms)
 * @author   Sam Collett (http://www.texotela.co.uk)
 * @example  $("#news").newsticker(); // or $("#news").newsTicker(5000);
 *
 */
$.fn.newsTicker = $.fn.newsticker = function(delay)
{
	delay = delay || 4000;
	initTicker = function(el)
	{
		stopTicker(el);
		el.items = $("li", el);
		// hide all items (except first one)
		el.items.not(":eq(0)").hide().end();
		// current item
		el.currentitem = 0;
		startTicker(el);
	};
	startTicker = function(el)
	{
		el.tickfn = setInterval(function() { doTick(el) }, delay)
	};
	stopTicker = function(el)
	{
		clearInterval(el.tickfn);
	};
	pauseTicker = function(el)
	{
		el.pause = true;
	};
	resumeTicker = function(el)
	{
		el.pause = false;
	};
	doTick = function(el)
	{
		// don't run if paused
		if(el.pause) return;
		// pause until animation has finished
		el.pause = true;
		// hide current item
		$(el.items[el.currentitem]).fadeOut("slow",
			function()
			{
				$(this).hide();
				// move to next item and show
				el.currentitem = ++el.currentitem % (el.items.size());
				$(el.items[el.currentitem]).fadeIn("slow",
					function()
					{
						el.pause = false;
					}
				);
			}
		);
	};
	this.each(
		function()
		{
			if(this.nodeName.toLowerCase()!= "ul") return;
			initTicker(this);
		}
	)
	.addClass("newsticker")
	.hover(
		function()
		{
			// pause if hovered over
			pauseTicker(this);
		},
		function()
		{
			// resume when not hovered over
			resumeTicker(this);
		}
	);
	return this;
};

})(jQuery);
$(document).ready(
	function(){
		$("#news").newsTicker(4000);
	}
);


/*--------------------------------------------------------------------------*
 *  
 *  heightLine JavaScript Library beta4
 *  
 *  MIT-style license. 
 *  
 *  2007 Kazuma Nishihata 
 *  http://www.webcreativepark.net
 *  
 *--------------------------------------------------------------------------*/
new function(){
	
	function heightLine(){
	
		this.className="heightLine";
		this.parentClassName="heightLineParent"
		reg = new RegExp(this.className+"-([a-zA-Z0-9-_]+)", "i");
		objCN =new Array();
		var objAll = document.getElementsByTagName ? document.getElementsByTagName("*") : document.all;
		for(var i = 0; i < objAll.length; i++) {
			var eltClass = objAll[i].className.split(/\s+/);
			for(var j = 0; j < eltClass.length; j++) {
				if(eltClass[j] == this.className) {
					if(!objCN["main CN"]) objCN["main CN"] = new Array();
					objCN["main CN"].push(objAll[i]);
					break;
				}else if(eltClass[j] == this.parentClassName){
					if(!objCN["parent CN"]) objCN["parent CN"] = new Array();
					objCN["parent CN"].push(objAll[i]);
					break;
				}else if(eltClass[j].match(reg)){
					var OCN = eltClass[j].match(reg)
					if(!objCN[OCN]) objCN[OCN]=new Array();
					objCN[OCN].push(objAll[i]);
					break;
				}
			}
		}
		
		//check font size
		var e = document.createElement("div");
		var s = document.createTextNode("S");
		e.appendChild(s);
		e.style.visibility="hidden"
		e.style.position="absolute"
		e.style.top="0"
		document.body.appendChild(e);
		var defHeight = e.offsetHeight;
		
		changeBoxSize = function(){
			for(var key in objCN){
				if (objCN.hasOwnProperty(key)) {
					//parent type
					if(key == "parent CN"){
						for(var i=0 ; i<objCN[key].length ; i++){
							var max_height=0;
							var CCN = objCN[key][i].childNodes;
							for(var j=0 ; j<CCN.length ; j++){
								if(CCN[j] && CCN[j].nodeType == 1){
									CCN[j].style.height="auto";
									max_height = max_height>CCN[j].offsetHeight?max_height:CCN[j].offsetHeight;
								}
							}
							for(var j=0 ; j<CCN.length ; j++){
								if(CCN[j].style){
									var stylea = CCN[j].currentStyle || document.defaultView.getComputedStyle(CCN[j], '');
									var newheight = max_height;
									if(stylea.paddingTop)newheight -= stylea.paddingTop.replace("px","");
									if(stylea.paddingBottom)newheight -= stylea.paddingBottom.replace("px","");
									if(stylea.borderTopWidth && stylea.borderTopWidth != "medium")newheight-= stylea.borderTopWidth.replace("px","");
									if(stylea.borderBottomWidth && stylea.borderBottomWidth != "medium")newheight-= stylea.borderBottomWidth.replace("px","");
									CCN[j].style.height =newheight+"px";
								}
							}
						}
					}else{
						var max_height=0;
						for(var i=0 ; i<objCN[key].length ; i++){
							objCN[key][i].style.height="auto";
							max_height = max_height>objCN[key][i].offsetHeight?max_height:objCN[key][i].offsetHeight;
						}
						for(var i=0 ; i<objCN[key].length ; i++){
							if(objCN[key][i].style){
								var stylea = objCN[key][i].currentStyle || document.defaultView.getComputedStyle(objCN[key][i], '');
									var newheight = max_height;
									if(stylea.paddingTop)newheight-= stylea.paddingTop.replace("px","");
									if(stylea.paddingBottom)newheight-= stylea.paddingBottom.replace("px","");
									if(stylea.borderTopWidth && stylea.borderTopWidth != "medium")newheight-= stylea.borderTopWidth.replace("px","")
									if(stylea.borderBottomWidth && stylea.borderBottomWidth != "medium")newheight-= stylea.borderBottomWidth.replace("px","");
									objCN[key][i].style.height =newheight+"px";
							}
						}
					}
				}
			}
		}
		
		checkBoxSize = function(){
			if(defHeight != e.offsetHeight){
				changeBoxSize();
				defHeight= e.offsetHeight;
			}
		}
		changeBoxSize();
		setInterval(checkBoxSize,1000)
		window.onresize=changeBoxSize;
	}
	
	function addEvent(elm,listener,fn){
		try{
			elm.addEventListener(listener,fn,false);
		}catch(e){
			elm.attachEvent("on"+listener,fn);
		}
	}
	addEvent(window,"load",heightLine);
}
