$(document).ready(function() {

  $('ul.sf-menu').superfish({ 
      delay:       1000,                            // one second delay on mouseout 
      animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
      speed:       'fast',                          // faster animation speed 
      autoArrows:  false,                           // disable generation of arrow mark-up 
      dropShadows: false                            // disable drop shadows 
    });
    
  $('.fadeone').flash({src: '/wp-content/themes/younis/images/flash/fish.swf', width: 320, height: 280, wmode : "transparent"});
  // $('.fadetwo').flash({src: '/wp-content/themes/younis/images/flash/owl.swf', width: 320, height: 280, wmode : "transparent"});
  // $('.fadethree').flash({src: '/wp-content/themes/younis/images/flash/rocket.swf', width: 320, height: 280, wmode : "transparent"});
  // $('.fadefour').flash({src: '/wp-content/themes/younis/images/flash/tree.swf', width: 320, height: 280, wmode : "transparent"});
    
  $("div.search label").inFieldLabels();
  $("label.subscribe label").inFieldLabels();
      
  $('#slider ul').after('<div id="cycles" class="cycles">').cycle({ 
      fx: 'fade', 
      pager: '#cycles',
      before: function() {
        var frame = $(this),
            flashes = { "fadeone": "fish", "fadetwo": "owl", "fadethree": "rocket", "fadefour": "tree" };
        $.each(flashes, function(k, v) {
          var flash = frame.find('.' + k);
          if (flash.length) {
            $(flash).flash({src: '/wp-content/themes/younis/images/flash/' + v + '.swf', width: 320, height: 280, wmode : "transparent"});
          }
        });
      },
      speed: 1000,
      timeout: 13000
    });
    
           
});
