function init() {
    // quit if this function has already been called
    if (arguments.callee.done) return;

    // flag this function so we don't do the same thing twice
    arguments.callee.done = true;

    // kill the timer
    if (_timer) clearInterval(_timer);

    // do stuff
	if(!NiftyCheck())
	    return;
	Rounded("td#ob","top","#FFFFFF","transparent","smmall");
	Rounded("td#r_l","top","#E0EAEC","transparent","smooth");
	Rounded("td#l_r","top","#E0EAEC","transparent","smooth");
	Rounded("div#logi","all","#E0EAEC","transparent","smooth");
	Rounded("div#round","all","#FFFFFF","transparent","smooth");
	if (typeof(setcur) == 'function') {
		setcur();
	}
	

};

/* for Mozilla/Opera9 */
if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", init, false);
}



/* for Safari */
if (/WebKit/i.test(navigator.userAgent)) { // sniff
    var _timer = setInterval(function() {
        if (/loaded|complete/.test(document.readyState)) {
            init(); // call the onload handler
        }
    }, 10);
}

/* for other browsers */
window.onload = init;
$(document).ready(function() {
	$("a#box").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'padding'		:   0,
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'autoDimensions':   true
	});
	$("a.gallery-conkret").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'padding'		:   0,
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'autoDimensions':   true,
		'cyclic'        :   true
	});
	$("#iframe").fancybox({
		'width'				: 383,
		'height'			: 725,
		'padding'		    :   0,
        'autoScale'     	: false,
        'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'type'				: 'iframe'
	});
});
