// JavaScript Document
// www.anthonymattox.com
// wp theme am v9

var $j = jQuery.noConflict();

$j(document).ready(setup);

function setup() {
	$j('.unlink').click(function() {
		return false;
	});
	$j('.show').show();
	$j('.imgwrap').each(function(){
		var cap = $j(this).find('.caption');
		cap.show().animate({bottom: '-20px', opacity: '0'}, 0);
		cap.wrapInner('<div class="captionText"></div>').prepend('<div class="captionBg"></div>');
		$j(this).hover(
			function() {
				cap.stop().animate({
					bottom: '0',
					opacity: '1'
				}, 250);
			},
			function() {
				cap.stop().animate({
					bottom: '-20px',
					opacity: '0'
				}, 250);
			}
		);
	});
	
	$j('input.search').each(function() {
		if ($j(this).val()=='search' || $j(this).val()=='') {
			$j(this).addClass('default').val('search');
		}
		$j(this).focus(function() {
			if ($j(this).val()=='search') {
				$j(this).val('').removeClass('default');
			}
		});
		$j(this).blur(function() {
			if ($j(this).val()=='') {
				$j(this).addClass('default').val('search');
			}
		});
	});
	
	/*
	var thumbs=$j('#thumbScroll').find('.thumbGroup').each(function() {
	});
	
	$j(this).everyTime(1000, function(i) {
		$j('#thumbScroll').animate({opacity:0},500);
		$j('#thumbScroll').animate({opacity:1},500);
	}, 2);
	*/
}