function createGallery()
{
    var obj = $('.iconGaleriImg');
    
    if (obj.length > 0)
    {
        obj.lightBox();
    }
}

function hideAction()
{
   $("div#market_inner").hide();
}

function initNewsYear()
{
   if ($("div#market_bg").length > 0)
   {
       $('.pngFix').pngfix();
       var max = Math.max($(document).height(),$(window).height(),document.documentElement.clientHeight, document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight);
       var maxHeight = max + "px";
       $("#market_inner").css("height", maxHeight);
       $("#market_bg").css("height", maxHeight);
       $("div#market_bg").css("opacity", 0);
       $("div#market_bg").animate({ opacity: "0.6" }, 1500, showContent);
   }
}

function initNewsYearFancy()
{
    if ($("#h_pf2012").attr('value') == 1) {
        $.fancybox({
            'transitionIn'  : 'elastic',
            'transitionOut' : 'fade',
            'titleShow'     : false,
            'width'         : 282,
            'height'        : 600,
            'content'       : '<img src="'+MVC_BASE_PATH+'style/img/cis-pf-2012.jpg" width="282" height="600" />',
            'onComplete'    : function(){ 
                /*
                $.fancybox.resize();
                */
                $.fancybox.center();
            }
        });     
    }
}


function showContent()
{
   $("div#market_content").show();
   $("div#close").show();
}

$(document).ready(function(){
    createGallery();
    $('li').pngfix();
    //initNewsYear();
    //initNewsYearFancy();
});

