﻿$(document).ready(function() {
	
// rozwijane menu pionowe
$('.menu_body').css('display', 'none');
$(".menu_head").stop(true, false).click(function(){$(this).next(".menu_body").slideToggle(700).siblings(".menu_body").slideUp(600);});
$(".hit").next(".menu_body").slideToggle(300).siblings(".menu_body").slideUp("fast");
//wstawienie ikony firmy w tekst$('p').find('em:contains("IQ")').addClass('firma');
// logowanie partnerów
$('#l_login').click(function(){
	$(this).val('');
});


$('#login').append('<input type="text" value="hasło" id="l_nietajne_haslo" tabindex="2">');
$('#l_nietajne_haslo').focus(function(){
	$(this).hide();
	$('#l_haslo').show().focus();
});
	
//animacja menu

$('.nav a').hover(
function(){
	$(this).stop(true, false).animate({marginLeft:10}, 160, 'swing');
}, function(){
	$(this).animate({marginLeft:0},50, 'swing');
});

//animacja login
$('#partner').animate({top: 0}, 1500, 'swing');

//animacja box
if ($.browser.webkit || $.browser.mozilla || $.browser.opera) {
	$('#box').hide(600).fadeIn(700);
	$('#all').hide().fadeIn(1200);
}

//walidacja formularza jquery
$('.button').formValidator({
	scope : '#kontakt',
	errorDiv : '.error'
});

//add class last
$('ul li:last-child').addClass('last');

//colorbox
$('.lightbox').colorbox();

//animacja sektorów

	$('.sektor').hover(function(){
		$(this).siblings(this).stop(true, false).animate({
			opacity: .5
		}, 300);
	}, function(){
		$(this).siblings(this).animate({
			opacity: 0
		}, 400);
	});


}); //ready end


Cufon.replace('.cuf', {hover:true});Cufon.replace('h2');
