/* package start */
////////////////////////////////////////////////////////////////////////// Property
var json;
var txts;
var icos;
var tweensOpacity = new Array();
var tweenPos;
var size;
var _cur=0;
////////////////////////////////////////////////////////////////////////// Setting
////////////////////////////////////////////////////////////////////////// Constructor
window.addEvent('domready', function() {
    initView()
    initBehavior()
})
function initView(){
	//size = $('section').getSize()
}

function initJSON(){	
    var req = new Request.JSON({
      url: 'conn/data.json',
      async: false,
      encoding: 'utf-8',
	  onRequest: function(){
	  },
      onComplete: function(respJson) {
		 json = respJson
      },
      onFailure: function() { 
      }
    }).post();
}

function initBehavior(){
	init_quick()
}


////////////////////////////////////////////////////////////////////////// Function
function init_quick(){
	txts = $('icogroup').getElements('ul')[0]
	txts = txts.getElements('li')
	
	icos = $('icogroup').getElements('ul')[1]
	icos = icos.getElements('li')
	for(var i=0;i<icos.length;i++){
		 txts[i].setStyle('visibility','hidden')
		 var alphaTween = new Fx.Morph(txts[i], {duration:700, transition: Fx.Transitions.Quart.easeOut});
		tweensOpacity.push(alphaTween)
		 var btn = icos[i].getElements('img')[0]
		 btn.addEvent('mouseover', function(event){
     		onIcoRollOver(event)
   		 })
		 btn.addEvent('mouseout', function(event){
 		    onIcoRollOut(event)
 	     })
	}
}
function onIcoRollOver(e){
	var n = e.target.id.slice(1)
	tweensOpacity[n].pause();
	tweensOpacity[n].start({
		 'opacity':1
	});
}
function onIcoRollOut(e){
	var n = e.target.id.slice(1)
	tweensOpacity[n].pause();
	tweensOpacity[n].start({
		 'opacity':0
	});
}

/////////////// tab

/* package end */
