jQuery.noConflict();

function frame00() {
  time00 = setTimeout('animateFrame03()', 3000);
}
function frame01() {
  jQuery('#header .frame01, #header .text01, #header .text02, #header .frame02, #header .frame03').removeAttr('style');
  time01 = setTimeout('animateText01()', 1000);
  window.clearTimeout(timeStart);
};
function frame02() {
  time02 = setTimeout('animateFrame01()', 3000);
  window.clearTimeout(time01);
}
function frame03() {
  window.clearTimeout(time02);
  time03 = setTimeout('animateText02()', 1000);
}
function frame04() {
  window.clearTimeout(time03);
  time04 = setTimeout('animateFrame02()', 3000);
}


function animateFrame01 () {jQuery('#header .frame01, #header .text01').animate({opacity:0.0}, 2000, 'linear', function () {frame03();})};
function animateText01 () {jQuery('#header .text01').animate({left:1}, 2000, 'linear', function () {frame02();})};
function animateText02 () {jQuery('#header .text02').animate({left:1}, 2000, 'linear', function () {frame04();})};
function animateFrame02 () {jQuery('#header .frame02').animate({opacity:0}, 2000, 'linear', function () {frame00();})};
function animateFrame03 () {
  window.clearTimeout(time00);
  jQuery('#header .frame01').animate({opacity:1}, 2000, 'linear', function () {frame01();})
}

timeStart = setTimeout("frame01()", 1000);



jQuery(document).ready(function($){
$('input,textarea').focus(function(){
 $(this).parent('li').addClass('focus');
})
$('input,textarea').blur(function(){
 $(this).parent('li').removeClass('focus');
})

$('#hp-boxes a').hover(
  function(){$(this).parents('li').find('h2 a').css('text-decoration','none');},
  function(){$(this).parents('li').find('h2 a').css('text-decoration','underline');}
)

$('#search-full input.input, #search-image input.input').focus(function(){
  if($(this).val() == $(this).attr('alt')) $(this).val('');
});
$('#search-full input.input, #search-image input.input').blur(function(){
  if(!$(this).val()) $(this).val($(this).attr('alt'));
});

/*---------------- OHEKOVÁNÍ BUTTONU EPUBLISHE * -------------*/
 var imagesUrl='/_common/epcommon_3_5_1/_gfx/';

 var editButtons=new Array(
  new Array('btnEditActive','page_white_edit.gif','page_edit.gif'),
  new Array('btnSortUpActive','arrow_up_green.gif','arrow_up_red.gif'),
  new Array('btnSortUpInactive','arrow_up_grey.gif','arrow_up_grey.gif'),
  new Array('btnSortDownActive','arrow_down_green.gif','arrow_down_red.gif'),
  new Array('btnSortDownInactive','arrow_down_grey.gif','arrow_down_grey.gif'),
  new Array('btnVisibleActive','eye_visible.gif','eye_invisible.gif'),
  new Array('btnDeleteActive','delete.gif','cross.gif'),
  new Array('btnAddActive','add.gif','add_blue.gif')
 );

 $('.btnIco').css({backgroundColor:'transparent',backgroundPosition:'center bottom',backgroundRepeat:'no-repeat',display:'block',height:'16px',textDecoration:'none',width:'20px',padding:'0px 0px',margin:'0px 0px',border:'none',zIndex:'10',position:'relative'});
 $('.ep_adminTools_button,.ep_adminTools_button_noActive').css({backgroundImage:'none',fontFamily:'"Verdana CE", Verdana, "Arial CE", Arial, "Lucida Grande CE", lucida, "Helvetica CE", sans-serif',padding:'0px 0px',margin:'0px 0px',fontSize:'11px',fontWeight:'normal',textTransform:'none',display:'inline',lineHeight:'1.4',float:'none',border:'none'});
 $('.ep_adminTools_button_noActive').css('background-color','#c58888');
 $('.dark_green').css('background-color','#00c500');


 $('.ep_adminTools_button').hover(
  function(){
   $(this).css('background-color','#f80');
  },
  function(){
   $(this).css('background-color','#c50000');
  }
 )

 for(i=0;i<editButtons.length;i++){
  $('.'+editButtons[i][0]).css('background-image','url('+imagesUrl+editButtons[i][1]+')');
  $('.'+editButtons[i][0]).attr('rel',i);
  $('.'+editButtons[i][0]).hover(
   function(){
    $(this).css('background-image','url('+imagesUrl+editButtons[$(this).attr('rel')][2]+')');
   },
   function(){
    $(this).css('background-image','url('+imagesUrl+editButtons[$(this).attr('rel')][1]+')');
   }
  );
 }
});
