$(document).ready(function() {
	$('.content-area').hide();
	$('#totop').hide();
	$('#products-panel h1').html($('#products-panel h1 a').html());
	$('#work-panel h1').html($('#work-panel h1 a').html());
	$('#company-panel h1').html($('#company-panel h1 a').html());
	$('#art-panel h1').html($('#art-panel h1 a').html());
	$('#products-panel').bind("click", function(e) {
		trigger('#products');
/*		window.location.hash='products';*/
		return false;
	}).css({'cursor':'pointer'});
	$('#work-panel').bind("click", function(e) {
		trigger('#work');
		return false;
	}).css({'cursor':'pointer'});
	$('#company-panel').bind("click", function(e) {
		trigger('#company');
		return false;
	}).css({'cursor':'pointer'});
	$('#art-panel').bind("click", function(e) {
		trigger('#art');
		return false;
	}).css({'cursor':'pointer'});
	$('#announcements h1 a').bind("click", function(e) {
		$('#robologo').attr('src','/images/arz.png');
		$.scrollTo( '#robologo', 400 );
		return false;
	});
	$('#totop a').bind("click", function(e) {
		$.scrollTo( '#products-panel', 800 );
		return false;
	});	
	trigger(window.location.hash);
});
trigger = function(target) {
	if($(target)&&target!=='') {
		window.location.hash=target
		$('.content-area').hide();
		$('#totop').show();
		$(target).show();
		$.scrollTo( target, 800 );
	}
};
var bramley = {src:'/includes/fonts/bramley_light.swf'};

sIFR.ua.supported = sIFR.ua.supported && (!sIFR.ua.ie || sIFR.ua.ieVersion < 0); // disable sifr in IE
sIFR.activate(bramley);

sIFR.replace(bramley, {
	selector: '.bramley'
	,wmode: 'transparent'
	,css: [
		'.sIFR-root { background-color: #FFFFFF; color: #333333; font-size: 64px; text-align: center; }'
	]
});
sIFR.replace(bramley, {
	selector: '#line'
	,wmode: 'transparent'
	,css: [
		'.sIFR-root { color: #98b8b6; font-size: 30px; text-align: center;margin-bottom:0; }',
		'a { color: #FFFFFF; text-decoration: none; }',
		'a:link { color: #FFFFFF; text-decoration: none; }',
		'a:hover { color: #E3E3E3; text-decoration: underline; }'
	]
});