$(document).ready(function(){
$('.orangelink').css('color','#e93b00');
$('a.faq').colorbox({transition:"fade", width:"550px", height:"370px"});
$('.faq2').colorbox({width:"450px", height:"350px", iframe:true});
$('.faq3').colorbox();
		
			jQuery('ul.sf-menu').superfish();
			$('marquee#mar').marquee().mouseover(function () {
  $(this).trigger('stop');
}).mouseout(function () {
  $(this).trigger('start');
}).mousemove(function (event) {
  if ($(this).data('drag') == true) {
    this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
  }
}).mousedown(function (event) {
  $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
}).mouseup(function () {
  $(this).data('drag', false);
});

$('marquee.mar2').marquee();


$(".big-tresc2").mouseover(function() {
           $(this).css('background', '#111111');
        });
	
	$(".big-tresc2").mouseout(function() {
            $(this).css('background', '#222222');
        });
		

$(".staty-zakladka").mouseover(function() {
           $(this).css('background-position', '0 -68px').css('cursor', 'pointer');
        });
	
	$(".staty-zakladka").mouseout(function() {
            $(this).css('background-position', '0 -34px');
			$(".staty-zakladka-act").css('background-position', '0 0px');
        });
		

$(".small-box-title2").mouseover(function() {
           $(this).css('background-position', '0 -68px').css('cursor', 'pointer');
        });
	
	$(".small-box-title2").mouseout(function() {
            $(this).css('background-position', '0 -34px');
			$(".small-box-title2-act").css('background-position', '0 0px');
        });
		
		
$(".staty-zakladka").click(function(){
	$('.staty-zakladka-act').css('background-position', '0 -34px').removeClass("staty-zakladka-act").addClass("staty-zakladka");
	$(this).css('background-position', '0 0').addClass("staty-zakladka-act").removeClass("staty-zakladka");
	$('div#staty-tresc').fadeOut('fast').load('staty/index.php?kanal='+ $(this).attr('id'), {limit: 100}, function(){
$('marquee.mar2').marquee();
$('a.faq').colorbox({transition:"fade", width:"550px", height:"370px"});
$('.faq2').colorbox({width:"450px", height:"350px", iframe:true});
}).fadeIn('slow');
}); 


$(".small-box-title2").click(function(){
	$('.small-box-title2-act').css('background-position', '0 -34px').removeClass("small-box-title2-act").addClass("small-box-title2");
	$(this).css('background-position', '0 0').addClass("small-box-title2-act").removeClass("small-box-title2");
	$('div#last_inc').fadeOut('fast').load('last/'+ $(this).attr('id')+'.php', {limit: 100}).fadeIn('slow');
}); 
 
$(".staty-zakladka:first").addClass("staty-zakladka-act").removeClass("staty-zakladka")
$(".small-box-title2:last").addClass("small-box-title2-act").removeClass("small-box-title2")
	});
