﻿var validate = function(){
	
}

$(function(){
	//var so = new SWFObject('http://images.templatemonster.com/screenshots/12600/12675.swf?button=0', 'flash_head', '766', '298', '7')
	var so = new SWFObject('index2.swf?button=0', 'flash_head', '766', '298', '7')
	so.setAttribute('wmode', 'transparent')
	so.write('head')
	/*
	$('#buro').click(function(event){
		event.preventDefault();
		this.blur();
		
		TB_show('', '#TB_inline?height=430&width=677&inlineId=buro_content', false);
	})
	*/
	$('#map').click(function(event){
		event.preventDefault();
		this.blur();
		
		TB_show('', '#TB_inline?height=525&width=520&inlineId=map_content', false);
	})
	
	//team
	var team = $('#team') 
	$('a', team).click(function(){
		var data = $(this).attr('text').split(',')
		var html = ''
			+ '<p><img src="' + $(this).attr('img') + '" alt="foto" /></p>'
			+ '<ul id="person_info">'
			+ '<li>' + $(this).html() + '</li>'
			+ '<li>' + data[0] + '</li>'
			+ '<li>' + data[1] + ', <a href="mailto:' + data[2] + '">' + data[2] + '</a></li>'
			+ '</ul>'
		
		$('.person')
			.html(html)
		/*
		$('.person')
			.find('img')
				.attr({src: $(this).attr('img')})
		*/
			
		$(this)
			.parent()
			.siblings()
			.find('a')
			.removeClass('active')
		
		$(this)
			.addClass('active')

		return false
	})
	
	
	$('.fotos div').hover(
		function(){
			var str = $(this)[0].style.backgroundImage
			$(this).css({'backgroundImage': str.replace('b_', 'a_')})
		},
		function(){
			var str = $(this)[0].style.backgroundImage
			$(this).css({'backgroundImage': str.replace('a_', 'b_')})
			//$(this).css({backgroundImage: 'url(img/content/b.' + $(this)[0].style.backgroundImage.substr(12) + ');'})
		}
	)
})