// Zamiast getElementById
function getObj(id) {
    return document.getElementById(id);
}

// Wyslij e-mail
function goSnail(end,to,dom) {
	var pref1 = 'mail';
	var dot ='.';
	var pref3 = ':';
	var pref2 = 'to';
	var mal = '@';
	location.href = pref1+pref2+pref3+to+mal+dom+dot+end;
}

// Pokaz e-mail
function showSnail(end,to,dom) {
	var pref1 = 'mail';
	var dot ='.';
	var pref3 = ':';
	var pref2 = 'to';
	var mal = '@';		
	document.write('<a href="'+pref1+pref2+pref3+to+mal+dom+dot+end+'">'+to+mal+dom+dot+end+"</a>");
}

// Funkcje jQuery
$(document).ready(
	function(){
		$(function(){
			$('#wrapLeft').css('opacity', 0.07);
			$('#wrapRight').css('opacity', 0.07);
		});
	});

$(document).ready(
	function(){
        $('#headerU a').hover(
			function() { $(this).fadeTo("slow", 0.4); }, 
			function() { $(this).fadeTo("slow", 1); }
		);
	});

$(document).ready(
	function(){
		$(function(){
			$('.smooth-menu').SmoothMenu();
			$('.smooth-menu').find('.selection').css('opacity', 0.2);
		});
	});

$(document).ready(
	function(){
		$('.faderr').innerfademin({
			animationtype: 'fade',
			speed: 'slow',
			timeout: 5000,
			type: 'sequence'
		});
	});

$(document).ready(
	function(){
		$('#fadeHeader').innerfademin({
			animationtype: 'fade',
			speed: 'slow',
			timeout: 5000,
			type: 'sequence'
		});
	});

$(document).ready(
	function(){
		$('.index .left a img').css('opacity', 0.7);
        $('.index .left a img').hover(
			function() { $(this).stop().animate({ 'opacity' : '1' }); }, 
			function() { $(this).stop().animate({ 'opacity' : '0.7' }); }
		);
	});

$(document).ready(
	function(){ 
		$(".onFocus").focus(function () {
			$(this).removeClass('blur');
			$(this).addClass('focus');
		});
		$(".onFocus").blur(function () {
			$(this).removeClass('focus');
			$(this).addClass('blur');
		});
	});

$(document).ready(
	function(){
        $('.offerButton').hover(
			function() {
				$(this).removeClass('offerButtonJQ-2');
				$(this).addClass('offerButtonJQ-1');
				$(this).attr("id","divNo1");
				$("#divNo1 a").css({ 'color' : '#000' });
				
			}, 
			function() {
				$(this).removeClass('offerButtonJQ-1');
				$(this).addClass('offerButtonJQ-2');
				$("#divNo1 a").css({ 'color' : '#6A120D' });
				$(this).attr("id","");
			});
	});

$(document).ready(
	function(){
        $('.offerButton').click(
			function() {
				 var url = $(this).attr("name");
				 location.href=url;
			});
	});
