jQuery(document).ready(function(){
		jQuery('#anySlider')
		.anythingSlider({
			width               : 630,
			height              : 490,
			toggleArrows        : true,
			autoPlay            : true,
			delay               : 5000,
			autoPlayLocked      : false,
			hashTags            : false,
			resizeContents      : false
		})
		.anythingSliderFx({
			'.fade': [ 'fade' ],
			'.caption-left'   : [ 'caption-Left', '130px', '1000', 'easeInOutCirc' ],
			'.caption-right'  : [ 'caption-Right', '130px', '1000', 'easeInOutCirc' ],
			'.caption-bottom' : [ 'caption-Bottom', '50px' ]
			})
		
			.find('div[class*=caption]')
				.css({ position: 'absolute' })
				.prepend('<span class="close">x</span>')
				.find('.close').click(function(){
					var cap = $(this).parent(),
						ani = { bottom : -550 }; // bottom
					if (cap.is('.caption-top')) { ani = { top: -550 }; }
					if (cap.is('.caption-left')) { ani = { left: -550 }; }
					if (cap.is('.caption-right')) { ani = { right: -550 }; }
					cap.animate(ani, 400, function(){ cap.hide(); } );
				});
});


jQuery(document).ready(function(){
	jQuery( "#anySlider").find('.vimeoInsert').each(function(){
		var currentid = $(this).attr("id");
		jQuery('span.arrow').click(function(){
			player=$f(document.getElementById(currentid));
			player.api('pause');
		});

	});

});


jQuery(document).ready(function(){					
	colorBoxes();
});

function colorBoxes(){
	jQuery('.colorBox_container').hover(function()
 		{  
     		jQuery(this).find(".box").stop().animate({marginLeft:0, marginTop:0},200);
	 		jQuery(this).find(".box_shine").stop();
     		jQuery(this).find(".box_shine").css("background-position","-340px 0"); 
     		jQuery(this).find(".box_shine").animate({backgroundPosition: '320px 0'},700);

 		}, function(){
    		jQuery(this).find(".box").stop().animate({marginLeft:0, marginTop:0},200);
 		});
		jQuery.fn.setAllToMaxHeight = function(){
			return this.height( Math.max.apply(this, jQuery.map( this , function(e){ return jQuery(e).height() }) ) );
		}
		jQuery('div.box').setAllToMaxHeight()
		jQuery('div.adjust').setAllToMaxHeight()
}
