/* ////////////////////////////////////////////////
FLASH INTERACTION *********************************
//////////////////////////////////////////////// */
var hash,fo,lang;

function refresh() {
	window.location.reload();
}
function updateHash(newHash) {
	window.location.hash = newHash;
}

function updateTitle(data_title) {
	title = data_title;
	document.title = title + ' | Makers of true originals';
}

function swfObject() {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	if (window['container']) {
		return window['container'];
	} else if (document['container']) {
		return document['container'];
	} else {
		return document.getElementById('container');
	}
}

/* ////////////////////////////////////////////////
FLASH INTERACTION *********************************
//////////////////////////////////////////////// */

/* ////////////////////////////////////////////////
JAVASCRIPT INTERACTION ****************************
//////////////////////////////////////////////// */
$(document).ready(function(){
	
	/* Setup flash */
	hash = window.location.hash;
	lang = (navigator.language?navigator.language:navigator.userLanguage).substr(0,2);
	random = parseInt(Math.random()*99999)+''+parseInt(Math.random()*99999);

	$('#container').flash({
		'allowfullscreen':'true',
		'allowscriptaccess':'always',
		'express':'http://makers-of-true-originals.com/expressInstall.swf',
		'src':'http://makers-of-true-originals.com/container.swf?nocache='+random,
		'flashvars':{'hash':hash.replace('#',''), 'lang':lang},
		'height':'100%',
		'width':'100%'
	});

	$(window).hashchange(function(){
		hash = window.location.hash;
		fo = swfObject();
		fo.updateSection(hash.replace('#',''));
	});

});
/* ////////////////////////////////////////////////
JAVASCRIPT INTERACTION ****************************
//////////////////////////////////////////////// */
