jQuery(window).load(function(){
	/* Bordes redondeados */
	function cornerCaller($selector, $tl, $tr, $bl, $br) {
		if ($selector != '') {
			$($selector).corner({
				tl: { radius: $tl }, tr: { radius: $tr }, bl: { radius: $bl }, br: { radius: $br }, antiAlias: true
			});
		}
	}
	
	cornerCaller("#navbar ul", 5, 5, 0, 0);
	cornerCaller(".more-link", 5, 5, 5, 5);
	cornerCaller(".wp-pagenavi", 0, 0, 5, 5);
	cornerCaller(".featured-navigation", 0, 0, 5, 5);
	cornerCaller("button, a.button, input, textarea", 6, 6, 6, 6);
	cornerCaller("#footer .holder, .widget-recent-tweet", 8, 8, 8, 8);

	/*Links en bloque en el sidebar*/
	$(".widget-recent-post ul li, .widget_categoryposts ul li").click(function(){
		window.location=$(this).find("a").attr("href"); return false;
	});
	$('.widget-recent-post ul li, .widget_categoryposts ul li').mouseenter(function(e) {
		$(this).children('a').animate({color: '#0099ff'}, 400);
	}).mouseleave(function(e) {
		$(this).children('a').animate({color: '#ffffff'}, 400);
	});
	
	/*Hover Zoom*/
	// Source: http://mattbango.com/notebook/web-development/hover-zoom-effect-with-jquery-and-css/
	$('.project-thumb span').css("display", "none");
	$('.project-thumb').mouseenter(function(e) {
		$(this).children('a').children('img').animate({ width: '380', height: '300', left: '-40', top: '-40'}, 100);
		$(this).children('a').children('span').fadeIn(200);
	}).mouseleave(function(e) {
		$(this).children('a').children('img').animate({ width: '320', height: '240', left: '-20', top: '-20'}, 100);
		$(this).children('a').children('span').fadeOut(200);
	});
	
	/*Menu items animation*/
	$('#navbar li a').mouseenter(function(e) {
		$(this).animate({borderBottomColor: '#0099ff'}, 400);
	}).mouseleave(function(e) {
		$(this).animate({borderBottomColor: '#141C1F'}, 400);
	});
	
	/*Pagination items animation*/
	$('.wp-pagenavi a').mouseenter(function(e) {
		$(this).animate({borderTopColor: '#0099ff'}, 400);
	}).mouseleave(function(e) {
		$(this).animate({borderTopColor: '#171C1F'}, 400);
	});	
	
	/*Pagination items animation*/
	$('input[type="submit"], input[type="reset"]').mouseenter(function(e) {
		$(this).animate({borderTopColor: '#0099ff', borderRightColor: '#0099ff', borderBottomColor: '#0099ff', borderLeftColor: '#0099ff'}, 400);
	}).focus(function(e) {
		$(this).animate({borderTopColor: '#0099ff', borderRightColor: '#0099ff', borderBottomColor: '#0099ff', borderLeftColor: '#0099ff'}, 400);
	}).mouseleave(function(e) {
		$(this).animate({borderTopColor: '#171C1F', borderRightColor: '#171C1F', borderBottomColor: '#171C1F', borderLeftColor: '#171C1F'}, 400);
	}).blur(function(e) {
		$(this).animate({borderTopColor: '#171C1F', borderRightColor: '#171C1F', borderBottomColor: '#171C1F', borderLeftColor: '#171C1F'}, 400);
	}).click(function(e) {
		$(this).animate({borderTopColor: '#263A44', borderRightColor: '#263A44', borderBottomColor: '#263A44', borderLeftColor: '#263A44'}, 400);
	});
	
	// Equal height for content-columns
	$(".content-column-1, .content-column-2").equalHeights();
	
	// jQery.bannerscroller
	$(".slidetabs").tabs("#featured-projects > div", {
		// enable "cross-fading" effect
		effect: 'fade',
		fadeOutSpeed: 300,
		fadeInSpeed: 900,
		// start from the beginning after the last tab
		rotate: true
	// use the slideshow plugin. It accepts its own configuration
	}).slideshow({
		autoplay: true,
		interval: "6000",
		clickable: false
	});
	//$(".slidetabs").data("slideshow").play();

});
