Cufon.set('fontFamily', 'Geometric').replace('#content-main h3');

jQuery(function() {
  // Open all external links in a new window
  $('a[rel="external"]').click( function() {
     window.open( $(this).attr('href') );
     return false;
  });
  
  // Self-labeled form fields
	$('input[title], textarea[title]').each(function() {
		if($(this).val() === '') {
			$(this).val($(this).attr('title'));	
		}

		$(this).focus(function() {
			if($(this).val() == $(this).attr('title')) {
				$(this).val('').addClass('focused');	
			}
		});
		
		$(this).blur(function() {
			if($(this).val() === '') {
				$(this).val($(this).attr('title')).removeClass('focused');	
			}
		});
	});
	
	$('#feature-slideshow').cycle({ 
      fx:     'scrollLeft', 
      timeout: 15000
  });
  
  $('#slideshow').cycle({ 
      fx:     'fade', 
      timeout: 7000, 
      pager:  '#slide-nav' 
  });
  
  $('#sub-slideshow').cycle({ 
      fx:     'fade', 
      timeout: 7000
  });
  
  $('#testimonials').cycle({ 
      fx:     'fade', 
      timeout: 7000
  });
  
  // jQuery Tools - Tooltips for Actions
  $("a#shop-nav").tooltip({ tipClass: "shop-nav-rollover", delay: 100, opacity: 1, relative: true, offset: [-10, -48], position: "bottom center"});
    
  // Flowplayer
  flowplayer("a.flowplayer", "/js/flowplayer-3.1.5.swf",  {
  	clip: {
  		// these two configuration variables does the trick
  		autoPlay: false,
  		autoBuffering: true // <- do not place a comma here  
  	}
  });

});	 

