$(document).ready(function(){

if($('.home-takeover').length){
	
	var windowH = $(window).height(), // detect window height
		calloutH = $('#call-out').height() + 30,
		calloutMarginTop = (windowH - calloutH) / 2;
	
	
	$('#take-over').css('height', windowH); // make overlay full screen
	
	$('#call-out').css('margin-top', calloutMarginTop);
	
	$('#close-btn').click(function(){ // hide the overlay
		$('#take-over').hide();
	});
	
} else {
	$('#take-over').hide();
}

var verticalCenter = {
    init:function() {
       
           
            var paragraphs = $('div.feature-title p');
            var slidesHeight = $('div.feature-title').height();
           
            $(paragraphs).each(function(){

                var pHeight = $(this).height();
                var marginCalc = (slidesHeight - pHeight) / 2;
               
                $(this).css({'height': pHeight, 'margin-top' : marginCalc})
               
            });
       
           
    }
}
verticalCenter.init();
	
	if($('.home-slider').length){
		$('.home-slider').cycle({ 
			fx:     'fade', 
			speed:  '500',
			pager:  '#home-slider-nav', 
			pagerAnchorBuilder: function(idx, slide) { 
				// return selector string for existing anchor 
				return '#home-slider-nav li:eq(' + idx + ') a.home-slider-thumb'; 
			} 
		});
	}
	
});

// window.onload = function() {
//     var settings = {
//       tl: { radius: 15 },
//       tr: { radius: 15 },
//       bl: { radius: 15 },
//       br: { radius: 15 },
//       antiAlias: true
//     }
// 
//     curvyCorners(settings, '.rounded, .activeSlide');
// }
