// JavaScript Document


$(document).ready(function(){
		$("img[src*='png']").ifixpng();

		var num_div = $("#rotation div").length;	
		if(num_div <= 1) { 
			$("#slideshow #prev").hide(); 
			$("#slideshow #next").hide(); 
		}
		
		$('#rotation').cycle({ 
				fx:     'fade', //how the slides change. Can also use
				speed:   1500, //how quickly the slides change. In milliseconds
				timeout: 6000, //how long slide is displayed before change. In milliseconds
				next:   '#next', //id for the next button
				prev:   '#prev', //id for the previous button
				pager:  '#rotation_nav', //id for the rotation navigation
				pause:   1 //slides pause when moused over.  change to 0 for no pause
		});
		
		$('img.rounded').each(function (i) {
			var width = $(this).width();
			var height = $(this).height();
			$(this).wrap('<div class="rounded" style="width:'+width+'px; height:'+height+'px;"></div>').removeClass("rounded");
		});	
		
		$('.rounded').corners();		


});
