$(document).ready(function(){
    
    // FANCYBOX
    $("a.fancy").fancybox({
		  'titlePosition'  : 'inside'
	  });
    
    // STRANKOVANI
    var box = null;
    var input = null;
    
    function slideItUp(){
        box.slideUp("fast");
        $("body").die("click");
    }
    
    $(".prod_obj.left .strankovani li").click(function(){
        asdfg1(this);
    });
    
    $(".prod_obj.right .strankovani li").click(function(){
        asdfg2(this);
    });
    
    // SIPKY - POSUN
    $('#rotator').sideswap();
	  
    // SELECTBOX
    $(".selectbox").selectbox();
    $(".jquery-selectbox-list.jquery-custom-selectboxes-replaced-list").css({overflow: "auto", "max-height": "17em"});
    
    // SOUHLAS
    /*$(".neco").toggle(function(){
      $(this).addClass("active");
    }, function(){
      $(this).removeClass("active");
    });*/
    
    $('#foot a.right').attr('target','_blank');
    
});

function asdfg1(element)
{
    var index = $(element).attr("rel");
        
        $(".prod_obj.left .activeblock").hide();
        $(".prod_obj.left .activeblock:eq("+ index +")").show();
        
        $(".prod_obj.left .strankovani li").removeClass("active");
        $(element).addClass("active");
}
function asdfg2(element)
{
    var index = $(element).attr("rel");
        
        $(".prod_obj.right .activeblock").hide();
        $(".prod_obj.right .activeblock:eq("+ index +")").show();
        
        $(".prod_obj.right .strankovani li").removeClass("active");
        $(element).addClass("active");
}
