$(document).ready(function ()
{
    var target = $('.blockover_area');
    if (!target.length) {
        return;
    }
    var items = target.find('.blockover_item');
    $(items).click(function ()
    {
        var target = $(this).find('a:first').attr('target');
        if (target == '_blank') {
            window.open($(this).find('a:first').attr('href'))
        }
        else
        {
            var link = $(this).find('a:first').attr('href');
            var hash = link.match('^#');
            if (hash) {}
            else {
                location.href = $(this).find('a:first').attr('href')
            }
        }
        return false;
    });
    items.hover(function ()
    {
        $(this).find('.img_over').each(function ()
        {
            $(this).attr('src', $(this).attr('src').replace('_blockoff', '_blockon'))
        });
        $(this).find('a').each(function ()
        {
            $(this).css('text-decoration', 'none')
        });
        $(this).find('.item_info_back').each(function ()
        {
            $(this).css(
            {
                'background-image' : 'url("common/img/common/over_back.jpg")', 'background-position' : 'center top',
                'background-repeat' : 'repeat'
            })
        });
        $(this).find('.item_img').each(function ()
        {
            $(this).css(
            {
                'opacity' : '0.8'
            })
        });
        $(this).find('span').each(function ()
        {
            $(this).css('text-decoration', 'none')
        })
    },
    function ()
    {
        $(this).find('.img_over').each(function ()
        {
            $(this).attr('src', $(this).attr('src').replace('_blockon', '_blockoff'))
        });
        $(this).find('a').each(function ()
        {
            $(this).css('text-decoration', 'none')
        });
        $(this).find('.item_info_back').each(function ()
        {
            $(this).css('background-image', 'none')
        });
        $(this).find('span').each(function ()
        {
            $(this).css('text-decoration', 'none')
        })
        $(this).find('.item_img').each(function ()
        {
            $(this).css(
            {
                'opacity' : '1'
            })
        });
    })
});
