// Font Replacement
Cufon.replace('.category-title h1,.footer h4, .product-view .product-shop .product-name h1,.page-title h1, .page-title h2,.wired-home .subscribe strong', {
	hover: true
});

jQuery(document).ready(function() {
	// Featured Products
    jQuery('#featured').jcarousel();
	// FancyBox jQuery
	jQuery("a.group").fancybox({ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true }); 	
	// Slider Homepage
	jQuery('#slider').cycle({
        fx: 'fade',
        speed: 2000,
		timeout: 5000,
        pager: '#controls',
		slideExpr: '.panel'
    });
	//Lightbox image zoom cuando dblclick
	jQuery('#image').dblclick(function(){
		lightBoxLaunch(jQuery('#image').attr('src'),jQuery('#image').attr('title'));
	});
});

//Función para la carga de imágenes en la capa de zoom
function loadpic(src)
{
	jQuery('#image').attr('src',src);
}

function lightBoxLaunch(src,title) {
	// reset first!
		myFlashLightBoxInjector.reset();		
		myFlashLightBoxInjector.appendElement(src, title, '#image'+'_'+0, '#image');
	// updateImageList
		myFlashLightBoxInjector.updateImageList();
	// Launch Lightbox
		myFlashLightBoxInjector.start('#image' + '_' + 0);
}
