(function($){

$(document).ready(function() {
	$('.slide-caption').css({
		'text-shadow' : '2px 2px 3px #333'
	});
	$('.btn-submit').css({
		'text-shadow' : '0 0 2px #333'
	});
	
	$('.blink').focus(function() {
		if( $(this).val() == $(this).attr('title') ) {
			$(this).val('');
		}
		$(this).css({
			'color' : '#333'
		});
	});
	$('.blink').blur(function() {
		if( $(this).val() == '' ) {
			$(this).val( $(this).attr('title') );
		}
		$(this).css({
			'color' : '#ccc'
		})
	});
	
	$('.socials ul li a img').hover(function() {
		$(this).parent().parent().animate({
			paddingLeft: '11px'
		}, 70);
		$(this).animate({
			width: '45px',
			height: '45px'
		}, 70);
		$(this).css({
			'-webkit-transform' : 'rotate(-10deg)',
			'-moz-transform' : 'rotate(-10deg)',
			'-webkit-transition' : '-webkit-transform 70ms linear'
		});
	}, function() {
		$(this).parent().parent().animate({
			paddingLeft: '16px'
		}, 70);
		$(this).animate({
			width: '40px',
			height: '40px'
		}, 70);
		$(this).css({
			'-webkit-transform' : 'rotate(0deg)',
			'-moz-transform' : 'rotate(0deg)',
			'-webkit-transition' : '-webkit-transform 70ms linear'
		});
	});
	
	$('#navigation li').hover(function() {
		$(this).find('.dd').slideDown('fast');
		
	}, function() {
		$(this).find('.dd').slideUp('fast');
		
	});
	
	function mycarousel_initCallback(carousel) {
		$('.slider-controls a').bind('click', function() {
			
			
			carousel.scroll($.jcarousel.intval($(this).attr('title')));
			return false;
		});
	}
	function mycarousel_itemFirstInCallback(carousel, item, idx, state) {
		$('.slider-controls a').removeClass('active');
		$('.slider-controls a').eq(idx-1).addClass('active');
	}
	
	$('.carousel').jcarousel({
		auto: 4,
		scroll: 1,
		wrap: "both",
		initCallback: mycarousel_initCallback,
		itemFirstInCallback: mycarousel_itemFirstInCallback,
		buttonNextHTML: null,
		buttonPrevHTML: null
	});
	
	$('.box-testimonials li').hover(function() {
		$(this).find('.right').css({
			'color' : '#b20000'
		});
		$(this).find('.left').css({
			'-webkit-transform' : 'rotate(-10deg)',
			'-moz-transform' : 'rotate(-10deg)',
			'-webkit-transition' : '-webkit-transform 70ms linear'
		});
	}, function() {
		$(this).find('.right').css({
			'color' : '#1b1919'
		});
		$(this).find('.left').css({
			'-webkit-transform' : 'rotate(0deg)',
			'-moz-transform' : 'rotate(0deg)',
			'-webkit-transition' : '-webkit-transform 70ms linear'
		});
	});
	
	$('.box-cats').tabs();
});

})(jQuery)
