$(document).ready(function() {
   $('#head a[tooltip]').each(function() {
      $(this).qtip({
		content: $(this).attr('tooltip'), 
		position: {
			corner: {
				tooltip:'topRight',
				target:'bottomMiddle'
			}
		},
		style: {
			width: 300,
			padding: 8,
			background: '#fff',
			color: '#000',
			textAlign: 'center',
			border: {
			 width: 1,
			 radius: 5,
			 color: '#EDEDED'
			},
			tip: true
		}
      });
   });
});
function addHighSlideAttribute() {
  var isIE = (document.documentElement.getAttribute('style') ==
              document.documentElement.style);
  var anchors = document.getElementById('content').getElementsByTagName('a');
  for (var i = 0, len = anchors.length; i < len; i++) {
    var anchor = anchors[i];
    if (anchor.getAttribute('href') && anchor.getAttribute('href').match(/jpg$|JPG$|jpeg$|JPEG$|gif$|GIF$|png$|PNG$/)) {
        anchor.className = 'highslide';
      if (!anchors[i].getAttribute('onclick')) {
        isIE ? anchors[i].setAttribute('onclick', new Function('return hs.expand(this)')) :
               anchors[i].setAttribute('onclick','return hs.expand(this)');
        isIE ? anchors[i].setAttribute('onkeypress', new Function('return hs.expand(this)')) :
               anchors[i].setAttribute('onkeypress','return hs.expand(this)');
      }
    }
  }
}
