$(document).ready(function() {

/* extra classes for older browsers that dont understand css3 */
$(".list-elements-icons li:nth-child(3n)").addClass("remove");
$(".list-elements-arrows li:first-child").addClass("remove");
$(".list-screenshots li:nth-child(4n)").addClass("remove");

$(".list-screenshots a").hover(function(){
	$(this).find(".hover").show();
	}, function(){
		$(this).find(".hover").hide();
});

$("#testimonials ul").each(function(){
									
	$(this).cycle({
	timeout: 6000, 
	speed: 500, 
	cleartype: true,
	cleartypeNoBg: true
				});
	
});
$(".gotop").click(function(){
          $('html, body').animate({ scrollTop: 0 }, 'slow');
})


/* autoclear function for inputs */
$('.autoclear').click(
function() {
if (this.value == this.defaultValue) {
this.value = '';
}
}
);
$('.autoclear').blur(
function() {
if (this.value == '') {
this.value = this.defaultValue;
}
}
);					   

});


$(document).ready(function(){
 $('#tabs div').hide(); // Hide all divs
 $('#tabs div:first').show(); // Show the first div
 $('#tabs ul li:first').addClass('active'); // Set the class of the first link to active
 $('#tabs ul li a').click(function(){ //When any link is clicked
 $('#tabs ul li').removeClass('active'); // Remove active class from all links
 $(this).parent().addClass('active'); //Set clicked link class to active
 var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
 $('#tabs div').hide(); // Hide all divs
 $(currentTab).show(); // Show div with id equal to variable currentTab
 return false;
 });
 });
 
 
function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; } } window.onload = externalLinks;
