/*--------------------------------------------------------------------------*
 * 
 * jGlycy
 * (c) 2008 Semooh (http://semooh.jp/)
 * 
 *--------------------------------------------------------------------------*/
(function($, prefix, jg){
  $[jg] = $({});
  $[jg].extend({
    invoke: function(nodes) {
      nodes.each(function(){
        var node = this;
        var funcs = $(node).attr(prefix).split(',');
        $(funcs).each(function(){
          var arg = $(node).attr(prefix + ":" + this);
          if(arg) {
            eval('var options = {' + arg + '}');
          } else {
            var options = {};
          }
          if($.fn[this]) {
            $(node)[this](options);
          }
        });
      });
    },
    invokeElement: function(node) {
      $[jg].invoke($("*[" + prefix + "]", node));
    }
  });
  $(document).ready(function(){
    $[jg].invokeElement(document);
  });
})(jQuery, "jg", "jg");





/*--------------------------------------------------------------------------*
 * 
 * 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,{}))





/*--------------------------------------------------------------------------*
 * 
 * CSS Browser Selector v0.2.7
 * Rafael Lima (http://rafael.adm.br)
 * http://rafael.adm.br/css_browser_selector
 * License: http://creativecommons.org/licenses/by/2.5/
 * Contributors: http://rafael.adm.br/css_browser_selector#contributors
 * 
 *--------------------------------------------------------------------------*/
var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();




/*--------------------------------------------------------------------------*
 * 
 * Version 1.0 - October 19, 2007
 * Requires http://jquery.com version 1.2.1
 * 
 *--------------------------------------------------------------------------*/
// Version 1.0 - October 19, 2007
// Requires http://jquery.com version 1.2.1

(function($) {
	$.fn.biggerlink = function(options) {

		// Default settings
		var settings = {
			hoverclass:'hover', // class added to parent element on hover
			clickableclass:'hot', // class added to parent element with behaviour
			follow: true	// follow link? Set to false for js popups
		};
		if(options) {
			$.extend(settings, options);
		}
		$(this).filter(function(){
			 return $('a',this).length > 0;

		}).addClass(settings.clickableclass).each(function(i){
		
			// Add title of first link with title to parent
			$(this).attr('title', $('a[title]:first',this).attr('title'));
			
			// hover and trigger contained anchor event on click
			$(this)
			.mouseover(function(){
				window.status = $('a:first',this).attr('href');
				$(this).addClass(settings.hoverclass);
			})
			.mouseout(function(){
				window.status = '';
				$(this).removeClass(settings.hoverclass);
			})
			.bind('click',function(){
				$(this).find('a:first').trigger('click');
			})
			
			// triggerable events on anchor itself
			
			.find('a').bind('focus',function(){
				$(this).parents('.'+ settings.clickableclass).addClass(settings.hoverclass);
			}).bind('blur',function(){
				$(this).parents('.'+ settings.clickableclass).removeClass(settings.hoverclass);
			}).end()
			
			.find('a:first').bind('click',function(e){
				if(settings.follow == true)
				{
					window.location = this.href;
				}
				e.stopPropagation(); // stop event bubbling to parent
			}).end()
			
			.find('a',this).not(':first').bind('click',function(){
				$(this).parents('.'+ settings.clickableclass).find('a:first').trigger('click');
				return false;
			});
		});
		return this;
	};
})(jQuery);



/*--------------------------------------------------------------------------*
 * 
 * Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4257 $
 *
 * Version: 1.2
 *
 * Requires: jQuery 1.2+
 *  
 *--------------------------------------------------------------------------*/
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}('(5($){$.19={P:\'1.2\'};$.u([\'j\',\'w\'],5(i,d){$.q[\'O\'+d]=5(){p(!3[0])6;g a=d==\'j\'?\'s\':\'m\',e=d==\'j\'?\'D\':\'C\';6 3.B(\':y\')?3[0][\'L\'+d]:4(3,d.x())+4(3,\'n\'+a)+4(3,\'n\'+e)};$.q[\'I\'+d]=5(b){p(!3[0])6;g c=d==\'j\'?\'s\':\'m\',e=d==\'j\'?\'D\':\'C\';b=$.F({t:Z},b||{});g a=3.B(\':y\')?3[0][\'8\'+d]:4(3,d.x())+4(3,\'E\'+c+\'w\')+4(3,\'E\'+e+\'w\')+4(3,\'n\'+c)+4(3,\'n\'+e);6 a+(b.t?(4(3,\'t\'+c)+4(3,\'t\'+e)):0)}});$.u([\'m\',\'s\'],5(i,b){$.q[\'l\'+b]=5(a){p(!3[0])6;6 a!=W?3.u(5(){3==h||3==r?h.V(b==\'m\'?a:$(h)[\'U\'](),b==\'s\'?a:$(h)[\'T\']()):3[\'l\'+b]=a}):3[0]==h||3[0]==r?S[(b==\'m\'?\'R\':\'Q\')]||$.N&&r.M[\'l\'+b]||r.A[\'l\'+b]:3[0][\'l\'+b]}});$.q.F({z:5(){g a=0,f=0,o=3[0],8,9,7,v;p(o){7=3.7();8=3.8();9=7.8();8.f-=4(o,\'K\');8.k-=4(o,\'J\');9.f+=4(7,\'H\');9.k+=4(7,\'Y\');v={f:8.f-9.f,k:8.k-9.k}}6 v},7:5(){g a=3[0].7;G(a&&(!/^A|10$/i.16(a.15)&&$.14(a,\'z\')==\'13\'))a=a.7;6 $(a)}});5 4(a,b){6 12($.11(a.17?a[0]:a,b,18))||0}})(X);',62,72,'|||this|num|function|return|offsetParent|offset|parentOffset|||||borr|top|var|window||Height|left|scroll|Left|padding|elem|if|fn|document|Top|margin|each|results|Width|toLowerCase|visible|position|body|is|Right|Bottom|border|extend|while|borderTopWidth|outer|marginLeft|marginTop|client|documentElement|boxModel|inner|version|pageYOffset|pageXOffset|self|scrollTop|scrollLeft|scrollTo|undefined|jQuery|borderLeftWidth|false|html|curCSS|parseInt|static|css|tagName|test|jquery|true|dimensions'.split('|'),0,{}))




/*--------------------------------------------------------------------------*
 * 
 * minmax.js: make IE5+/Win support CSS min/max-width/height
 * version 1.0, 08-Aug-2003
 * written by Andrew Clover <and@doxdesk.com>, use freely
 *  
 *--------------------------------------------------------------------------*/

/*@cc_on
@if (@_win32 && @_jscript_version>4)

var minmax_elements;

minmax_props= new Array(
  new Array('min-width', 'minWidth'),
  new Array('max-width', 'maxWidth'),
  new Array('min-height','minHeight'),
  new Array('max-height','maxHeight')
);

// Binding. Called on all new elements. If <body>, initialise; check all
// elements for minmax properties

function minmax_bind(el) {
  var i, em, ms;
  var st= el.style, cs= el.currentStyle;

  if (minmax_elements==window.undefined) {
    // initialise when body element has turned up, but only on IE
    if (!document.body || !document.body.currentStyle) return;
    minmax_elements= new Array();
    window.attachEvent('onresize', minmax_delayout);
    // make font size listener
    em= document.createElement('div');
    em.setAttribute('id', 'minmax_em');
    em.style.position= 'absolute'; em.style.visibility= 'hidden';
    em.style.fontSize= 'xx-large'; em.style.height= '5em';
    em.style.top='-5em'; em.style.left= '0';
    if (em.style.setExpression) {
      em.style.setExpression('width', 'minmax_checkFont()');
      document.body.insertBefore(em, document.body.firstChild);
    }
  }

  // transform hyphenated properties the browser has not caught to camelCase
  for (i= minmax_props.length; i-->0;)
    if (cs[minmax_props[i][0]])
      st[minmax_props[i][1]]= cs[minmax_props[i][0]];
  // add element with properties to list, store optimal size values
  for (i= minmax_props.length; i-->0;) {
    ms= cs[minmax_props[i][1]];
    if (ms && ms!='auto' && ms!='none' && ms!='0' && ms!='') {
      st.minmaxWidth= cs.width; st.minmaxHeight= cs.height;
      minmax_elements[minmax_elements.length]= el;
      // will need a layout later
      minmax_delayout();
      break;
  } }
}

// check for font size changes

var minmax_fontsize= 0;
function minmax_checkFont() {
  var fs= document.getElementById('minmax_em').offsetHeight;
  if (minmax_fontsize!=fs && minmax_fontsize!=0)
    minmax_delayout();
  minmax_fontsize= fs;
  return '5em';
}

// Layout. Called after window and font size-change. Go through elements we
// picked out earlier and set their size to the minimum, maximum and optimum,
// choosing whichever is appropriate

// Request re-layout at next available moment
var minmax_delaying= false;
function minmax_delayout() {
  if (minmax_delaying) return;
  minmax_delaying= true;
  window.setTimeout(minmax_layout, 0);
}

function minmax_stopdelaying() {
  minmax_delaying= false;
}

function minmax_layout() {
  window.setTimeout(minmax_stopdelaying, 100);
  var i, el, st, cs, optimal, inrange;
  for (i= minmax_elements.length; i-->0;) {
    el= minmax_elements[i]; st= el.style; cs= el.currentStyle;

    // horizontal size bounding
    st.width= st.minmaxWidth; optimal= el.offsetWidth;
    inrange= true;
    if (inrange && cs.minWidth && cs.minWidth!='0' && cs.minWidth!='auto' && cs.minWidth!='') {
      st.width= cs.minWidth;
      inrange= (el.offsetWidth<optimal);
    }
    if (inrange && cs.maxWidth && cs.maxWidth!='none' && cs.maxWidth!='auto' && cs.maxWidth!='') {
      st.width= cs.maxWidth;
      inrange= (el.offsetWidth>optimal);
    }
    if (inrange) st.width= st.minmaxWidth;

    // vertical size bounding
    st.height= st.minmaxHeight; optimal= el.offsetHeight;
    inrange= true;
    if (inrange && cs.minHeight && cs.minHeight!='0' && cs.minHeight!='auto' && cs.minHeight!='') {
      st.height= cs.minHeight;
      inrange= (el.offsetHeight<optimal);
    }
    if (inrange && cs.maxHeight && cs.maxHeight!='none' && cs.maxHeight!='auto' && cs.maxHeight!='') {
      st.height= cs.maxHeight;
      inrange= (el.offsetHeight>optimal);
    }
    if (inrange) st.height= st.minmaxHeight;
  }
}

// Scanning. Check document every so often until it has finished loading. Do
// nothing until <body> arrives, then call main init. Pass any new elements
// found on each scan to be bound   

var minmax_SCANDELAY= 500;

function minmax_scan() {
  var el;
  for (var i= 0; i<document.all.length; i++) {
    el= document.all[i];
    if (!el.minmax_bound) {
      el.minmax_bound= true;
      minmax_bind(el);
  } }
}

var minmax_scanner;
function minmax_stop() {
  window.clearInterval(minmax_scanner);
  minmax_scan();
}

minmax_scan();
minmax_scanner= window.setInterval(minmax_scan, minmax_SCANDELAY);
window.attachEvent('onload', minmax_stop);

@end @*/






/*--------------------------------------------------------------------------*
 *  Copyright (c) 2007, KITAMURA Akatsuki
 *  
 *  Permission is hereby granted, free of charge, to any person obtaining a
 *  copy of this software and associated documentation files (the "Software"),
 *  to deal in the Software without restriction, including without limitation
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
 *  and/or sell copies of the Software, and to permit persons to whom the
 *  Software is furnished to do so, subject to the following conditions:
 *  
 *  The above copyright notice and this permission notice shall be included
 *  in all copies or substantial portions of the Software.
 *  
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 *  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 *  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *  OTHER DEALINGS IN THE SOFTWARE.
 *  
 *  jquery.flatheights.js
 *  Version: 2007-08-01
 *--------------------------------------------------------------------------*/


/*
======================================================================
	$.changeLetterSize.addHandler(func)
	文字の大きさが変化した時に実行する処理を追加
======================================================================
*/

jQuery.changeLetterSize = {
	handlers : [],
	interval : 1000,
	currentSize: 0
};

(function($) {

	var self = $.changeLetterSize;

	/* 文字の大きさを確認するためのins要素 */
	var ins = $('<ins>M</ins>').css({
		display: 'block',
		visibility: 'hidden',
		position: 'absolute',
		padding: '0',
		top: '0'
	});

	/* 文字の大きさが変わったか */
	var isChanged = function() {
		ins.appendTo('body');
		var size = ins[0].offsetHeight;
		ins.remove();
		if (self.currentSize == size) return false;
		self.currentSize = size;
		return true;
	};

	/* 文書を読み込んだ時点で
	   文字の大きさを確認しておく */
	$(isChanged);

	/* 文字の大きさが変わっていたら、
	   handlers中の関数を順に実行 */
	var observer = function() {
		if (!isChanged()) return;
		$.each(self.handlers, function(i, handler) {
			handler();
		});
	};

	/* ハンドラを登録し、
	   最初の登録であれば、定期処理を開始 */
	self.addHandler = function(func) {
		self.handlers.push(func);
		if (self.handlers.length == 1) {
			setInterval(observer, self.interval);
		}
	};

})(jQuery);

/*
======================================================================
	$(expr).flatHeights()
	$(expr)で選択した複数の要素について、それぞれ高さを
	一番高いものに揃える
======================================================================
*/

(function($) {

	/* 対象となる要素群の集合 */
	var sets = [];

	/* 高さ揃えの処理本体 */
	var flatHeights = function(set) {
		var maxHeight = 0;
		set.each(function(){
			var height = this.offsetHeight;
			if (height > maxHeight) maxHeight = height;
		});
		set.css('height', maxHeight + 'px');
	};

	/* 要素群の高さを揃え、setsに追加 */
	jQuery.fn.flatHeights = function() {
		if (this.length > 1) {
			flatHeights(this);
			sets.push(this);
		}
		return this;
	};

	/* 文字の大きさが変わった時に、
	   setsに含まれる各要素群に対して高さ揃えを実行 */
	$.changeLetterSize.addHandler(function() {
		$.each(sets, function() {
			this.height('auto');
			flatHeights(this);
		});
	});

})(jQuery);








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

});



/*--------------------------------------------------------------------------*
 * 
 *  jquery.popupt
 *  (c) 2008 Semooh (http://semooh.jp/)
 *
 *  Dual licensed under the MIT (MIT-LICENSE.txt)
 *  and GPL (GPL-LICENSE.txt) licenses.
 *
 *--------------------------------------------------------------------------*/
(function($){
	$.fn.extend({
		imghover: function(opt){
			return this.each(function() {
        opt = $.extend({
            prefix: '',
            suffix: '_on',
            src: '',
            btnOnly: true,
            fade: false,
            fadeSpeed: 200
          }, opt || {});

        var node = $(this);
				if(!node.is('img')&&!node.is(':image')){
          var sel = 'img,:image';
          if (opt.btnOnly) sel = 'a '+sel;
          node.find(sel).imghover(opt);
          return;
        }

        var orgImg = node.attr('src');

        var hoverImg;
        if(opt.src){
          hoverImg = opt.src;
        }else{
          hoverImg = orgImg;
          if(opt.prefix){
            var pos = hoverImg.lastIndexOf('/');
            if(pos>0){
              hoverImg = hoverImg.substr(0,pos-1)+opt.prefix+hoverImg.substr(pos-1);
            }else{
              hoverImg = opt.prefix+hoverImg;
            }
          }
          if(opt.suffix){
            var pos = hoverImg.lastIndexOf('.');
            if(pos>0){
              hoverImg = hoverImg.substr(0,pos)+opt.suffix+hoverImg.substr(pos);
            }else{
              hoverImg = hoverImg+opt.suffix;
            }
          }
        }

        if(opt.fade){
          var offset = node.offset();
          var hover = node.clone(true);
          hover.attr('src', hoverImg);
          hover.css({
            position: 'absolute',
            left: offset.left,
            top: offset.top,
            zIndex: 1000
          }).hide().insertAfter(node);
          node.mouseover(
            function(){
              var offset=node.offset();
              hover.css({left: offset.left, top: offset.top});
              hover.fadeIn(opt.fadeSpeed);
              node.fadeOut(opt.fadeSpeed,function(){node.show()});
            }
          );
          hover.mouseout(
            function(){
              node.fadeIn(opt.fadeSpeed);
              hover.fadeOut(opt.fadeSpeed);
            }
          );
        }else{
          node.hover(
            function(){node.attr('src', hoverImg)},
            function(){node.attr('src', orgImg)}
          );
        }
			});
		}
	});
})(jQuery);




/*--------------------------------------------------------------------------*
 * 
 * Smooth scrolling
 * Changes links that link to other parts of this page to scroll smoothly to those links rather than jump to them directly, whichcan be a little disorienting.
 * 
 * sil, http://www.kryogenix.org/
 * 
 * v1.0 2003-11-11
 * v1.1 2005-06-16 wrap it up in an object
 *
 *--------------------------------------------------------------------------*/

var ss = {
  fixAllLinks: function() {
    // Get a list of all links in the page
    var allLinks = $(".pageTop a,#cDNavTop ul li a")
//    var allLinks = document.getElementsByTagName('a');
    // Walk through the list
    for (var i=0;i<allLinks.length;i++) {
      var lnk = allLinks[i];
      if ((lnk.href && lnk.href.indexOf('#') != -1) && 
          ( (lnk.pathname == location.pathname) ||
	    ('/'+lnk.pathname == location.pathname) ) && 
          (lnk.search == location.search)) {
        // If the link is internal to the page (begins in #)
        // then attach the smoothScroll function as an onclick
        // event handler
        ss.addEvent(lnk,'click',ss.smoothScroll);
      }
    }
  },

  smoothScroll: function(e) {
    // This is an event handler; get the clicked on element,
    // in a cross-browser fashion
    if (window.event) {
      target = window.event.srcElement;
    } else if (e) {
      target = e.target;
    } else return;

    // Make sure that the target is an element, not a text node
    // within an element
    if (target.nodeName.toLowerCase() != 'a') {
      target = target.parentNode;
    }
  
    // Paranoia; check this is an A tag
    if (target.nodeName.toLowerCase() != 'a') return;
  
    // Find the <a name> tag corresponding to this href
    // First strip off the hash (first character)
    anchor = target.hash.substr(1);
    // Now loop all A tags until we find one with that name
    var allLinks = document.getElementsByTagName('a');
    var destinationLink = null;
    for (var i=0;i<allLinks.length;i++) {
      var lnk = allLinks[i];
      if (lnk.name && (lnk.name == anchor)) {
        destinationLink = lnk;
        break;
      }
    }
    if (!destinationLink) destinationLink = document.getElementById(anchor);

    // If we didn't find a destination, give up and let the browser do
    // its thing
    if (!destinationLink) return true;
  
    // Find the destination's position
    var destx = destinationLink.offsetLeft; 
    var desty = destinationLink.offsetTop;
    var thisNode = destinationLink;
    while (thisNode.offsetParent && 
          (thisNode.offsetParent != document.body)) {
      thisNode = thisNode.offsetParent;
      destx += thisNode.offsetLeft;
      desty += thisNode.offsetTop;
    }
  
    // Stop any current scrolling
    clearInterval(ss.INTERVAL);
  
    cypos = ss.getCurrentYPos();
  
    ss_stepsize = parseInt((desty-cypos)/ss.STEPS);
    ss.INTERVAL =
setInterval('ss.scrollWindow('+ss_stepsize+','+desty+',"'+anchor+'")',10);
  
    // And stop the actual click happening
    if (window.event) {
      window.event.cancelBubble = true;
      window.event.returnValue = false;
    }
    if (e && e.preventDefault && e.stopPropagation) {
      e.preventDefault();
      e.stopPropagation();
    }
  },

  scrollWindow: function(scramount,dest,anchor) {
    wascypos = ss.getCurrentYPos();
    isAbove = (wascypos < dest);
    window.scrollTo(0,wascypos + scramount);
    iscypos = ss.getCurrentYPos();
    isAboveNow = (iscypos < dest);
    if ((isAbove != isAboveNow) || (wascypos == iscypos)) {
      // if we've just scrolled past the destination, or
      // we haven't moved from the last scroll (i.e., we're at the
      // bottom of the page) then scroll exactly to the link
      window.scrollTo(0,dest);
      // cancel the repeating timer
      clearInterval(ss.INTERVAL);
      // and jump to the link directly so the URL's right
      location.hash = anchor;
    }
  },

  getCurrentYPos: function() {
    if (document.body && document.body.scrollTop)
      return document.body.scrollTop;
    if (document.documentElement && document.documentElement.scrollTop)
      return document.documentElement.scrollTop;
    if (window.pageYOffset)
      return window.pageYOffset;
    return 0;
  },

  addEvent: function(elm, evType, fn, useCapture) {
    // addEvent and removeEvent
    // cross-browser event handling for IE5+,  NS6 and Mozilla
    // By Scott Andrew
    if (elm.addEventListener){
      elm.addEventListener(evType, fn, useCapture);
      return true;
    } else if (elm.attachEvent){
      var r = elm.attachEvent("on"+evType, fn);
      return r;
    } else {
      alert("Handler could not be removed");
    }
  } 
}

ss.STEPS = 5;

ss.addEvent(window,"load",ss.fixAllLinks);



/*--------------------------------------------------------------------------*

Nifty Corners Cube - rounded corners with CSS and Javascript
Copyright 2006 Alessandro Fulciniti (a.fulciniti@html.it)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 *--------------------------------------------------------------------------*/

var niftyOk=(document.getElementById && document.createElement && Array.prototype.push);
var niftyCss=false;

String.prototype.find=function(what){
return(this.indexOf(what)>=0 ? true : false);
}

var oldonload=window.onload;
if(typeof(NiftyLoad)!='function') NiftyLoad=function(){};
if(typeof(oldonload)=='function')
    window.onload=function(){oldonload();AddCss();NiftyLoad()};
else window.onload=function(){AddCss();NiftyLoad()};


function AddCss(){
niftyCss=true;
/*
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","niftyCorners.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
*/
}

function Nifty(selector,options){
if(niftyOk==false) return;
if(niftyCss==false) AddCss();
var i,v=selector.split(","),h=0;
if(options==null) options="";
if(options.find("fixed-height"))
    h=getElementsBySelector(v[0])[0].offsetHeight;
for(i=0;i<v.length;i++)
    Rounded(v[i],options);
if(options.find("height")) SameHeight(selector,h);
}

function Rounded(selector,options){
var i,top="",bottom="",v=new Array();
if(options!=""){
    options=options.replace("left","tl bl");
    options=options.replace("right","tr br");
    options=options.replace("top","tr tl");
    options=options.replace("bottom","br bl");
    options=options.replace("transparent","alias");
    if(options.find("tl")){
        top="both";
        if(!options.find("tr")) top="left";
        }
    else if(options.find("tr")) top="right";
    if(options.find("bl")){
        bottom="both";
        if(!options.find("br")) bottom="left";
        }
    else if(options.find("br")) bottom="right";
    }
if(top=="" && bottom=="" && !options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector);
for(i=0;i<v.length;i++){
    FixIE(v[i]);
    if(top!="") AddTop(v[i],top,options);
    if(bottom!="") AddBottom(v[i],bottom,options);
    }
}

function AddTop(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Top");
if(options.find("small")){
    d.style.marginBottom=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginBottom=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginBottom=(p-5)+"px";
for(i=1;i<=lim;i++)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingTop="0";
el.insertBefore(d,el.firstChild);
}

function AddBottom(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Bottom");
if(options.find("small")){
    d.style.marginTop=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginTop=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginTop=(p-5)+"px";
for(i=lim;i>0;i--)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingBottom=0;
el.appendChild(d);
}

function CreateStrip(index,side,color,border,btype){
var x=CreateEl("b");
x.className=btype+index;
x.style.backgroundColor=color;
x.style.borderColor=border;
if(side=="left"){
    x.style.borderRightWidth="0";
    x.style.marginRight="0";
    }
else if(side=="right"){
    x.style.borderLeftWidth="0";
    x.style.marginLeft="0";
    }
return(x);
}

function CreateEl(x){
return(document.createElement(x));
}

function FixIE(el){
if(el.currentStyle!=null && el.currentStyle.hasLayout!=null && el.currentStyle.hasLayout==false)
    el.style.display="inline-block";
}

function SameHeight(selector,maxh){
var i,v=selector.split(","),t,j,els=[],gap;
for(i=0;i<v.length;i++){
    t=getElementsBySelector(v[i]);
    els=els.concat(t);
    }
for(i=0;i<els.length;i++){
    if(els[i].offsetHeight>maxh) maxh=els[i].offsetHeight;
    els[i].style.height="auto";
    }
for(i=0;i<els.length;i++){
    gap=maxh-els[i].offsetHeight;
    if(gap>0){
        t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";
        nc=els[i].lastChild;
        if(nc.className=="niftycorners")
            els[i].insertBefore(t,nc);
        else els[i].appendChild(t);
        }
    }
}

function getElementsBySelector(selector){
var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;
if(selector.find("#")){ //id selector like "tag#id"
    if(selector.find(" ")){  //descendant selector like "tag#id tag"
        s=selector.split(" ");
        var fs=s[0].split("#");
        if(fs.length==1) return(objlist);
        f=document.getElementById(fs[1]);
        if(f){
            v=f.getElementsByTagName(s[1]);
            for(i=0;i<v.length;i++) objlist.push(v[i]);
            }
        return(objlist);
        }
    else{
        s=selector.split("#");
        tag=s[0];
        selid=s[1];
        if(selid!=""){
            f=document.getElementById(selid);
            if(f) objlist.push(f);
            return(objlist);
            }
        }
    }
if(selector.find(".")){      //class selector like "tag.class"
    s=selector.split(".");
    tag=s[0];
    selclass=s[1];
    if(selclass.find(" ")){   //descendant selector like tag1.classname tag2
        s=selclass.split(" ");
        selclass=s[0];
        tag2=s[1];
        }
    }
var v=document.getElementsByTagName(tag);  // tag selector like "tag"
if(selclass==""){
    for(i=0;i<v.length;i++) objlist.push(v[i]);
    return(objlist);
    }
for(i=0;i<v.length;i++){
    c=v[i].className.split(" ");
    for(j=0;j<c.length;j++){
        if(c[j]==selclass){
            if(tag2=="") objlist.push(v[i]);
            else{
                v2=v[i].getElementsByTagName(tag2);
                for(k=0;k<v2.length;k++) objlist.push(v2[k]);
                }
            }
        }
    }
return(objlist);
}

function getParentBk(x){
var el=x.parentNode,c;
while(el.tagName.toUpperCase()!="HTML" && (c=getBk(el))=="transparent")
    el=el.parentNode;
if(c=="transparent") c="#FFFFFF";
return(c);
}

function getBk(x){
var c=getStyleProp(x,"backgroundColor");
if(c==null || c=="transparent" || c.find("rgba(0, 0, 0, 0)"))
    return("transparent");
if(c.find("rgb")) c=rgb2hex(c);
return(c);
}

function getPadding(x,side){
var p=getStyleProp(x,"padding"+side);
if(p==null || !p.find("px")) return(0);
return(parseInt(p));
}

function getStyleProp(x,prop){
if(x.currentStyle)
    return(x.currentStyle[prop]);
if(document.defaultView.getComputedStyle)
    return(document.defaultView.getComputedStyle(x,'')[prop]);
return(null);
}

function rgb2hex(value){
var hex="",v,h,i;
var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;
var h=regexp.exec(value);
for(i=1;i<4;i++){
    v=parseInt(h[i]).toString(16);
    if(v.length==1) hex+="0"+v;
    else hex+=v;
    }
return("#"+hex);
}

function Mix(c1,c2){
var i,step1,step2,x,y,r=new Array(3);
if(c1.length==4)step1=1;
else step1=2;
if(c2.length==4) step2=1;
else step2=2;
for(i=0;i<3;i++){
    x=parseInt(c1.substr(1+step1*i,step1),16);
    if(step1==1) x=16*x+x;
    y=parseInt(c2.substr(1+step2*i,step2),16);
    if(step2==1) y=16*y+y;
    r[i]=Math.floor((x*50+y*50)/100);
    r[i]=r[i].toString(16);
    if(r[i].length==1) r[i]="0"+r[i];
    }
return("#"+r[0]+r[1]+r[2]);
}


