jQuery.noConflict();

jQuery(document).ready(function($){

   $('a[rel="external"]').attr('target','_blank');
   
   $('.sf-menu li ul li').css('opacity','0.95');
   
   $('#globalNav .sf-menu').superfish({
      autoArrows: false
   });
   
   $('#player').supersleight({shim: 'images/layout/x.gif'});
   
   $('#banner1').cycle({
      fx: 'fade',
      speed: 2500,
      timeout: 9000,
      delay: -2500
      //random: 0
   });
   
   /*
   $('#productList .productImg a img')
      .css({
         'margin-top' : function(index) {return -($(this).height()/2)}, 
         'margin-left' : function(index) {return -($(this).width()/2)} 
      })
      .addClass('move50')
      .parent('a').css( {'line-height' : 'normal'} );

   $('#productDetail .productImg img')
      .css({
         'margin-top' : function(index) {return -($(this).height()/2)}, 
         'margin-left' : function(index) {return -($(this).width()/2)} 
      })
      .addClass('move50')
      .parent('div').css( {'line-height' : 'normal'} );
    */

	// setup overlay actions
	$('a[rel="#overlay"], a[rel="#bigOverlay"]').overlay({
		
      absolute: true,
      
		// setup exposing (optional operation);
		onBeforeLoad: function() {
			this.expose();	
		},				
		
		onLoad: function(content) {
			// find the player contained inside this overlay and load it
			this.getContent().find('a.player').flowplayer(0).load();
		},
		
		onClose: function(content) {
			$f().unload();
			
			// close exposing
			$.expose.close();
		}
	});				
   	
	// install flowplayers
	$('a.player').flowplayer('media/flowplayer-3.1.0.swf', {clip: {scaling: 'fit'}});
   
});

