$(document).ready(function() {
//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).show(); //Fade in the active content
		return false;

	});
	
	$("#featurelinks li a").click(function() {
		$("#featurelinks li a").removeClass("activeSlide"); //Remove any "active" class
		$(this).addClass("activeSlide"); //Add "active" class to selected tab
		return false;

	});
	
	$('#featurelist').cycle({ 
    fx: 'scrollLeft',
	speedIn:  700, 
    speedOut: 700,
	timeout: 7000000000000000,
	pager:  '#featurelinks', 
	
	
	pagerAnchorBuilder: function(idx, slide) {
		//var thisreltag = $(this).attr( 'rel' );
			if(idx == 0){
					var title = 'Adjustable Seat Height';
			}
			if(idx == 1){
					var title = 'Adjustable Handlebar';
			}
			if(idx == 2){
					var title = 'Head & Seat Angle Design';
			}
			if(idx == 3){
					var title = 'No Pedals. No training wheels';
			}
			if(idx == 4){
					var title = 'Foot pegs';
			}
			if(idx == 5){
					var title = 'Lightweight and strong';
			}
			if(idx == 6){
					var title = 'Handlebar Steering Limit';
			}
			if(idx == 7){
					var title = 'Easy to Use, Child-sized Hand Brake';
			}
			if(idx == 8){
					var title = 'Convenient Kick Stand';
			}
			if(idx == 9){
					var title = 'Maintenance-free Tires';
			}
			if(idx == 10){
					var title = 'Certified, Lead-Free Metallic Paint';
			}
        return '<li><a href="#">' + title + '</a></li>'; 
    }
});

	$('#homeslider').cycle({
	fx: 'fade',
	speed:   1000,
    delay: -2000,
	timeout: 10000
	});
});
