/*
 *  default - JavaScript
 *  
 *  Default Javascript Setup
 *
 * iGEN AkaZora Web Application Engine
 * (C) 2009 iGEN Knowledge Solutions, Inc., Dennis Lo Designs, and this site.
 * Unless otherwise copyrighted, licensed, or protected.
 * @author Derek Nobuyuki信幸 Wallace, iGEN Knowledge Solutions, Inc. http://www.igen.ca
 * @author Dennis Lo, Dennis Lo Designs http://www.dennislo.com
 */
 jQuery.fn.makeExpandBox = function(clickableTitle, contentDiv, contentInnerDiv, options){
  var defaults = {
     fadeTime: 1000,
     slideTime: 1000,
     onOpen: null,
     onClose: null
  };
  var opts = jQuery.extend({}, $.fn.makeExpandBox.defaults, options);
  return jQuery(this).each(function(){
    var TheBox = $(this);
    TheBox.find("."+clickableTitle).click(function(){
          if(TheBox.find(contentInnerDiv).css("opacity")==1){
               TheBox.find(contentInnerDiv).fadeTo(opts.fadeTime,0.001, function(){
                  if(options.onClose!=null){
		    TheBox.find(contentDiv).slideUp(opts.slideTime, opts.onClose(this));
		  }else{
                    TheBox.find(contentDiv).slideUp(opts.slideTime);
                  }
               });
          }else{
               TheBox.find(contentDiv).slideDown(opts.slideTime, function(){
                  if(options.onOpen!=null){
		    TheBox.find(contentInnerDiv).fadeTo(opts.fadeTime,1, opts.onOpen(this));
		  }else{
                    TheBox.find(contentInnerDiv).fadeTo(opts.fadeTime,1);
                  }
               });
          }
  });
  });
}
$.fn.scroller = function() {
	var speed = 'slow'; // Choose default speed
	$(this).each(function() {
		$(this).bind('click', function() {
			var target = $(this).attr('href'); // Get scroll target
			$(target).scrollTo(speed);
			return false;
		});
	});
}
jQuery(document).ready(function(){
	
	$(".moveup").click(function(){$.scrollTo('0px',500, {axis:'y'});return false;});
	//$(".LocalLink").scroller();
	$("#Menu li a").blend();
	//$("#LoginLink").blend();
	
	
	eval($(".LoadScript").html());
});
