
jQuery(document).ready(function() {
 jQuery('#carousel').jcarousel({
  // Configuration goes here
 });
 
 $("#carousel").jcarousel({

initCallback: jcarousel_initCallback,
buttonNextHTML: null,
buttonPrevHTML: null

});
});


tb_pathToImage = "includes/jQuery/jcarousel/images/loading-thickbox.gif";
function jcarousel_initCallback(carousel)
{
$('.micontenido').fadeIn('slow');
jQuery('.jcarousel-control a').bind('click', function() {
carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
return false;
});
jQuery('#carousel-next').bind('click', function() {
carousel.next();
return false;
});
jQuery('#carousel-prev').bind('click', function() {
carousel.prev();
return false;
});
};
function carousel_itemVisibleInCallbackAfterAnimation(carousel, item, idx, state) {
};


$(document).ready(function() {
						   
$("div#warrantybox a").fancybox(
		{'frameWidth': 620, //frameWidth = Default width for iframed and inline content  
		'frameHeight': 420, //frameHeight = Default height for iframed and inline content  
		'hideOnContentClick': false //frameHeight = Default height for iframed and inline content  
								}
								); 

						   
$('.liTA img').click(function(){
$('.fancybox').fancybox();
$media = $(this);
if($media.hasClass('video'))
{	
		$("div#videoclose a").fancybox(
		{  
		'frameWidth': 420, //frameWidth = Default width for iframed and inline content  
		'frameHeight': 320, //frameHeight = Default height for iframed and inline content  
		'callbackOnClose': function clearIframe()
					{
						$("div#videoclose a").fancybox(
		{ 'callbackOnClose':null });
						window.location.reload();
					}
		}
		);
}
else
{
$media.parent().trigger('click');
}
});
$('#imgCurrent img').click(function(){
$('.liTA img[src$=' + $(this).attr('src') + ']').trigger('click');
});
sliderImages = window.setInterval(slideImage, 5000);
});
var sliderImages = 0;
var currentImg = 1;
function slideImage()
{
totImg = $('.liTA').length;
if(totImg == 1)
{
window.clearInterval(sliderImages);
return;
}
var $imgCurrent = $('img', '#imgCurrent');
$imgCurrent.fadeOut('fast', function(){
var imgSrc = $('img', $('.liTA').eq(currentImg) ).attr('src');
$imgCurrent.attr('src', imgSrc).fadeIn('slow');
currentImg++;
});
if(currentImg == totImg)
currentImg = 0;
}
function initTabs()
{
}