window.addEvent('domready',function(){
 
	var tabs = new MGFX.Tabs('.tabs','.feature',{
		autoplay: false,
		transitionDuration:500,
		slideInterval:6000
	});

  $$('.opener').each(function(el){
    var contentName = el.id+'HTML';
    nDiv = new Element('div',{'id':contentName, 'class':'mooSlide'});
    nDiv.injectInside($('home'),'bottom');
    new mooSlide2({ slideSpeed: 500, fadeSpeed: 500,  toggler:el.id, content:contentName, height:490, removeOnClick: true, opacity:'1', effects:Fx.Transitions.Back.easeOut, from:'top', loadExternal:el.href });
  });
  

	var designOnline = new RokSlide($('dSlide'), {
    fx: {wait: true,duration: 1000},
    scrollFX: {transition: Fx.Transitions.Cubic.easeIn},
    dimensions: {width: 960,height: 205}
  });

      var contentHeight=0;
  $$('.fleece').each(function(el){
  tmpHeight = el.getStyle('height');
  tmpHeight = tmpHeight.substr(0,tmpHeight.length-2).toInt();
  tmpTop = el.getStyle('top');
  tmpTop = tmpTop.substr(0,tmpTop.length-2).toInt();
  tmpHeight = (tmpHeight + tmpTop);
    if (tmpHeight>contentHeight){
        contentHeight = tmpHeight+30;
    }  });contentHeight=2300;


  var collapsible = new Fx.Slide($('home'), {
        duration: 500,
        transition: Fx.Transitions.linear
});
 collapsible.hide();
 $('home').setStyle('height', contentHeight);

 
collapsible.toggle();

  //Get Content
  //$('fbNotes').set('load', {method: 'get'});
  //$('fbNotes').load('http://www.new.facebook.com/profile.php?id=64302389&v=feed&viewas=64302389');
 
	//store titles and text
	$$('a.tipz').each(function(element,index) {
		var content = element.get('title').split('::');
		element.store('tip:title', content[0]);
		element.store('tip:text', content[1]);
	});
	
	//create the tooltips
	var tipz = new FixedTips('.tipz',{
		className: 'tipz',
		fixed: true,
		parent: $('right')
	});
	
	$$('.tip').each(function(el){
    el.parentNode.setStyle('left',el.parentNode.parentNode.getPosition().x-4);
    el.parentNode.setStyle('top',21);
  });
  

			
});
