
//Load when the page is ready - Using jQuery to run events
$(document).ready(function(){
	$("#admincenter_button").click(function(event) {
			$('#admincenter').toggle();
		});
	$('label.tooltip').ToolTip({ 
        className: 'ttip',
        delay: 2, 
        position: 'mouse'
      });
  $('span.tooltip').ToolTip({ 
        className: 'ttip',
        delay: 2, 
        position: 'mouse'
      });
   $('div.tooltip').ToolTip({ 
        className: 'ttip',
        delay: 2, 
        position: 'mouse'
      });
   $('input.tooltip').ToolTip({ 
        className: 'ttip',
        delay: 2, 
        position: 'bottom'
      }); 
    $('img.tooltip').ToolTip({ 
    		className: 'ttip',
        delay: 2, 
        position: 'mouse'
      });   
      
	$(".toggleBtn").toggle(function(){
						 if(document.getElementById(this.rel).style.display == "block"){
						 	$("#" + this.rel).slideUp(500); 
						 	this.innerHTML = "+";
						 	return
						 	};
					 	this.innerHTML = "-";
				    $("#" + this.rel).slideDown(500);
				  },function(){
						if(document.getElementById(this.rel).style.display == "none"){
							$("#" + this.rel).slideDown(500);
							this.innerHTML = "-";
							return
						};
						this.innerHTML = "+";
				    $("#" + this.rel).slideUp(500);
  			});
  
  
  $('div.faq> div.news_text').hide(); 
  $('div.faq> div.news_header > div.news_header_title').click(function() {
          $(this).parent().next('div.news_text:hidden').slideDown('fast')
          .siblings('div.news_text:visible').slideUp('fast');
        });  
	$('span.link').click(function() {
				  var element = $(this).attr("rel") + '_content';
				  var vis = document.getElementById(element).style.display;
				  $('div.hidden > div:visible').hide();
				  if(vis == '' || vis == 'none')  $('#' + element).show();
   			});
});