Shadowbox.init({
    // skip the automatic setup again, we do this later manually
    //skipSetup: true
     overlayOpacity: 0.8
     //overlayColor: "#718700"
});

/*Shadowbox für iOS optimieren*/
/* http://www.richardet-design.com/wp/design/webdesign/shadowbox-und-andere-lightboxen-fur-iphone-und-ipad-fixen/ */

function checkiPhone() {
var iPhone=((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)));
return iPhone;
}

function checkiPad() {
var iPad=navigator.userAgent.match(/iPad/i);
return iPad;
}

function fixiDevSB() {
if (iPhone || iPad) {
jQuery('#content a').click(function(e) {
var relTag=jQuery(this).attr('rel');
if ((/shadowbox/gi.test(relTag)) || (/lightbox/gi.test(relTag))) {
var wScroll=jQuery(window).scrollTop();
var wScrollCSS=wScroll+'px';
var cssObj = {
        "top": wScrollCSS,
        "height": "2000px"
      }
jQuery('#sb-container').css(cssObj);
}
});
}
return;
}

jQuery(function() {
iPhone=checkiPhone();
iPad=checkiPad();
fixiDevSB();
});

jQuery(document).ready(function(){
	// alle externen Links im .container in neuem Fenster aufmachen
       $("#content a[href^='http:']:not([href*='" + window.location.host + "'])").attr("target", "_blank");

});
	   

