// ----------------------------------------
// pop up
// ----------------------------------------
$(document).ready(function () {
    $('.popup').click(function(){
        window.open(this.href, '_blank');
        return false;
    });
});


// ----------------------------------------
// Box Link Hover (Category Top)
// ----------------------------------------
$(function () {
    $('.boxLink').click(function () {
        var boxLink = $(this).find('a');
        if (boxLink.attr('target') == '_blank') {
            window.open(boxLink.attr('href'));
        }
        else window.location = boxLink.attr('href');
        return false;
    });
    $('.boxLink').hover(function () {
        $(this).addClass('boxLink_over');
    }, function () {
        $(this).removeClass('boxLink_over');
    });
});


// ----------------------------------------
// Top Side Lineup
// ----------------------------------------
$(function(){
    var timeout      = 500;
    var closetimer   = 0;
    var ddmenuitem   = 0;
    function jsddm_open(){
        jsddm_canceltimer();
        jsddm_close();
        ddmenuitem=$(this).find('ul').eq(0).css('visibility', 'visible');
            }
            function jsddm_close(){
               if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');
            }
            function jsddm_timer(){
               closetimer=window.setTimeout(jsddm_close, timeout);
            }
            function jsddm_canceltimer(){
               if(closetimer){
                  window.clearTimeout(closetimer);
                  closetimer = null;
               }
            }
            $(function(){
               $('.lineupMenu > li').bind('mouseover', jsddm_open);
               $('.lineupMenu > li').bind('mouseout',  jsddm_timer);
            });
            document.onclick=jsddm_close;
});


// ----------------------------------------
// sub window open
// ----------------------------------------
var sub_page={
    windowCenter:{
    width:680,
    height:700,
    center:1,
    scrollbars:1,
    resizable:0
    }
};
