/** 
 * Abgerundete Ecken
 */
Element.implement({
    curvedCorners : function(px,ie) {
        var $ie = ie || 3;
        var $px = px || 0;
        var $br = $px + 'px';
        this.setStyle('-khtml-border-radius', $br );
        this.setStyle('-webkit-border-radius', $br );
        this.setStyle('-moz-border-radius', $br );
        this.setStyle('-o-border-radius', $br );
        if( Browser.Engine.name === 'trident' && Browser.Engine.version > $ie ) { // IE6 = 4; IE7 = 5; IE8 = 6
            curvyCorners({
                tl: { radius: $px },
                tr: { radius: $px },
                bl: { radius: $px },
                br: { radius: $px },
                antiAlias: true
            }, this);
        }
        return this;
    }
});
/** 
 * Box Schatten
 */
Element.implement({
    CssBoxShadow : function( css ) {
    var $shadow = css || '0px 0px 0px 0px transparent';
    this.setStyle('-khtml-box-shadow', $shadow );
    this.setStyle('-webkit-box-shaodw', $shadow );
    this.setStyle('-moz-box-shadow', $shadow );
    this.setStyle('-o-box-shadow', $shadow );
    this.setStyle('box-shadow', $shadow );
    if( Browser.Engine.name === 'trident') { // IE6 = 4; IE7 = 5; IE8 = 6
    
    }
    return this;
}

});
/**
 * Externe Links
 * <a href="externe_seite.html" class="extern">Externer Link</a>
 */
$$('a[class~=extern]').each( function( link ) {
    link.set('target','_blank');    
});
// Gerundete Ecken in Kopfnavigation
/*
document.id('kopfzeile').curvedCorners([5,5,0,0],4);
$$('div#kopfzeile ul.hauptnavigation a').each( function( link ) {
    link.curvedCorners(5,4);
});
*/
/**
 * Zoombilder
 */
ReMooz.assign('.remooz', {
    'origin': 'img',
    //'shadow': 'onOpenEnd', // fx is faster because shadow appears after resize animation
    'shadow': 'onOpen', // fx is faster because shadow appears after resize animation
    'resizeFactor': 0.8, // resize to maximum 80% of screen size
    'cutOut': false, // don't hide the original
    'opacityResize': 0.4, // opaque resize
    'dragging': true, // disable dragging
    'centered': true // resize to center of the screen, not relative to the source element
});
