/* Js for , Version=1757102255 */
 v.lang = {"confirmDelete":"\u60a8\u78ba\u5b9a\u8981\u57f7\u884c\u522a\u9664\u64cd\u4f5c\u55ce\uff1f","deleteing":"\u522a\u9664\u4e2d","doing":"\u8655\u7406\u4e2d","loading":"\u52a0\u8f09\u4e2d","updating":"\u66f4\u65b0\u4e2d...","timeout":"\u7db2\u7d61\u8d85\u6642,\u8acb\u91cd\u8a66","errorThrown":"<h4>\u57f7\u884c\u51fa\u932f\uff1a<\/h4>","continueShopping":"\u7e7c\u7e8c\u8cfc\u7269","required":"\u5fc5\u586b","back":"\u8fd4\u56de","continue":"\u7e7c\u7e8c","bindWechatTip":"\u767c\u5e16\u529f\u80fd\u8a2d\u7f6e\u4e86\u7d81\u5b9a\u5fae\u4fe1\u7684\u9650\u5236\uff0c\u8acb\u5148\u7d81\u5b9a\u5fae\u4fe1\u6703\u54e1\u3002","importTip":"\u53ea\u5c0e\u5165\u4e3b\u984c\u7684\u98a8\u683c\u548c\u6a23\u5f0f","fullImportTip":"\u5c07\u6703\u5c0e\u5165\u6e2c\u8a66\u6578\u64da\u4ee5\u53ca\u66ff\u63db\u7ad9\u9ede\u6587\u7ae0\u3001\u7522\u54c1\u7b49\u6578\u64da"};;$(function(){
    
    // width controller
    var full_width = $('#search-hd').width();
    var input_width = full_width - 76;
    
    $('.search-bg').css('width', input_width + 'px');
    $('.search-hovertree-input').css('width', input_width + 'px');
    
    //通用頭部搜索切換
    $('#search-hd .search-hovertree-input').on('input propertychange',function(){
        var val = $(this).val();
        if(val.length > 0){
            $('#search-hd .pholder').hide(0);
        }else{
            var index = $('#search-bd li.selected').index();
            $('#search-hd .pholder').eq(index).show().siblings('.pholder').hide(0);
        }
    });
    
    $('#search-bd li').click(function(){
        var index = $(this).index();
        $('#search-hd .pholder').eq(index).show().siblings('.pholder').hide(0);
        $('#search-hd .search-hover'+'tree-input').eq(index).show().siblings('.search-hovertree-input').hide(0);
        $(this).addClass('selected').siblings().removeClass('selected');
        $('#search-hd .search-hovertree-input').val('');
    });
})

function search(){
    
    var url_array=["http://med.wanfangdata.com.cn/Paper/Search?q=",
                   "http://lczl.med.wanfangdata.com.cn/Home/Search?q=",
                   "http://www.medlibrary.cn/index.php/search-index-"]
                  
                   
    var counter = 0;
    
    for( ; counter< url_array.length; counter++){
        if($($('.search-tag').get(counter)).hasClass('selected')){
           break;
       }
    }
    
    window.location.href = url_array[counter] + $($('.search-hovertree-input').get(counter)).val();
}
;
$().ready(function()
{
    $('#block268').find(".block-tabs").hide();
    $('#block268').find(".block-tabs-nav").find('li').click(function()
    {
        index = $(this).index();
        $('#block268').find(".block-tabs-nav li").removeClass('active');
        $(this).addClass('active');
        $('#block268').find(".block-tabs").hide();
        $('#block268').find(".block-tabs").eq(index).show();

    });
    $('#block268').find(".block-tabs-nav").find('li').first().click();
})
;

var currentBlockID = 236;


if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === 'undefined' && $('#block' + currentBlockID).parent('.col').data('probability') === 'undefined')
{
    var grid = $('#block' + currentBlockID).parents('.blocks').data('grid');
    grid = typeof(grid) == 'undefined' ? 12 : grid;

    $('#block' + currentBlockID).parent('.col').attr('data-grid', grid).attr('class', 'col col-' + grid);
}

$('.articleTitleA').each(function()
{
    $(this).css('max-width', $(this).parents('li').width() - $(this).prev('.category').width() - $(this).next('.sticky').width() - $(this).parent().next('.article-date').width() - 10);
})
$('.articleTitleB').each(function()
{
    $(this).css('max-width', $(this).parent('li').width() - $(this).next('.sticky').width() - 10);
})
;

var currentBlockID = 237;


if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === 'undefined' && $('#block' + currentBlockID).parent('.col').data('probability') === 'undefined')
{
    var grid = $('#block' + currentBlockID).parents('.blocks').data('grid');
    grid = typeof(grid) == 'undefined' ? 12 : grid;

    $('#block' + currentBlockID).parent('.col').attr('data-grid', grid).attr('class', 'col col-' + grid);
}

$('.articleTitleA').each(function()
{
    $(this).css('max-width', $(this).parents('li').width() - $(this).prev('.category').width() - $(this).next('.sticky').width() - $(this).parent().next('.article-date').width() - 10);
})
$('.articleTitleB').each(function()
{
    $(this).css('max-width', $(this).parent('li').width() - $(this).next('.sticky').width() - 10);
})
;

var currentBlockID = 269;


if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === 'undefined' && $('#block' + currentBlockID).parent('.col').data('probability') === 'undefined')
{
    var grid = $('#block' + currentBlockID).parents('.blocks').data('grid');
    grid = typeof(grid) == 'undefined' ? 12 : grid;

    $('#block' + currentBlockID).parent('.col').attr('data-grid', grid).attr('class', 'col col-' + grid);
}

$('.articleTitleA').each(function()
{
    $(this).css('max-width', $(this).parents('li').width() - $(this).prev('.category').width() - $(this).next('.sticky').width() - $(this).parent().next('.article-date').width() - 10);
})
$('.articleTitleB').each(function()
{
    $(this).css('max-width', $(this).parent('li').width() - $(this).next('.sticky').width() - 10);
})
;$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(document).ready(function()
{          
    // add "index" class to the body element.
    $('body').addClass('index');

    $('.nav-system-home:first').addClass('active');
})

