// sFIR Init
var Qlassik = { src: '_swf/Qlassik.swf' };
var Helvetica = { src: "_swf/helvetica.swf"};
var HelveticaHome = { src: "_swf/helvetica.swf"};
sIFR.activate(Qlassik, Helvetica, HelveticaHome);
sIFR.replace(Qlassik, {
  selector: 'h1',
  css: '.sIFR-root { background-color: #FFFFFF; color: #000000; }',
  wmode: 'transparent'
});
sIFR.replace(Helvetica, {
  selector: 'h2',
  css: '.sIFR-root { background-color: #FFFFFF; color: #000000; }',
  wmode: 'transparent'
});
sIFR.replace(HelveticaHome, {
  selector: 'h3',
  css: '.sIFR-root { background-color: #F1F1F1; color: #000000; }',
  wmode: 'transparent'
});

// jQuery Init 
function jInit(){

var whatSelected = null;

$('.menu-interno ul li').each(function(value){
	
	if($('.menu-interno ul li').eq(value).hasClass('select'))
	{
		whatSelected = value;
	}
	
});


// ESTADOS SEP:

var sepLeft =  "_img/menu-separacao-up-left.png";
var sepRight = "_img/menu-separacao-up-right.png";
var sepUp = "_img/menu-separacao-up.png";
var sepNormal = "_img/menu-separacao.png";



// MENU
if(whatSelected == 0)
{
	$('#sep01 img').attr('src',sepLeft)
	// BTN2
	$('.quePodeFazer').hover(function(){
	$('#sep01 img').attr('src',sepUp)
	$('#sep02 img').attr('src',sepLeft)
	}).mouseout(function(){
	$('#sep01 img').attr('src',sepLeft)
	$('#sep02 img').attr('src',sepNormal)
	});
	btn3();
	btn4();	
}

if(whatSelected == 2)
{
	$('#sep01 img').attr('src',sepRight)
	$('#sep02 img').attr('src',sepLeft)
	// BTN1
	$('.vistaGeral').hover(function(){
	$('#sep01 img').attr('src',sepUp)
	}).mouseout(function(){
	$('#sep01 img').attr('src',sepRight)
	});
	// BTN 3
	$('.porqueUsar').hover(function(){
	$('#sep02 img').attr('src',sepUp)
	$('#sep03 img').attr('src',sepLeft)
	}).mouseout(function(){
	$('#sep02 img').attr('src',sepLeft)
	$('#sep03 img').attr('src',sepNormal)
	});
	btn4();	
}

if(whatSelected == 4)
{
	$('#sep02 img').attr('src',sepRight)
	$('#sep03 img').attr('src',sepLeft)
	// BTN1
	$('.ondeUsar').hover(function(){
	$('#sep03 img').attr('src',sepUp)
	}).mouseout(function(){
	$('#sep03 img').attr('src',sepLeft)
	});
	// BTN 3
	$('.quePodeFazer').hover(function(){
	$('#sep01 img').attr('src',sepRight)
	$('#sep02 img').attr('src',sepUp)
	}).mouseout(function(){
	$('#sep01 img').attr('src',sepNormal)
	$('#sep02 img').attr('src',sepRight)
	});
	btn1();	
}

if(whatSelected == 6)
{
	$('#sep03 img').attr('src',sepRight)
	
	
	// BTN 3
	$('.porqueUsar').hover(function(){
	$('#sep02 img').attr('src',sepRight)
	$('#sep03 img').attr('src',sepUp)
	}).mouseout(function(){
	$('#sep02 img').attr('src',sepNormal)
	$('#sep03 img').attr('src',sepRight)
	});

	btn1();	
	btn2();	
}



// BTN STATIC
function btn1()
{
	$('.vistaGeral').mouseover(function(){
	$('#sep01 img').attr('src',sepLeft);
	}).mouseout(function(){
	$('#sep01 img').attr('src',sepNormal)
	});
}

function btn2()
{
	$('.quePodeFazer').hover(function(){
	$('#sep01 img').attr('src',sepRight)
	$('#sep02 img').attr('src',sepLeft)
	}).mouseout(function(){
	$('#sep01 img').attr('src',sepNormal)
	$('#sep02 img').attr('src',sepNormal)
	});
}


function btn3()
{
	$('.porqueUsar').hover(function(){
	$('#sep02 img').attr('src',sepRight)
	$('#sep03 img').attr('src',sepLeft)
	}).mouseout(function(){
	$('#sep02 img').attr('src',sepNormal)
	$('#sep03 img').attr('src',sepNormal)
	});
}

function btn4()
{
	$('.ondeUsar').hover(function(){
	$('#sep03 img').attr('src',sepRight)
	}).mouseout(function(){
	$('#sep03 img').attr('src',sepNormal)
	});
}

// SOCIAL NETWORK

$('.footer').before('<div id="social-footer"></div>');

	var thisUrl = window.location.href;
	var thisTitle = $('title').html();
	var sonet = '<ul>';
	sonet += '<li><a href="http://twitter.com/wiseforms" target="_blank"><img src="_img/social/twitter_up.png" onmouseover="this.src=\'_img/social/twitter_hover.png\'" onmouseout="this.src=\'_img/social/twitter_up.png\'" width="16" height="16" alt="Twitter" title="Twitter" /></a></li>';
	sonet += '<li><a href="http://www.facebook.com/sharer.php?u=' + thisUrl +'&amp;t='+thisTitle+'" target="_blank"><img src="_img/social/facebook_up.png" onmouseover="this.src=\'_img/social/facebook_hover.png\'" onmouseout="this.src=\'_img/social/facebook_up.png\'" width="16" height="16" alt="Facebook" title="Facebook" /></a></li>';
	sonet += '<li><a href="http://del.icio.us/post?url='+ thisUrl +'&amp;title='+thisTitle+'" target="_blank"><img src="_img/social/delicious_up.png" onmouseover="this.src=\'_img/social/delicious_hover.png\'" onmouseout="this.src=\'_img/social/delicious_up.png\'" width="16" height="16" alt="Delicious" title="Delicious" /></li>';
	sonet += '<li style="visibility:hidden;"><a href="http://technorati.com/faves?add='+thisUrl+'"<img src="_img/social/technorati_up.png" onmouseover="this.src=\'_img/social/technorati_hover.png\'" onmouseout="this.src=\'_img/social/technorati_up.png\'" width="16" height="16" alt="Technorati" title="Technorati" /></li>';
	sonet += '</ul>';
	$('#social-footer').append(sonet)

}

	
