$(document).ready(function() {

    $(function(){
		// Option set as a global variable
		$.fn.loopedSlider.defaults.addPagination = true;
		
		$('#loopedSlider').loopedSlider({
			autoStart: 3500,
			containerClick: false,
			hoverPause: true,
			slidespeed: 1200,
			fadespeed: 500
		});
	}); // Fin LoopedSlider

// /////////////////////



	//for each description div...
	$('div.descriptionImg').each(function(){
		//...set the opacity to 0...
		$(this).css('opacity', 0);
		//..set width same as the image...
		$(this).css('width', $(this).siblings('img').width());
		//...get the parent (the wrapper) and set it's width same as the image width... '
		$(this).parent().css('width', $(this).siblings('img').width());
		//...set the display to block
		$(this).css('display', 'block');
	});

	$('div.box').hover(function(){
		//when mouse hover over the wrapper div
		//get it's children elements with class description '
		//and show it using fadeTo
	 $(this).children('.descriptionImg').stop().fadeTo(500, 0.7);
  },function(){
		//when mouse out of the wrapper div
		//use fadeTo to hide the div
		$(this).children('.descriptionImg').stop().fadeTo(500, 0);
	});
   
// /////////////////////	

$("a[rel^='prettyPhoto']").prettyPhoto({show_title: false, default_width: 800});
// Fin PrettyPhoto

                
$('#masonry').masonry({
  itemSelector: '.box',
});// Fin Masonry

});
