var $j = jQuery.noConflict();

$j(document).ready(function(){
 
	 $j('#cenik tr').not(".linka").mouseover(function(){$j(this).addClass("over");}).mouseout(function(){$j(this).removeClass("over");});
	 
	 $j('#cenik tr td:nth-child(2), #cenik tr td:nth-child(3)').addClass("aright");

    function staticNav() {
        var sidenavHeight = $j(".lionoil").height(); //Get height
        var winHeight = $j(window).height(); //Get height of viewport
        var browserIE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false; //Check for IE6

        if (browserIE6) { //if IE6...
            $j(".lionoil").css({'position' : 'absolute'});  //reset the sidenav to be absolute
        } else { //if not IE6...
            $j(".lionoil").css({'position' : 'fixed'}); //reset the sidenav to be fixed
        }

        if (sidenavHeight > winHeight) { //If sidenav is taller than viewport...
            $j(".lionoil").css({'position' : 'static'}); //switch the fixed positioning to static. Say good bye to sticky nav!
        }
    }

    staticNav(); //Execute function on load

    $j(window).resize(function () { //Each time the viewport is adjusted/resized, execute the function
        staticNav();
    });
	
	$j("a[rel=fancybox], a[rel=clearbox], a[rel=fancybox2]").fancybox({ 'zoomSpeedIn': 1000, 'zoomSpeedOut': 0, 'enableEscapeButton': true, 'overlayShow': true, 'hideOnContentClick': false, 'autoScale': true, 'centerOnScroll': true, 'titlePosition': 'inside', 'titleShow': false, 'overlayColor': '#000' });

});
