function applePie() {
return ( navigator.userAgent.match(/(iPhone|iPod|iPad)/i) );
}
$('.fancy-overlay').fancybox({
your: 'settings',
afterShow: function() {
if ( applePie() ) { $('body').css({'position': 'fixed'}); }
},
afterClose: function() {
if ( applePie() ) { $('body').css({'position': ''}); }
}
});