jQuery(document).ready(function($) {

  // Open links in new window
  $("a[rel=external]").attr('target', '_blank');

  // Tool tip to open cart display
  $("a#basket-contents-reveal").tooltip({
    // tweak the position
    offset: [10, 2],
    tip: '#ajax-mini-basket',
    // use the "slide" effect
    effect: 'slide'
    // add dynamic plugin with optional configuration for bottom edge
  }).dynamic({
    bottom: {
      direction: 'down',
      bounce: true
    }
  });

			$('#slides').slides({
				preload: true,
				preloadImage: '<?php echo $this->getSkinUrl();?>images/loading.gif',
				play: 5000,
				pause: 2500,
				hoverPause: true
			});

$("a.iframe").fancybox({
	'autoDimensions'	: false,
	'width': 1037,
	'height': 400
});

//$('#worldpay-label').replaceWith('<img src="http://www.chestofdrawers.co.uk/images/checkout/payment_logos.jpg" width="450px" />');
//$("label:contains('Credit Card (Worldpay) ')").replaceWith('<img src="http://www.chestofdrawers.co.uk/images/checkout/payment_logos.jpg" width="450px" />');







});


/*
// default effect variables for ToolTip
effect: 'toggle',
fadeOutSpeed: "fast",
predelay: 0,
delay: 30,
opacity: 1,
tip: 0,
// 'top', 'bottom', 'right', 'left', 'center'
position: ['top', 'center'],
offset: [0, 0],
relative: false,
cancelDefault: true,
// type to event mapping
events: {
  def: 			"mouseenter,mouseleave",
  input: 		"focus,blur",
  widget:		"focus mouseenter,blur mouseleave",
  tooltip:		"mouseenter,mouseleave"
},
layout: '<div/>',
tipClass: 'tooltip',
*/
