labelizor = {
  init : function()
  {
    var qSearchInput = document.getElementById("qstr");
    var labels = document.getElementsByTagName("label");
    
    for(var i = 0; i < labels.length; i++)
    {
      if(labels[i].htmlFor == qSearchInput.id)
      {
        labelTxt = labels[i].innerHTML;
        qSearchInput.value = labelTxt;
      
        qSearchInput.onfocus = function()
        {
          if(qSearchInput.value == labelTxt)
          {
            qSearchInput.value = "";
          }
        }
        
        qSearchInput.onblur = function()
        {
          if(qSearchInput.value == "")
          {
            qSearchInput.value = labelTxt;
          }
        }
      }
    }
  }
};


if(window.labelizor) {
  labelizor.init();
}

$('.article').find('a.img_large')
	.each(function() {
	}).imgPopper({
		curtainColor : '#ffffff',
		curtainOpacity : '0.75',
		yOffset: 150
	});

function facebook_share(facebookurl) { 
	window.open(facebookurl,'sharerwindow','status=1,toolbar=0,location=0,menubar=0,height=350,width=500');
}

function question_comments_change_display() {
	// Shown
	if ($('.comments_def_show').css('display') == 'inline-block') {
		$('.comments_def_show').css('display', 'none');
		$('.comments_def_hide').css('display', 'inline-block');
	}

	else {
		$('.comments_def_show').css('display', 'inline-block');
		$('.comments_def_hide').css('display', 'none');
		
	}

	return false;
}


