// JavaScript Document
var img4=new Image(); img4.src='../images/back.jpg';
var img3=new Image(); img3.src='../images/logo.jpg';
var img=new Image(); img.src='../images/content_top.jpg';
var img1=new Image(); img1.src='../images/content_back.jpg';
var img2=new Image(); img2.src='../images/content_footer.jpg';



var accordion;

window.addEvent('domready', function(){
		$$('.thumb2').each(function(el, i) {
		var ExampleFx = new Fx.Style(el, 'opacity', {
			wait: false,
			duration: 300,
			transition: Fx.Transitions.Sine.easeInOut
		});
		el.addEvent('mouseenter', function() { ExampleFx.start(1, 0.5); });
		el.addEvent('mouseleave', function() { ExampleFx.start(0.5, 1); });
	});

			 accordion = new Accordion(
				$$('.toggle'), $$('.toggler'), {
				   //opacity: false,
				   onActive: function(toggler, element){
				   element.setStyle('margin-bottom','10px');
				   },
 			       onBackground: function(toggler, element){
				   element.setStyle('margin-bottom','0px');
	 			   },
				   alwaysHide: true,
				   start: 'all-closed',
				   duration: 600
				},$('accordionWrap'));
				
    $$('.company').addEvent('click', function(){accordion.display(0);});
	$$('.company1').addEvent('mouseover', function(){accordion.display(0);});
	$$('.portfolio').addEvent('click', function(){accordion.display(1);});
	$$('.capabilities').addEvent('click', function(){accordion.display(2);});
	$$('.communicate').addEvent('click', function(){accordion.display(3);});
	
	
		
								


var web = new Fx.Slide('web',{duration: 600,transition: Fx.Transitions.Sine.easeOut,mode: 'horizontal'}).show();
var graphics = new Fx.Slide('graphics',{duration: 600,transition: Fx.Transitions.Sine.easeOut,mode: 'horizontal'}).hide();
var logos = new Fx.Slide('logos',{duration: 600,transition: Fx.Transitions.Sine.easeOut,mode: 'horizontal'}).hide();
var multimedia = new Fx.Slide('multimedia',{duration: 600,transition: Fx.Transitions.Sine.easeOut,mode: 'horizontal'}).hide();

			$('web_tog').addEvent('click', function(e){
				e = new Event(e);
				web.slideIn();
				graphics.slideOut();
				logos.slideOut();
				multimedia.slideOut();
				e.stop();
			});			
			$('graphics_tog').addEvent('click', function(e){
				e = new Event(e);
				graphics.slideIn();
				web.slideOut();
				logos.slideOut();
				multimedia.slideOut();
				e.stop();
			});	
			$('logos_tog').addEvent('click', function(e){
				e = new Event(e);
				logos.slideIn();
				graphics.slideOut();
				web.slideOut();
				multimedia.slideOut();
				e.stop();
			});	
			$('multimedia_tog').addEvent('click', function(e){
				e = new Event(e);
				multimedia.slideIn();
				logos.slideOut();
				graphics.slideOut();
				web.slideOut();
				e.stop();
			});	
			
			


var web_page_1 = new Fx.Slide('web_page_1',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).show();	
var web_page_2 = new Fx.Slide('web_page_2',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var web_page_3 = new Fx.Slide('web_page_3',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var web_page_4 = new Fx.Slide('web_page_4',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var web_page_5 = new Fx.Slide('web_page_5',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var web_page_6 = new Fx.Slide('web_page_6',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var web_page_7 = new Fx.Slide('web_page_7',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var web_page_8 = new Fx.Slide('web_page_8',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var web_page_9 = new Fx.Slide('web_page_9',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();

			$('web_button_1').addEvent('click', function(e){
				e = new Event(e);
				web_page_1.slideIn();
				web_page_2.slideOut();
				web_page_3.slideOut();
				web_page_4.slideOut();
				web_page_5.slideOut();
				web_page_6.slideOut();
				web_page_7.slideOut();
				web_page_8.slideOut();
				web_page_9.slideOut();
				e.stop();
			});	
			$('web_button_2').addEvent('click', function(e){
				e = new Event(e);
				web_page_2.slideIn();
				web_page_1.slideOut();
				web_page_3.slideOut();
				web_page_4.slideOut();
				web_page_5.slideOut();
				web_page_6.slideOut();
				web_page_7.slideOut();
				web_page_8.slideOut();
				web_page_9.slideOut();
				e.stop();
			});				
			$('web_button_3').addEvent('click', function(e){
				e = new Event(e);
				web_page_3.slideIn();
				web_page_2.slideOut();
				web_page_1.slideOut();
				web_page_4.slideOut();
				web_page_5.slideOut();
				web_page_6.slideOut();
				web_page_7.slideOut();
				web_page_8.slideOut();
				web_page_9.slideOut();
				e.stop();
			});
			$('web_button_4').addEvent('click', function(e){
				e = new Event(e);
				web_page_4.slideIn();
				web_page_2.slideOut();
				web_page_3.slideOut();
				web_page_1.slideOut();
				web_page_5.slideOut();
				web_page_6.slideOut();
				web_page_7.slideOut();
				web_page_8.slideOut();
				web_page_9.slideOut();
				e.stop();
			});	
			$('web_button_5').addEvent('click', function(e){
				e = new Event(e);
				web_page_5.slideIn();
				web_page_4.slideOut();
				web_page_2.slideOut();
				web_page_3.slideOut();
				web_page_1.slideOut();
				web_page_6.slideOut();
				web_page_7.slideOut();
				web_page_8.slideOut();
				web_page_9.slideOut();
				e.stop();
			});	
			$('web_button_6').addEvent('click', function(e){
				e = new Event(e);
				web_page_6.slideIn();
				web_page_5.slideOut();
				web_page_4.slideOut();
				web_page_2.slideOut();
				web_page_3.slideOut();
				web_page_1.slideOut();
				web_page_7.slideOut();
				web_page_8.slideOut();
				web_page_9.slideOut();
				e.stop();
			});	
			$('web_button_7').addEvent('click', function(e){
				e = new Event(e);
				web_page_7.slideIn();
				web_page_5.slideOut();
				web_page_4.slideOut();
				web_page_2.slideOut();
				web_page_3.slideOut();
				web_page_1.slideOut();
				web_page_6.slideOut();
				web_page_8.slideOut();
				web_page_9.slideOut();
				e.stop();
			});	
			$('web_button_8').addEvent('click', function(e){
				e = new Event(e);
				web_page_8.slideIn();
				web_page_7.slideOut();
				web_page_5.slideOut();
				web_page_4.slideOut();
				web_page_2.slideOut();
				web_page_3.slideOut();
				web_page_1.slideOut();
				web_page_6.slideOut();
				web_page_9.slideOut();
				e.stop();
			});	
			$('web_button_9').addEvent('click', function(e){
				e = new Event(e);
				web_page_9.slideIn();
				web_page_8.slideOut();
				web_page_7.slideOut();
				web_page_5.slideOut();
				web_page_4.slideOut();
				web_page_2.slideOut();
				web_page_3.slideOut();
				web_page_1.slideOut();
				web_page_6.slideOut();
				e.stop();
			});	
				
var graphics_page_1 = new Fx.Slide('graphics_page_1',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).show();	
var graphics_page_2 = new Fx.Slide('graphics_page_2',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var graphics_page_3 = new Fx.Slide('graphics_page_3',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var graphics_page_4 = new Fx.Slide('graphics_page_4',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var graphics_page_5 = new Fx.Slide('graphics_page_5',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var graphics_page_6 = new Fx.Slide('graphics_page_6',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var graphics_page_7 = new Fx.Slide('graphics_page_7',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var graphics_page_8 = new Fx.Slide('graphics_page_8',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();

			$('graphics_button_1').addEvent('click', function(e){
				e = new Event(e);
				graphics_page_1.slideIn();
				graphics_page_2.slideOut();
				graphics_page_3.slideOut();
				graphics_page_4.slideOut();
				graphics_page_5.slideOut();
				graphics_page_6.slideOut();
				graphics_page_7.slideOut();
				graphics_page_8.slideOut();
				e.stop();
			});	
			$('graphics_button_2').addEvent('click', function(e){
				e = new Event(e);
				graphics_page_2.slideIn();
				graphics_page_1.slideOut();
				graphics_page_3.slideOut();
				graphics_page_4.slideOut();
				graphics_page_5.slideOut();
				graphics_page_6.slideOut();
				graphics_page_7.slideOut();
				graphics_page_8.slideOut();
				e.stop();
			});				
			$('graphics_button_3').addEvent('click', function(e){
				e = new Event(e);
				graphics_page_3.slideIn();
				graphics_page_1.slideOut();
				graphics_page_2.slideOut();
				graphics_page_4.slideOut();
				graphics_page_5.slideOut();
				graphics_page_6.slideOut();
				graphics_page_7.slideOut();
				graphics_page_8.slideOut();
				e.stop();
			});
			$('graphics_button_4').addEvent('click', function(e){
				e = new Event(e);
				graphics_page_3.slideOut();
				graphics_page_1.slideOut();
				graphics_page_2.slideOut();
				graphics_page_4.slideIn();
				graphics_page_5.slideOut();
				graphics_page_6.slideOut();
				graphics_page_7.slideOut();
				graphics_page_8.slideOut();
				e.stop();
			});
			$('graphics_button_5').addEvent('click', function(e){
				e = new Event(e);
				graphics_page_3.slideOut();
				graphics_page_1.slideOut();
				graphics_page_2.slideOut();
				graphics_page_4.slideOut();
				graphics_page_6.slideOut();
				graphics_page_5.slideIn();
				graphics_page_7.slideOut();
				graphics_page_8.slideOut();
				e.stop();
			});
			$('graphics_button_6').addEvent('click', function(e){
				e = new Event(e);
				graphics_page_3.slideOut();
				graphics_page_1.slideOut();
				graphics_page_2.slideOut();
				graphics_page_4.slideOut();
				graphics_page_5.slideOut();
				graphics_page_6.slideIn();
				graphics_page_7.slideOut();
				graphics_page_8.slideOut();
				e.stop();
			});
			$('graphics_button_7').addEvent('click', function(e){
				e = new Event(e);
				graphics_page_3.slideOut();
				graphics_page_1.slideOut();
				graphics_page_2.slideOut();
				graphics_page_4.slideOut();
				graphics_page_5.slideOut();
				graphics_page_6.slideOut();
				graphics_page_7.slideIn();
				graphics_page_8.slideOut();
				e.stop();
			});
			$('graphics_button_8').addEvent('click', function(e){
				e = new Event(e);
				graphics_page_3.slideOut();
				graphics_page_1.slideOut();
				graphics_page_2.slideOut();
				graphics_page_4.slideOut();
				graphics_page_5.slideOut();
				graphics_page_6.slideOut();
				graphics_page_7.slideOut();
				graphics_page_8.slideIn();
				e.stop();
			});


var logos_page_1 = new Fx.Slide('logos_page_1',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).show();	
var logos_page_2 = new Fx.Slide('logos_page_2',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var logos_page_3 = new Fx.Slide('logos_page_3',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();
var logos_page_4 = new Fx.Slide('logos_page_4',{duration: 600,transition: Fx.Transitions.Sine.easeOut}).hide();

			$('logos_button_1').addEvent('click', function(e){
				e = new Event(e);
				logos_page_1.slideIn();
				logos_page_2.slideOut();
				logos_page_3.slideOut();
				logos_page_4.slideOut();
				e.stop();
			});	
			$('logos_button_2').addEvent('click', function(e){
				e = new Event(e);
				logos_page_2.slideIn();
				logos_page_1.slideOut();
				logos_page_3.slideOut();
				logos_page_4.slideOut();
				e.stop();
			});	
			$('logos_button_3').addEvent('click', function(e){
				e = new Event(e);
				logos_page_3.slideIn();
				logos_page_1.slideOut();
				logos_page_2.slideOut();
				logos_page_4.slideOut();
				e.stop();
			});
			$('logos_button_4').addEvent('click', function(e){
				e = new Event(e);
				logos_page_4.slideIn();
				logos_page_3.slideOut();
				logos_page_1.slideOut();
				logos_page_2.slideOut();
				e.stop();
			});
			

});

	function open_acc(id) {
		accordion.display(id);
	}
	
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}