$(document).ready(function() {
	$('.wojew').mouseover(function() {
		var $img = $('.mapka>img');
		$img.parent().append('<img src="img/mapka_'+$(this).attr('id')+'.png" alt="" usemap="#mapkamap" />');
		$img.remove();
		var $toAppend = '';
		switch($(this).attr('id')) {
			case 'podkarpackie':
				$toAppend = '<div class="address">\
							ul. E.Orzeszkowej 13<br />\
							35-006 Rzeszów<br />\
							tel./fax 17 /85 25 101<br />\
							tel. 17/ 85 01 175 do 178<br />\
							biuro@druktech.pl\
						</div>\
						<div class="ff"></div>';
			break;
			case 'lubelskie':
				$toAppend = '<div class="address">\
					ul. Fabryczna 15/7/7<br />\
					20-082 Lublin<br />\
					tel./fax 81 / 53 42 640<br />\
					<br />\
					lublin@druktech.pl\
				</div>';
			break;
			case 'malopolskie':
				$toAppend = '<div class="address">\
					ul. Narutowicza 17<br />\
					33-100 Tarnów<br />\
					tel./fax 14 / 65 56 764<br />\
					tel. 14 / 65 56 763<br />\
					tarnow@druktech.pl\
				</div>\
				<div class="address" style="margin-left: 50px;">\
					ul. Skośna 12<br />\
					30-714 Kraków<br />\
					tel./fax 12 / 42 28 057<br />\
					krakow@druktech.pl\
				</div>\
				<div class="ff"></div>';
			break;
			case 'slaskie':
				$toAppend = '<div class="address">\
					ul. Powstańców Śląskich 6<br />\
					43-300 Bielsko-Biała<br />\
					tel. 33 / 81 62 400<br />\
					tel. kom. 512 155 730<br />\
					<br />\
					bielsko-biala@druktech.pl\
				</div>';
			break;
		}
		$('.chmurka_duza').empty().append($toAppend);
	});
	$('.wojew').mouseout(function() {
		var $img = $('.mapka img');
		$img.parent().append('<img src="img/mapka_podkarpackie.png" alt="" usemap="#mapkamap" />');
		$img.remove();
		var $toAppend = '<div class="address">\
							ul. E.Orzeszkowej 13<br />\
							35-006 Rzeszów<br />\
							tel./fax 17 /85 25 101<br />\
							tel. 17/ 85 01 175 do 178<br />\
							biuro@druktech.pl<br />\
						</div>\
						<div class="ff"></div>';
		$('.chmurka_duza').empty().append($toAppend);
	});
	
    $('input.login, input.pass').focus(function() {
        var def = $(this)[0].defaultValue;
        var cur = $(this).val();
        if (def == cur) {
            $(this).attr('value', '');
        }
    });
    $('input.login, input.pass').blur(function() {
        var def = $(this)[0].defaultValue;
        var cur = $(this).val();
        if (def == cur || cur == '') {
            $(this).attr('value', def);
            $(this).removeClass('ok');
        }
        else {
            $(this).addClass('ok');
        }
    });
	
	$('.contact_one .contact_header').click(function() {
		$('.contact_one .contact_data').hide();
		$(this).next().show();
		$('.contact_right').hide();
		$('#c'+$(this).parent().attr('id')).show();
	});
	
	$('.contact_one:eq(0) .contact_header').click();
});
