
$(document).ready(function() {
// **** externi odkazy ****
$('a:not(":has(img)")').filter(function() {
    return this.hostname && this.hostname !== location.hostname;
})
//.not(":has(img)")
.addClass('external')
.attr('target','_blank')
.attr('title','Toto je externí odkaz')


// galerie - pohyb nahoru
//$('.divGal').mouseenter(function(){
//	  $(this).css("position", "relative");
//	  $(this).css("top", "0"); // Opera bug fix
//	  $(this).stop().animate({'top': '-6px'}); //, {duration: 'slow', easing: 'easeOutExpo'}
//}).mouseleave(function(){
//	  $(this).stop().animate({'top' : '0'}); //, {duration: 'slow', easing: 'easeOutExpo'}
//});

// **** top menu first / last ****
$('#topmenu .menu li:first-child').filter(function() {
    $(this).addClass("first");
});
$('#topmenu .menu li:last-child').filter(function() {
    $(this).addClass("last");
});


// akce
$('#aItems').bxSlider({
    auto: true,
    autoControls: false,
    autoHover: true,
    pager: false,
    controls: false,
    speed: 500,
    pause: 5000,
    mode: 'vertical',
    easing: 'easeOutCubic'
});
// graficke navrhy 
$('#slideItems').bxSlider({
    auto: true,
    autoControls: false,
    autoHover: true,
    pager: false,
    controls: true,
    randomStart: false,
    speed: 500,
    pause: 3500,
    mode: 'fade'
});
    
// header slideshow 
$('#showItems').bxSlider({
    auto: true,
    autoControls: false,
    autoHover: false,
    pager: false,
    controls: false,
    randomStart: true,
    mode: 'horizontal',
    speed: 500,
    pause: 2500,
    easing: 'easeOutCubic'
});

// fancybox - galerie
$("a.galfoto").fancybox({
    titlePosition: 'outside'
});
// fancybox - obrazkovy odkaz ve statickem textu
$("a.fancybox").fancybox({
    titlePosition: 'over'
});
// fancybox - akce
$("a.eventFoto").fancybox({
    titlePosition: 'outside'
});


});





