document.write('<style>.flashm {display:none} .alt {display:none} .sifr {visibility:hidden} .flash-update .alt {display:block} .homepage .object img,.page .object img {visibility:hidden;} </style>');

$(document).ready(function() {
//$('img[@src$=.png],.pngfix,#top .babes,#top H2 A,#or-left,#or-right,#or-right-trans').ifixpng(); 

 // vlas. funkcie
    jQuery.fn.extend({
       animation: function(src,w,h) {
    $(this).flash({
            src: "uploads/files/flash/"+src,
            height: h,
            width: w,
            wmode: "transparent",
            bgcolor: '#fff'             
		});
		}
       })
          


$('.nadpis').flash(        { 
            src: 'uploads/files/js/jfr.swf',
            wmode: 'transparent'
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<span>'+this.innerHTML+'</span>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
     }   
)





$('table.referencie tr td.col1,table.referencie tr td.col2,table.referencie tr td.col3').hover(
function(){
$('table.referencie tr td.'+$(this).attr("class")).addClass("td-hover");
},function(){
var class1 =  $(this).attr("class").split(" ");
$('table.referencie tr td.'+class1[0]).removeClass("td-hover"); 
})

$("table.referencie tr td").click(function(){
var class1 =  $(this).attr("class").split(" ");
location.href=$('table.referencie tr.foot td.'+class1[0]+' p a').attr("href");
})

$('div.fstt').hover(
function(){
$(this).children("div:first").addClass("fstt-hover");
},
function(){
$(this).children("div:first").removeClass("fstt-hover"); 
})


$('div.aktualne .news').hover(
function(){
$(this).children(".news-case").addClass("news-hover");
},
function(){
$(this).children(".news-case").removeClass("news-hover"); 
})

$("div.aktualne .news .news-case").click(function(){
location.href=$(this).children(".news-text").children("a").attr("href");
});

$("div.fstt div.fstt-dashed").click(function(){
location.href=$(this).children("p").children("a").attr("href");
});

$("td.frakcia").html('<select class="pole2" name="'+$("td.frakcia").children("input").attr("name")+'" id="'+$("td.frakcia").children("input").attr("id")+'" size="1"><option value="">- Vyberte typ materiálu -</option></select>');

$("td.material select").change(function(){

var frakcie = new Array();
frakcie[0] = new Array("- Vyberte typ materiálu -");
frakcie[1] = new Array("0 – 2","2 – 4","0 – 22","0 – 32","0 – 63","0 – 125","0 – 4","4 – 8","8 – 16","16 – 22","16 – 32","16 – 63","63 – 125","MACADAM","Lomový kameň","iné");
frakcie[2] = new Array("0 – 4","0 – 8","0 – 16","0 – 22","0 – 32","0 – 63","4 – 8","8 – 16","16 – 22","16 – 32","0 – 80","iné");
frakcie[3] = new Array("0 - 1","0 - 2","iné");
frakcie[4] = new Array("iné");
var hodnota = $(this).val() ? $(this).val() : 0;
var tmp = "";
 for (var i=0; i < frakcie[hodnota].length; i++)
  {
    tmp += "<option value='"+frakcie[hodnota][i]+"'>"+frakcie[hodnota][i]+"</option>";
  }
$("td.frakcia select").html(tmp);
});

$(".thickbox").fancybox();

});
 




function setFrakcia(mySelect)
{
  var hodnota = "";
  if (typeof(mySelect) == "object")
    hodnota = mySelect.selectedIndex;
  else
    hodnota = mySelect;
    
  var tmp = '<select class="pole2" name="frakcia" id="frakcia" size="1">';
  
  for (var i=0; i < frakcie[hodnota].length; i++)
  {
    tmp += "<option value='"+frakcie[hodnota][i]+"'>"+frakcie[hodnota][i]+"</option>";
  }
  tmp += "</select>";
  
  document.getElementById("inFrakcia").innerHTML = tmp;
}
