hs.graphicsDir = '/templates/default/images/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.dimmingOpacity = 0.75;
// define the restraining box
hs.useBox = true;
hs.width = 640;
hs.height = 480;
// Add the controlbar
hs.addSlideshow({
    //slideshowGroup: 'group1',
    interval: 5000,
    repeat: false,
    useControls: true,
    fixedControls: 'fit',
    overlayOptions: {
        opacity: 1,
        position: 'bottom center',
        hideOnMouseOut: true
    }
});
	
/* Hungarian initialisation for the jQuery UI date picker plugin. */
/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
jQuery(function($){
    /*$.datepicker.regional['hu'] = {
        closeText: 'bezárás',
        prevText: '&laquo;&nbsp;vissza',
        nextText: 'előre&nbsp;&raquo;',
        currentText: 'ma',
        monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
        'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
        monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
        'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
        dayNames: ['Vasárnap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
        dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
        dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
        weekHeader: 'Hé',
        dateFormat: 'yy-mm-dd',
        firstDay: 1,
        isRTL: false,
        showMonthAfterYear: false,
        yearSuffix: ''
    }*/
    });

$(document).ready(function(){

    jQuery("div[id*='submenu']").hide();
    jQuery("a[class*='submenu']").hover(function(e){
        var id = jQuery(this).attr("class");
        alert(id);
    },function(e){
        var id = jQuery(this).attr("class");
        alert(id);
    });
	
    if (jQuery.browser.msie && jQuery.browser.version.substr(0,1)<7) {
        jQuery("body").hide();
        if(confirm("Oldalaink látogatásához fejlettebb böngészőre lesz szüksége.\nKérjük cserélje le és látogasson vissza.\nWeboldalunk nem támogatja az IE6-os böngészőt!")){
            window.location="http://www.google.com/chrome/?hl=hu";
        }else{
            window.location="http://www.mozilla-europe.org/hu/firefox/";
        }
    }

    jQuery(".hide-submenu, #menubox-content").hover(function(){
        jQuery("div[id*='submenu_']").hide();
    })
				
    $("li[class*='submenu_']").hover(
        function(){ 
            var c = jQuery(this).attr("class");
            jQuery("div[id*='submenu_']").hide();
            var tmpc=[];
            tmpc = c.split(" ");
            jQuery("#" + tmpc[0]).show();

                
        //$("#sub" + this.id).show();
        },
        function(){
            var c = jQuery(this).attr("class");
            var tmpc=[];
            tmpc = c.split(" ");
        //$("#" + tmpc[0]).hide();
        }
        );
        
    jQuery('a.poplight[href^=#]').click(function(){
        var popID=$(this).attr('rel');
        var popURL=$(this).attr('href');
        var query=popURL.split('?');
        var dim=query[1].split('&');
        var popWidth=dim[0].split('=')[1];
        jQuery('#'+popID).fadeIn().css({
            'width':Number(popWidth)
            }).prepend('<a href="#" class="close"><img src="templates/default/images/close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>');
        //var popMargTop=($('#'+popID).height()+80)/2;
        var popMargTop=47;
        //console.log(popMargTop);
        var popMargLeft=($('#'+popID).width()+80)/2;
        jQuery('#'+popID).css({
            'margin-top':-popMargTop,
            'margin-left':-popMargLeft
            });
        jQuery('body').append('<div id="fade"></div>');
        jQuery('#fade').css({
            'filter':'alpha(opacity=80)'
        }).fadeIn();
        return false;
    });
    jQuery('a.close, #fade').live('click',function(){
        $('#fade , .popup_block').fadeOut(function(){
            $('#fade, a.close').remove();
        });
        return false;
    });
//    if(pagename=="fooldal"){
//        if(jQuery.cookie('popup_megjelent')!="ok"){
//
//            jQuery(".poplight").click();
//            setTimeout("jQuery('#fade').click()",16000);
//            jQuery.cookie('popup_megjelent',"ok");
//
//        }
//    }
      
      

				
    /*$("#menubox-verticalmenu li").hover(function(){
						$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
						},function(){
						$(this).find('ul:first').css({visibility: "hidden"});
						});*/
				

	
    //$(".date").datepicker($.datepicker.regional['hu']);
    //$.datepicker.setDefaults($.datepicker.regional['hu']);
        
    $('a.email').each(function(){
        e = this.rel.replace('/','@');
        e = e.replace('[at]','@');
        this.href = 'mailto:' + e;
        $(this).text(e);
    });
        
});

//*************************************************
// NAME: deletePicture
// RESP: törli a profilképet
//*************************************************
function deletePicture() {
    var url = 'controllers.php?do=deleteProfileImage' ;
    $("#file").load(url);
    $("#picture").empty();	
    $("#picture").append("<span>-</span>");
    $("#picture-del:visible").hide();
    $(".msg-success").show();
}


