jQuery(document).ready(function(){
jQuery(".art-menu li").hover(
function(){
jQuery(this).find('ul');
},
 
function(){
jQuery(this).find('ul');
}
);

  jQuery(function() {
    jQuery('#slideshow').crossSlide({
      sleep: 3,
      fade: 1
    }, [
      { src: '/wp-content/themes/plantpol/images/sldshw/1.jpg' },
      { src: '/wp-content/themes/plantpol/images/sldshw/2.jpg' },
      { src: '/wp-content/themes/plantpol/images/sldshw/3.jpg' },
      { src: '/wp-content/themes/plantpol/images/sldshw/4.jpg' },
      { src: '/wp-content/themes/plantpol/images/sldshw/5.jpg' }
    ])
  });
  jQuery.fn.getTitle = function() {
        var arr = jQuery("a.fancybox");
        jQuery.each(arr, function() {
            var title = jQuery(this).children("img").attr("title");
            jQuery(this).attr('title',title);
        })
    }

    // Supported file extensions
    var thumbnails = 'a:has(img)[href$=".bmp"],a:has(img)[href$=".gif"],a:has(img)[href$=".jpg"],a:has(img)[href$=".jpeg"],a:has(img)[href$=".png"],a:has(img)[href$=".BMP"],a:has(img)[href$=".GIF"],a:has(img)[href$=".JPG"],a:has(img)[href$=".JPEG"],a:has(img)[href$=".PNG"]';

    jQuery(thumbnails).addClass("fancybox").attr("rel","fancybox").getTitle();

    jQuery("a.fancybox").fancybox({
        'padding': 10,
        'overlayShow': true,
        'overlayColor': "#000000",
        'overlayOpacity': 0.8,
        'transitionIn' : 'elastic',
        'transitionOut' : 'elastic',
        'enableEscapeButton': true,
        'showCloseButton': true,
        'hideOnOverlayClick': true,
        'hideOnContentClick': false,
        'centerOnScroll': true
    });
  });
