var myriad = {
    src: base_url+'js/myriadcond.swf'
  };
  
sIFR.prefetch(myriad);
sIFR.activate();


sIFR.replace(myriad, {
    selector: '#content h1'
    ,wmode: 'transparent'
    ,offsetTop: '4'
    ,css: [
      '.sIFR-root { color: #3F3F3F; }'
    ]
});

sIFR.replace(myriad, {
    selector: 'div.o_firmie_index_box h2'
    ,wmode: 'transparent'
    ,offsetTop: '4'
    ,css: [
      '.sIFR-root { color: #127FAE; }'
    ]
});

sIFR.replace(myriad, {
    selector: '#content h2'
    ,wmode: 'transparent'
    ,offsetTop: '4'
    ,css: [
      '.sIFR-root { color: #3F3F3F; }'
    ]
});

function toggleSubMenu(menuName, vis)
{
	if (vis)
		$("#"+menuName).show();
	else
		$("#"+menuName).hide();
}

function checkRequiredFields(formObj)
{
	// sprawdzanie czy po nacis�nie�ciu submit wymagane pola s�a wype�lnione
	ok = true;
    $(formObj).find(".requiredField").each(function(){
			if (this.value=='')
	        {
          		ok=false;
          		$(this).css("background", "#ff9");
        	}
        	else
        	{
          		$(this).css("background", "#fff");
        	};                    
      	});
	if (ok)
		return true;
	alert('Nie wypełniono wszystkich wymaganych pól!');
    return false;
}

$(document).ready(
			function()
			{
				// dodaj czerwon� gwizadk� za ka�dym wymaganym polem
				$(".requiredField[@type!='hidden']").after('<span class="redStar">*</span>');
				
				// zmien styl linkow external
				$("a.external").append("<img src='"+base_url+"img/external_link.gif' alt='' />");
				
				// bardziej niebieski od niebieskiego
				$("img.blueBorder").each(function(){
						if ($(this).parent()[0].nodeName=="A")
						{
							$(this).mouseover(function(){$(this).removeClass("blueBorder"); $(this).addClass("darkBlueBorder");});
							$(this).mouseout(function(){$(this).removeClass("darkBlueBorder"); $(this).addClass("blueBorder");});
						}
					});
				
			}
		);
