var changerOn = 1;


function loginPop() {
	leftPos = 0;
	topPos = 0;
	if (screen) {
		leftPos = (screen.width / 2);
		topPos = (screen.height / 2) - 300;
	}
	window.open('http://studio.adbeast.com/Login/5160Popup/default.asp',
				'UNTITLED FILMS',
				'height=400, width=400,toolbar=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,left='+leftPos+',top='+topPos);

}


function openVideo(url, title, dim, that)
{
	changerOn = 0;
	Mediabox.open(url, title, dim);
	changeLink(that);
}

function changeLink(that)
{
	that.style.color = '#999999';
	// color change when link is clicked
	document.getElementById('wrapper').style.color = '#444444';
	var doc = document.getElementsByTagName('a');
	for (var i = 0; i < doc.length; i++){
		//Do Work on doc[i], this sets the border of the Div black
		doc[i].style.color = "#444444";
	}
	that.style.color = 'white';
	// mouse roll out color change
	that.onmouseout = function() {
		that.style.color = '#FFFFFF';
	}
}


window.addEvent('domready', function() {
	
	var mySmoothScroll = new Fx.SmoothScroll({
		links: '.smoothAnchors',
		wheelStops: false
	});
	
	$('hddoc').hide();
	
	$('hubertdoc').addEvent('click', function(event){
		event.stop();
		$('hddoc').reveal();
		$('hdgeneral').dissolve();
		colorSwitch('hubertdoc', 'hubertgeneral');
	});

	$('hubertgeneral').addEvent('click', function(event){
		event.stop();
		$('hddoc').dissolve();
		$('hdgeneral').reveal();
		colorSwitch('hubertgeneral', 'hubertdoc');
	});
	
	$$('a').addEvent('mouseover', function(event){
		if(changerOn == 1) {
			$(this).setStyle('color', '#444444');
		}
		if($(this).getProperty('rel') == 'inactive'){
			$(this).setStyle('color', '#444444');
		}
	});
	
	$$('a').addEvent('mouseout', function(event){
		if(changerOn == 1) {
			$(this).setStyle('color', '#FFFFFF');
		}
		if($(this).getProperty('rel') == 'inactive'){
			$(this).setStyle('color', '#444444');
		}
	});
	
	$$('a[rel^=inactive]').addEvent('mouseover', function(event){
		$(this).setStyle('color', '#444444');
	});
	
	$$('a[rel^=inactive]').addEvent('mouseout', function(event){
		$(this).setStyle('color', '#444444');
	});
})

function colorSwitch(focused, unfocused) {
	$(focused).setStyle('color', '#FFFFFF');
	$(focused).setProperty('rel', 'active');
	
	$(unfocused).setStyle('color', '#444444');
	$(unfocused).setProperty('rel', 'inactive');
}	


window.addEvent('domready', function() {
	
	var mySmoothScroll = new Fx.SmoothScroll({
		links: '.smoothAnchors',
		wheelStops: false
	});
	
	$('mgcar').hide();
	
	$('markcar').addEvent('click', function(event){
		event.stop();
		$('mgcar').reveal();
		$('mggeneral').dissolve();
		colorSwitch('markcar', 'markgeneral');
	});

	$('markgeneral').addEvent('click', function(event){
		event.stop();
		$('mgcar').dissolve();
		$('mggeneral').reveal();
		colorSwitch('markgeneral', 'markcar');
	});
	
	$$('a').addEvent('mouseover', function(event){
		if(changerOn == 1) {
			$(this).setStyle('color', '#444444');
		}
		if($(this).getProperty('rel') == 'inactive'){
			$(this).setStyle('color', '#444444');
		}
	});
	
	$$('a').addEvent('mouseout', function(event){
		if(changerOn == 1) {
			$(this).setStyle('color', '#FFFFFF');
		}
		if($(this).getProperty('rel') == 'inactive'){
			$(this).setStyle('color', '#444444');
		}
	});
	
	$$('a[rel^=inactive]').addEvent('mouseover', function(event){
		$(this).setStyle('color', '#444444');
	});
	
	$$('a[rel^=inactive]').addEvent('mouseout', function(event){
		$(this).setStyle('color', '#444444');
	});
})

function colorSwitch(focused, unfocused) {
	$(focused).setStyle('color', '#FFFFFF');
	$(focused).setProperty('rel', 'active');
	
	$(unfocused).setStyle('color', '#444444');
	$(unfocused).setProperty('rel', 'inactive');
}	


window.addEvent('domready', function() {
	
	var mySmoothScroll = new Fx.SmoothScroll({
		links: '.smoothAnchors',
		wheelStops: false
	});
	
	$('tabletop').hide();
	
	$('stevetable').addEvent('click', function(event){
		event.stop();
		$('tabletop').reveal();
		$('general').dissolve();
		colorSwitch('stevetable', 'stevegeneral');
	});

	$('stevegeneral').addEvent('click', function(event){
		event.stop();
		$('tabletop').dissolve();
		$('general').reveal();
		colorSwitch('stevegeneral', 'stevetable');
	});
	
	$$('a').addEvent('mouseover', function(event){
		if(changerOn == 1) {
			$(this).setStyle('color', '#444444');
		}
		if($(this).getProperty('rel') == 'inactive'){
			$(this).setStyle('color', '#444444');
		}
	});
	
	$$('a').addEvent('mouseout', function(event){
		if(changerOn == 1) {
			$(this).setStyle('color', '#FFFFFF');
		}
		if($(this).getProperty('rel') == 'inactive'){
			$(this).setStyle('color', '#444444');
		}
	});
	
	$$('a[rel^=inactive]').addEvent('mouseover', function(event){
		$(this).setStyle('color', '#444444');
	});
	
	$$('a[rel^=inactive]').addEvent('mouseout', function(event){
		$(this).setStyle('color', '#444444');
	});
})

function colorSwitch(focused, unfocused) {
	$(focused).setStyle('color', '#FFFFFF');
	$(focused).setProperty('rel', 'active');
	
	$(unfocused).setStyle('color', '#444444');
	$(unfocused).setProperty('rel', 'inactive');
}	

window.addEvent('domready', function() {
	
	var mySmoothScroll = new Fx.SmoothScroll({
		links: '.smoothAnchors',
		wheelStops: false
	});
	
	$('jmcar').hide();
	
	$('mastrocar').addEvent('click', function(event){
		event.stop();
		$('jmcar').reveal();
		$('jmgeneral').dissolve();
		colorSwitch('mastrocar', 'mastrogeneral');
	});

	$('mastrogeneral').addEvent('click', function(event){
		event.stop();
		$('jmcar').dissolve();
		$('jmgeneral').reveal();
		colorSwitch('mastrogeneral', 'mastrocar');
	});
	
	$$('a').addEvent('mouseover', function(event){
		if(changerOn == 1) {
			$(this).setStyle('color', '#444444');
		}
		if($(this).getProperty('rel') == 'inactive'){
			$(this).setStyle('color', '#444444');
		}
	});
	
	$$('a').addEvent('mouseout', function(event){
		if(changerOn == 1) {
			$(this).setStyle('color', '#FFFFFF');
		}
		if($(this).getProperty('rel') == 'inactive'){
			$(this).setStyle('color', '#444444');
		}
	});
	
	$$('a[rel^=inactive]').addEvent('mouseover', function(event){
		$(this).setStyle('color', '#444444');
	});
	
	$$('a[rel^=inactive]').addEvent('mouseout', function(event){
		$(this).setStyle('color', '#444444');
	});
})

function colorSwitch(focused, unfocused) {
	$(focused).setStyle('color', '#FFFFFF');
	$(focused).setProperty('rel', 'active');
	
	$(unfocused).setStyle('color', '#444444');
	$(unfocused).setProperty('rel', 'inactive');
}	

