$(document).ready(function() {

	/* Accessible input values */
	  $("input.propagate").each(function(){
	      var $this = $(this);
	      var val = $('label[for=' + $this.attr('id') + ']').html();
	      if($this.val() == '') $this.val(val);
	      $this.focus(function(){
	          if($this.val() == val) $this.val('');
	      }).blur(function(){
	          if($this.val() == '') $this.val(val);
	      });
	  });
	
	/* Bookmark this site */
	// add a "rel" attrib if Opera 7+
	if(window.opera) {
		if ($("a.jqbookmark").attr("rel") != ""){
			$("a.jqbookmark").attr("rel","sidebar");
		} 
	}

	$("a.jqbookmark").click(function(event){
		event.preventDefault();
		var url = this.href;
		var title = this.title;

		if (window.sidebar) { // Mozilla Firefox Bookmark
			window.sidebar.addPanel(title, url,"");
		} else if( window.external ) { // IE Favorite
			window.external.AddFavorite( url, title);
		} else if(window.opera) { // Opera 7+
			return false; // do nothing
		} else { 
			 alert('Unfortunately, this browser does not support the requested action,'
			 + ' please bookmark this page manually.');
		}

	});
	
		// fullsize backgorund
	$(function(){
		$.fn.supersized.options = {  
			startwidth: 640,  
			startheight: 480,
			vertical_center: 1,
			slideshow: 0,
			navigation: 1,
			transition: 1, // 0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
			pause_hover: 0,
			slide_counter: 1,
			slide_captions: 1,
			slide_interval: 3000  
		};
    $('#supersize').supersized(); 
  });


});
