/*
 * Superfish - jQuery menu widget
 *
 * Copyright (c) 2007 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 */

(function($){
	$.fn.superfish = function(o){
		var defaults = {
			hoverClass	: "sfHover",
			delay		: 500,
			animation	: {opacity:"show"},
			speed		: "normal"
		},
			over = function(){
				var $$ = $(this);
				clearTimeout(this.sfTimer);
				if (!$$.is("."+o.hoverClass)) {
					$$.addClass(o.hoverClass)
						.find("ul")
							.animate(o.animation,o.speed)
							.end()
						.siblings()
						.removeClass(o.hoverClass);
				}
			},
			out = function(){
				var $$ = $(this);
				this.sfTimer=setTimeout(function(){
					$$.removeClass(o.hoverClass)
					.find("iframe", this)
						.remove();
				},o.delay);
			};
		o = $.extend(defaults, o || {});
		var sfHovAr=$("li",this)
			.hover(over,out)
			.find("a").each(function() {
				var $a = $(this), $li = $a.parents("li");
				$a.focus(function(){ $li.each(over); })
				  .blur(function(){ $li.each(out); });
			}).end();
		$(window).unload(function() {
			sfHovAr.unbind("mouseover").unbind("mouseout");
		});
		return this;
	};
})(jQuery);

//L10 Counter Script
function track_stats(){
	var success=0; cRef=""; cRefType=""; cPage="";
	var L10qstr,L10pc,L10ref,L10a,L10pg; L10pg=document.URL.toString(); L10ref=document.referrer;
	if(top.document.location==document.referrer || (document.referrer == "" && top.document.location != "")) {L10ref=top.document.referrer;}
	L10qStr = "pg="+escape(L10pg)+"&ref="+escape(L10ref)+"&os="+escape(navigator.userAgent)+"&nn="+escape(navigator.appName)+"&nv="+escape(navigator.appVersion)+"&nl="+escape(navigator.language)+"&sl="+escape(navigator.systemLanguage)+"&sa="+success+"&cR="+escape(cRef)+"&cRT="+escape(cRefType)+"&cPg="+escape(cPage);
	if(navigator.appVersion.substring(0,1) > "3") { L10d = new Date(); L10qStr = L10qStr+"&cd="+screen.colorDepth+"&sx="+screen.width+"&sy="+screen.height+"&tz="+L10d.getTimezoneOffset();}
	<!-- The L10 Hit Counter logo and links must not be removed or altered -->
	if((location.href.substr(0,6)=="https:") || (location.href.substr(0,6)=="HTTPS:")) { L10pc="https"; } else { L10pc="http"; }
	document.write('<a href="http://www.turklemd.com/L10Apps/L10HC_Reporter.html" target="_blank"><img border="0" hspace="0" vspace="0" width="25" height="25" src="'+L10pc+'://www.turklemd.com/L10Apps/L10HC_Counter.php?'+L10qStr+'" alt="LevelTen Hit Counter 3.15" style="display:none;"/></a>');
}