$(document).ready (function () {

    $(".smooth").flashText ({
    	source: "/swf/proximanova-1.0.1.swf"
    });
    
    SetActiveMenuItem(".menubar .Menu ul li");
    
    //$('#rotate > ul').tabs().tabs('rotate', 10000);
    $('#rotate > ul').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 10000);


});

function SetActiveMenuItem (selector) {

    var url = document.location.pathname.split("/");
    $(selector).each(function(val) {
    	$(this).children("a[href='/"+url[1]+"/']").addClass("active");
    	
    })


}

function openPopup( url, name, width, height, scroll, resize ) {
    if ( width < 1 ) { width = 600; }
    if ( height < 1 ) { height = 700; }
    if ( scroll == 1 ) { scrollbar = 'yes'; } else { scrollbar = 'no'; }
    if ( resize == 1 ) { resizable = 'no'; } else { resizable = 'no'; }
    
    w=window.open( url, name, 'width='+width+',height='+height+',directories=no,location=no,menubar=no,scrollbars='+scrollbar+',status=yes,resizable='+resizable+',toolbar=no,top=50,left=50' );
    w.focus();

}

function PrintPage () {

    PrintWindow = window.open ("", "mywindow1","directories=1,fullscreen=1,location=1,menubar=1,resizable=1,scrollbars=1,status=1,titlebar=1,width=800,height=600");
    PrintWindow.document.write ($('#rightbar').html ());
    PrintWindow.document.write ('<p style="clear:both">Az oldal az alábbi linken érhető el: '+window.location.href+'</p>');

}

function delDefault(e,o){
	if ( o.firstTime ) {
			return
	}
	o.firstTime=true;
	o.value="";
}

