$(document).ready(function() {
$.backstretch($(document.body).attr('data-background-image'), { speed: 500 });
$("#testimonial-list li").each(function() {
$(this).html($(this).html().replace(/
/gi,'
'));
});
$("#section-navigation-wrapper").tabs({
fx: { opacity: 'toggle' },
select: function(event, ui) {
$(ui.tab).blur();
},
show: function(event, ui) {
var maxHeight = 0;
$("#testimonial-list li").each(function() {
var newHeight = $(this).height();
if (newHeight > maxHeight) { maxHeight = newHeight; }
});
$("#testimonial-list").css({ 'height': maxHeight });
$("#testimonial-list ul").cycle(0);
}
});
$(".contact article a, .media article a").each(function() {
$(this).attr('target', '_blank');
})
$("#testimonial-list ul").cycle({
prev: '#prev',
next: '#next',
timeout: 0,
nowrap: true,
cleartype: true,
cleartypeNoBg: true,
after: function(inElement, outElement, options) {
$("#next, #prev").removeClass('disabled');
if ($("#testimonial-list li").length-1 == options.currSlide) { $("#next").addClass('disabled'); }
if (0 == options.currSlide) { $("#prev").addClass('disabled'); }
}
});
});