var Site = {};

Site.init = function(){

    $("ul#bubbleMenu li a").bubbleEffect({
        time: 700,
        scale: 1.2,
        transition: "easeOutElastic",
        lockcenter: true
    });

    $("ul#bubbleMenu li a").mouseenter(function(ev){
        /* console.log(ev.currentTarget);
        var bubbleID = $(ev.currentTarget).attr("id");

        $("#felho_" + $("div#felho").data("currentBubbleID")).hide("slow");
        $("div#felho").data("currentBubbleID", bubbleID); */


        var bubbleID = $(ev.currentTarget).attr("id");
        if (bubbleID!='bubbleMenu0kiserletezzvelunk') {
        	$("#felho_bubbleMenu0kiserletezzvelunk").hide();
        }
        $("#felho_" + bubbleID).show();
    });

    $("ul#bubbleMenu li a").mouseleave(function(ev){
        var bubbleID = $(ev.currentTarget).attr("id");
        $("#felho_" + bubbleID).hide();
        $("#felho_bubbleMenu0kiserletezzvelunk").show();        
    });

    $("ul#elosztoMenu li div.background").bubbleEffect({
        time: 700,
        scale: 1.2,
        transition: "easeOutElastic",
        lockcenter: true,
        zIndex: 1000,
        inflationHandler: "contentMouseEnter",
        deflationHandler: "contentMouseLeave"
    });

    $("ul#elosztoMenu li div.content").mouseenter(function(ev){
        $(this).parent().find("div.background").triggerHandler("contentMouseEnter");
    });

    $("ul#elosztoMenu li div.content").mouseleave(function(ev){
        $(this).parent().find("div.background").triggerHandler("contentMouseLeave");
    });

    $("body#fizibuszEloszto ul#elosztoMenu a").bubbleEffect({
        time: 700,
        scale: 1.2,
        transition: "easeOutElastic",
        lockCenter: true
    });

    Cufon.replace("ul#subMenu a", {
        fontFamily: "FrutigerLtCn_PFL",
        separate: "none",
        hover: {
            color: "#ffffff"
        }
    });

    Cufon.replace("div#pContent h2.title", {
        fontFamily: "FrutigerBlkCn_PFL"
    });

    Cufon.replace("ul#elosztoMenu li p.links a", {
        fontFamily: "FrutigerLtCn_PFL",
        separate: "none",
        hover: {
            color: "#ffffff"
        }
    });

    Cufon.replace("div.dwnlSection h2", {
        fontFamily: "FrutigerLtCn_PFL"
    });

    Cufon.replace("body#kornyezetunkBaratai div.section h3", {
        fontFamily: "FrutigerLtCn_PFL"
    });

    Cufon.replace("ol.tippek span.number", {
        fontFamily: "FrutigerLtCn_PFL"
    });

    Cufon.replace(".timeline-page h3, .timeline-page h4", {
        fontFamily: "FrutigerLtCn_PFL"
    });

    Cufon.replace("h3.title", {
        fontFamily: "FrutigerLtCn_PFL"
    });

    Cufon.replace("h4.title", {
        fontFamily: "FrutigerBlkCn_PFL"
    });

    Cufon.replace("div.downloadItem h3", {
        fontFamily: "FrutigerLtCn_PFL"
    });

    Cufon.replace("div#pContent a.btnBack", {
        fontFamily: "FrutigerLtCn_PFL",
        separate : "none",
        hover : {
            color : "#ffffff"
        }
    });

    Cufon.replace("ul.games h3", {
        fontFamily: "FrutigerLtCn_PFL"
    });

    Cufon.replace(".directory .book h2", {
        fontFamily: "FrutigerLtCn_PFL"
    });

    $("div#contEromuAnim a").click(function(ev){
        $("div#contEromuAnim").hide();
        ev.stopPropagation();
        ev.preventDefault();
    });

}

$(document).ready(function(){
    Site.init();
});

