var vtabs;
$(document).ready(function() {
    vtabs = $("#tabs").tabs({selected : '2'});

    vtabs.bind('tabsselect', function(event, ui) {
     document.location=(ui.tab.hash);
    });

    if(document.location.hash!='') {
      //get the index
      indexToLoad = document.location.hash.substr(1,document.location.hash.length);
	  $("#tabs").tabs('option','selected',indexToLoad);
    }

    $("#infodiv").corner();
    $("#infodivf").corner();

    $("a.lightbox").each(function(){
      $(this).lightBox();
    });

     $('.judgecomment[tooltip]').each(function(){
        $(this).qtip({
           content: {
             text : $(this).attr('tooltip'),
             title : $(this).attr('tooltiptitle')
             }, // Use the tooltip attribute of the element for the content
           style: {
              width: 200,
              padding: 5,
              background: '#E4F6FA',
              color: 'black',
              textAlign: 'center',
              border: {
                 width: 1,
                 radius: 3,
                 color: '#BFBDBD'
              },
              tip: 'topLeft',
              name: 'dark' // Inherit the rest of the attributes from the preset dark style
           }
        });
     });

});