$(document).ready(
  function()
  {
    
    if ("function" == typeof secondary_load) 
    {
      secondary_load();
    } 
    $('div.cloud a.plus').hover(
      function()
      {
        $(this).parent().addClass('highlightplus');
      },
      function()
      {
        $(this).parent().removeClass('highlightplus');
      }
    )
    $('div.cloud a.minus').hover(
      function()
      {
        $(this).parent().addClass('highlightminus');
      },
      function()
      {
        $(this).parent().removeClass('highlightminus');
      }
    )
  }
);


function populate_element(selector, defvalue) 
{
  if($.trim($(selector).val()) == "") 
  {
    $(selector).val(defvalue);
  }

  $(selector).focus(function() 
    {
      if($(selector).val() == defvalue) 
      {
        $(selector).val("");
      }
    }
  );
  
  $(selector).blur(function() 
    {
      if($.trim($(selector).val()) == "") 
      {
        $(selector).val(defvalue);
      }
    }
  );
}










var saycount=0;
function say(text) 
{
  if(typeof(console) == 'object' && typeof(console.log) == 'function')
  {
    console.log(text); 
  }
  else
  {
    if(document.getElementById('say'))
    {
      saycount++;
      $('#say').prepend('<div>'+saycount+'. '+text+'</div>');
    }
    else
    {
      alert(text);
    }
  }
}
      
$(
  function()
  {
    $.Lightbox.construct(
    {
		  files: 
		  {
		  	// If you are doing a repack with packer (http://dean.edwards.name/packer/) then append ".packed" onto the js and css files before you pack it.
		  	js: 
		  	{
				  lightbox:	'/template/szeghy/javascripts/jquery.lightbox.js',
			  	colorBlend:	'/template/szeghy/javascripts/jquery.color.js'
			  },
			  css: 
			  {
				  lightbox:	'/template/szeghy/css/jquery.lightbox.css'
			  },
			  images: 
			  {
				  prev:		'/template/szeghy/simages/prev.gif',
				  next:		'/template/szeghy/simages/next.gif',
				  blank:		'/template/szeghy/simages/blank.gif',
				  loading:	'/template/szeghy/simages/loading.gif'
			  }
		  },
		  text: 
		  {
			  // For translating
			  image:		'Image',
			  of:			'of',
			  close:		'Close X',
			  closeInfo:	'You can also click anywhere outside the image to close.',
			  download:	'Direct link to download the image.',
			  help: 
			  {
				  close:		'',
				  interact:	''
			  },
			  about: 
			  {
				  text: 	'',
				  title:	'',
				  link:	''
			  }
		  }
    });
  }
);


