// JavaScript Document
jQuery(document).ready(function()
{
	var i = 0;
	jQuery('.list-product-box-wrapper img,.content-ads-wrapper img,.right-block-content img,#car-brand-logo img').clone();
	jQuery('.list-product-box-wrapper img,.content-ads-wrapper img,.right-block-content img,#car-brand-logo img').each(function()
	{
	var me = this;
	jQuery(this).hide();
	var j = i;
	setTimeout(function()
	{
	jQuery(me).fadeIn(1000); 
	}, i)
	i += 100
	});

	

	//slideshow
	jQuery(".slide-beauty-first-img").faded({
		speed: 500,
		crossfade: true,
		bigtarget: true,
		sequentialloading: false,
		loadingimg: "loading.gif",
		autoplay: 5000,
		autorestart: 0,
		random: false,
		autopagination:false
	});
	
	
	//slideshow
	jQuery("#slideshow-wrapper").faded({
		speed: 500,
		crossfade: true,
		bigtarget: true,
		sequentialloading: false,
		loadingimg: "loading.gif",
		autoplay: 5000,
		autorestart: 0,
		random: false,
		autopagination:true
	});
	
	//ZOOM
	jQuery(".jqzoom").jqueryzoom({
		xzoom: 500, //zooming div default width(default width value is 200)
		yzoom: 300, //zooming div default width(default height value is 200)
		offset: 10, //zooming div default offset(default offset value is 10)
		position: "right", //zooming div position(default position value is "right")
		preload:1,
		lens:1
	});
	
	/*TAB*/
	//When page loads...
	jQuery(".tab-content").hide(); //Hide all content
	jQuery("ul.more-tech-specs-tabs li:first").addClass("active").show(); //Activate first tab
	jQuery(".tab-content:first").slideDown(); //Show first tab content

	//On Click Event
	jQuery("ul.more-tech-specs-tabs li").click(function() {

		jQuery("ul.more-tech-specs-tabs li").removeClass("active"); //Remove any "active" class
		jQuery(this).addClass("active"); //Add "active" class to selected tab
		jQuery(".tab-content").slideUp(); //Hide all tab content

		var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		jQuery(activeTab).slideDown(); //Fade in the active ID content
		return false;
	});

	/*COLOR*/
//jQuery("a.user-avatar").css("color", 'rgb('+Math.floor(Math.random()*255)+','+Math.floor(Math.random()*255)+','+Math.floor(Math.random()*255)+')');
	
});
