jQuery(document).ready(function($) {
	// jQuery code here

	$(".confirm").live("click", function() {
		return confirm($(this).attr("data-confirm"));
	});
	
	$(".pretty-radio").buttonset();
	
	$(".hidden").removeClass("hidden");
	
	$('#slideshow').fadeSlideShow({
		width: 372,
		height: 250
	});
	
	$('#testimonials p');
	setInterval(function(){
		$('#testimonials p').filter(':visible').fadeOut(2000,function(){
			if($(this).next('p').size()){
				$(this).next().fadeIn(1000);
			}	else{
				$('#testimonials p').eq(0).fadeIn(1000);
			}
		});
	},10000);
	
	var w_width = $(window).width();
	var w_height = $(window).height();
	$("a.popup").popupWindow({
		centerBrowser:1,
		width:Math.min(1280, Math.max(w_width - 50, 1024)),
		height:Math.min(1024, Math.max(w_height - 150, 700)),
		toolbar:0
	});
	
});



window.log = function(){
  log.history = log.history || [];
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};

jQuery.fn.exists = function(){return jQuery(this).length>0;} // Usage: if($(".element").exists()) { /* do something */ }
