var myQuotes = [];
myQuotes[0] = '<a href="/help/support.html"><img src="/images/help_anim1.gif"></a>';
myQuotes[1] = '<a href="/join/"><img src="/images/help_anim2.gif"></a>';
myQuotes[2] = '<a href="/cashier/"><img src="/images/help_anim3.gif"></a>';

stateDropdown = '<select name="STATE" id="stateDrop"><option value="AL">Alabama</option><option value="AK">Alaska</option><option value="AZ">Arizona</option><option value="AR">Arkansas</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DE">Delaware</option><option value="DC">District of Columbia</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="IA">Iowa</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="ME">Maine</option><option value="MD">Maryland</option><option value="MA">Massachusetts</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MS">Mississippi</option><option value="MO">Missouri</option><option value="MT">Montana</option><option value="NE">Nebraska</option><option value="NV">Nevada</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NY">New York</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VT">Vermont</option><option value="VA">Virginia</option><option value="WA">Washington</option><option value="WV">West Virginia</option><option value="WI">Wisconsin</option><option value="WY">Wyoming</option></select>';

function externalLinks() {
	if (!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors.length; i++) {
			var anchor = anchors[i];

		if ((anchor.getAttribute("rel")!=null)||(anchor.getAttribute("rel"))){
			if (anchor.getAttribute("href") && anchor.getAttribute("rel").indexOf("external") != -1)
			anchor.target = "_blank";
		}
	}
}

function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes, status=yes'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function popupSports() 
{ 
	windowname = "SportsWindow42"; 
	
	var popupHandle
    var thisDoc
	
	popupHandle=window.open("/livesports/index.php", windowname, "width=1024,height=700,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");
	return true; 
}

function loginSports(myform) 
{ 
	if (! window.focus)return true; 
	var d = new Date(); 
	
	if ($(myform).valid()) {

		windowname = "SportsWindow42"; 
		
		var popupHandle
		var thisDoc
		
		//setCookie("loginname", document.getElementById("Username").value, 365);
		
		popupHandle=window.open("/livesports/loading.html", windowname, "width=1024,height=700,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no");
		
		myform.target=windowname; 
		myform.focus();
		myform.action="https://sportsbook.gamingsys.net/www.gambling.net/cgi_bin/sb23login.cgi";
		return true; 
		
	} else {
		
		return false; 
		
	}
	
}

function checkCountry() {
	lastLookupWasSuccess = false;
	if(document.joinform.COUNTRY.value == 'United States') {
		removeBox();
		addDrop();
	} else {
		removeDrop();
		addBox();
	}
}

function removeBox() {
	if(document.joinform.stateBox) {
		document.joinform.stateBox.style.display = 'none';
		document.joinform.stateBox.value = '';
		document.joinform.stateBox.name = 'oldstatefield';
	}
}

function addBox() {
	if(document.joinform.stateBox) {
		document.joinform.stateBox.style.display = 'inline';
		document.joinform.stateBox.name = 'STATE';
	}
}

function removeDrop() {
	if(document.joinform.stateDrop) {
		document.joinform.stateDrop.style.display = 'none';
		document.joinform.stateDrop.value = 'AL';
		document.joinform.stateDrop.name = 'oldstatefield';
	}
}

function addDrop() {
	if(document.joinform.stateDrop) {
		document.joinform.stateDrop.style.display = 'inline';
		document.joinform.stateDrop.name = 'STATE';
	}
}

jQuery.fn.popupwindow = function(p)
{

	var profiles = p || {};

	return this.each(function(index){
		var settings, parameters, mysettings, b, a;
		
		// for overrideing the default settings
		mysettings = (jQuery(this).attr("rel") || "").split(",");

		
		settings = {
			height:720, // sets the height in pixels of the window.
			width:940, // sets the width in pixels of the window.
			toolbar:0, // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.
			scrollbars:0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.
			status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.
			resizable:1, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
			left:0, // left position when the window appears.
			top:0, // top position when the window appears.
			center:1, // should we center the window? {1 (YES) or 0 (NO)}. overrides top and left
			createnew:1, // should we create a new window for each occurance {1 (YES) or 0 (NO)}.
			location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
			menubar:0 // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
		};

		// if mysettings length is 1 and not a value pair then assume it is a profile declaration
		// and see if the profile settings exists

		if(mysettings.length == 1 && mysettings[0].split(":").length == 1)
		{
			a = mysettings[0];
			// see if a profile has been defined
			if(typeof profiles[a] != "undefined")
			{
				settings = jQuery.extend(settings, profiles[a]);
			}
		}
		else
		{
			// overrides the settings with parameter passed in using the rel tag.
			for(var i=0; i < mysettings.length; i++)
			{
				b = mysettings[i].split(":");
				if(typeof settings[b[0]] != "undefined" && b.length == 2)
				{
					settings[b[0]] = b[1];
				}
			}
		}

		// center the window
		if (settings.center == 1)
		{
			settings.top = (screen.height-(settings.height + 110))/2;
			settings.left = (screen.width-settings.width)/2;
		}
		
		parameters = "location=" + settings.location + ",menubar=" + settings.menubar + ",height=" + settings.height + ",width=" + settings.width + ",toolbar=" + settings.toolbar + ",scrollbars=" + settings.scrollbars  + ",status=" + settings.status + ",resizable=" + settings.resizable + ",left=" + settings.left  + ",screenX=" + settings.left + ",top=" + settings.top  + ",screenY=" + settings.top;
		
		jQuery(this).bind("click", function(){
			var name = settings.createnew ? "PopUpWindow" + index : "PopUpWindow";
			window.open(this.href, name, parameters).focus();
			return false;
		});
	});

};

jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
    phone_number = phone_number.replace(/\s+/g, ""); 
	return this.optional(element) || phone_number.length > 9 &&
		phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, "Please specify a valid phone number");


/**
 * jquery.scrollable 1.0.2. Put your HTML scroll.
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/scrollable.html
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 *
 * Launch  : March 2008
 * Version : 1.0.2 - Tue Feb 24 2009 10:52:06 GMT-0000 (GMT+00:00)
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3($){3 1d(a,c,d,e){6 b=a[c];7($.16(b)){1X{4 b.10(d,e)}1G(14){7(a.1e){1e("2c 25 A."+c+": "+14)}L{20 14;}4 Q}}4 B}6 u=C;3 1o(l,r){6 o=8;7(!u){u=o}6 j=!r.1z;6 q=$(r.1a,l);6 s=0;6 h=l.S(r.17).y(0);6 n=l.S(r.R).y(0);6 m=l.S(r.H).y(0);6 t=l.S(r.P).y(0);6 k=l.S(r.O).y(0);$.1r(o,{1P:3(){4[1,0,1]},1L:3(){4 s},1J:3(){4 r},x:3(){4 o.D().9()},1l:3(){4 M.15(8.x()/r.9)},Z:3(){4 M.15(s/r.9)},1C:3(){4 l},1A:3(){4 q},D:3(){4 q.T()},K:3(i,a,f){a=a||r.1c;7($.16(a)){f=a;a=r.1c}7(i<0){i=0}7(i>o.x()-r.9){4 o}6 e=o.D().y(i);7(!e.1b){4 o}7(1d(r,"1w",o,i)===Q){4 o}7(j){6 b=-(e.28(B)*i);q.1x({24:b},a,r.19,f?3(){f.10(o)}:C)}L{6 c=-(e.23(B)*i);q.1x({22:c},a,r.19,f?3(){f.10(o)}:C)}7(h.1b){6 g=r.w;6 d=M.15(i/r.9);d=M.21(d,h.T().1b-1);h.T().G(g).y(d).v(g)}7(i===0){n.X(t).v(r.E)}L{n.X(t).G(r.E)}7(i>=o.x()-r.9){m.X(k).v(r.E)}L{m.X(k).G(r.E)}u=o;s=i;1d(r,"1v",o,i);4 o},F:3(b,c,d){6 a=s+b;7(r.1u&&a>(o.x()-r.9)){a=0}4 8.K(a,c,d)},H:3(a,b){4 8.F(1,a,b)},R:3(a,b){4 8.F(-1,a,b)},1Z:3(a,b,c){4 8.F(r.9*a,b,c)},N:3(b,a,d){6 e=r.9;6 f=e*b;6 c=f+e>=8.x();7(c){f=8.x()-r.9}4 8.K(f,a,d)},P:3(a,b){4 8.N(8.Z()-1,a,b)},O:3(a,b){4 8.N(8.Z()+1,a,b)},1W:3(a,b){4 8.K(0,a,b)},1V:3(a,b){4 8.K(8.x()-r.9,a,b)},1U:3(){4 13()},z:3(f,c,e){6 d=o.D().y(f);6 g=r.w;7(!d.1T(g)&&(f>=0||f<8.x())){o.D().G(g);d.v(g);6 a=M.1S(r.9/2);6 b=f-a;7(b>o.x()-r.9){b--}7(b!==f){4 8.K(b,c,e)}}4 o}});7($.16($.1R.1s)){l.12("1s.A",3(e,a){6 b=$.1Q.1O?1:-1;o.F(a>0?b:-b,1N);4 Q})}n.v(r.E).z(3(){o.R()});m.z(3(){o.H()});k.z(3(){o.O()});t.v(r.E).z(3(){o.P()});7(r.1q){$(1M).1K("1n.A").12("1n.A",3(a){6 b=u;7(!b){4}7(j&&(a.J==1m||a.J==1I)){b.F(a.J==1m?-1:1);4 a.11()}7(!j&&(a.J==1p||a.J==1H)){b.F(a.J==1p?-1:1);4 a.11()}4 B})}3 13(){h.U(3(){6 b=$(8);7(b.1F(":1k")||b.I("1j")==o){b.1k();b.I("1j",o);1E(6 i=0;i<o.1l();i++){6 c=$("<"+r.1i+"/>").W("V",i).z(3(e){6 a=$(8);a.1D().T().G(r.w);a.v(r.w);o.N(a.W("V"));4 e.11()});7(i===0){c.v(r.w)}b.1B(c)}}L{6 d=b.T();d.U(3(i){6 a=$(8);a.W("V",i);7(i===0){a.v(r.w)}a.z(3(){b.1Y("."+r.w).G(r.w);a.v(r.w);o.N(a.W("V"))})})}});7(r.1h){o.D().U(3(a,b){6 c=$(8);7(!c.I("1t")){c.12("z.A",3(){o.z(a)});c.I("1t",B)}})}7(r.Y){o.D().1g(3(){$(8).v(r.Y)},3(){$(8).G(r.Y)})}4 o}13();6 p=C;3 1f(){p=2h(3(){o.H()},r.18)}7(r.18>0){l.1g(3(){2g(p)},3(){1f()});1f()}}1y.2e.A=3(d){6 c=8.y(2d d==\'2b\'?d:0).I("A");7(c){4 c}6 b={9:5,1z:Q,1h:B,1u:Q,18:0,1c:2a,1q:B,w:\'29\',E:\'27\',Y:C,19:\'2f\',1a:\'.1a\',R:\'.R\',H:\'.H\',P:\'.P\',O:\'.O\',17:\'.17\',1i:\'a\',1w:C,1v:C,1e:B};$.1r(b,d);8.U(3(){6 a=26 1o($(8),b);$(8).I("A",a)});4 8}})(1y);',62,142,'|||function|return||var|if|this|size||||||||||||||||||||||addClass|activeClass|getSize|eq|click|scrollable|true|null|getItems|disabledClass|move|removeClass|next|data|keyCode|seekTo|else|Math|setPage|nextPage|prevPage|false|prev|siblings|children|each|href|attr|add|hoverClass|getPageIndex|call|preventDefault|bind|load|error|ceil|isFunction|navi|interval|easing|items|length|speed|fireEvent|alert|setTimer|hover|clickable|naviItem|me|empty|getPageAmount|37|keypress|Scrollable|38|keyboard|extend|mousewheel|set|loop|onSeek|onBeforeSeek|animate|jQuery|vertical|getItemWrap|append|getRoot|parent|for|is|catch|40|39|getConf|unbind|getIndex|window|50|opera|getVersion|browser|fn|floor|hasClass|reload|end|begin|try|find|movePage|throw|min|top|outerHeight|left|calling|new|disabled|outerWidth|active|400|number|Error|typeof|prototype|swing|clearInterval|setInterval'.split('|'),0,{}))

/*
 * Thickbox 3.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
      
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 1V="/3q/3d.1u";$(o).3p(9(){1r(\'a.19, 2M.19, 2I.19\');1n=1G 1F();1n.O=1V});9 1r(b){$(b).q(9(){6 t=R.S||R.1w||L;6 a=R.z||R.1P;6 g=R.1M||P;1a(t,a,g);R.3o();H P})}9 1a(d,f,g){3j{3(2n o.u.J.2e==="2b"){$("u","13").s({D:"21%",v:"21%"});$("13").s("1X","2V");3(o.2i("1C")===L){$("u").r("<11 5=\'1C\'></11><4 5=\'C\'></4><4 5=\'8\'></4>");$("#C").q(G)}}n{3(o.2i("C")===L){$("u").r("<4 5=\'C\'></4><4 5=\'8\'></4>");$("#C").q(G)}}3(1L()){$("#C").1K("2C")}n{$("#C").1K("2B")}3(d===L){d=""}$("u").r("<4 5=\'I\'><2A O=\'"+1n.O+"\' /></4>");$(\'#I\').3n();6 h;3(f.N("?")!==-1){h=f.3k(0,f.N("?"))}n{h=f}6 i=/\\.2r$|\\.2p$|\\.2o$|\\.1u$|\\.2m$/;6 j=h.1B().2j(i);3(j==\'.2r\'||j==\'.2p\'||j==\'.2o\'||j==\'.1u\'||j==\'.2m\'){1I="";1z="";14="";1q="";1o="";T="";1x="";1s=P;3(g){F=$("a[@1M="+g+"]").38();23(A=0;((A<F.1b)&&(T===""));A++){6 k=F[A].z.1B().2j(i);3(!(F[A].z==f)){3(1s){1q=F[A].S;1o=F[A].z;T="<1e 5=\'1Y\'>&1h;&1h;<a z=\'#\'>2W &2U;</a></1e>"}n{1I=F[A].S;1z=F[A].z;14="<1e 5=\'22\'>&1h;&1h;<a z=\'#\'>&2R; 2O</a></1e>"}}n{1s=1g;1x="1F "+(A+1)+" 2N "+(F.1b)}}}Y=1G 1F();Y.1d=9(){Y.1d=L;6 a=1Q();6 x=a[0]-1O;6 y=a[1]-1O;6 b=Y.v;6 c=Y.D;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}Q=b+30;12=c+2H;$("#8").r("<a z=\'\' 5=\'1N\' S=\'1p\'><2A 5=\'2G\' O=\'"+f+"\' v=\'"+b+"\' D=\'"+c+"\' 1P=\'"+d+"\'/></a>"+"<4 5=\'2F\'>"+d+"<4 5=\'2E\'>"+1x+14+T+"</4></4><4 5=\'2D\'><a z=\'#\' 5=\'W\' S=\'1p\'>1m</a> 1v 1l 1k</4>");$("#W").q(G);3(!(14==="")){9 15(){3($(o).M("q",15)){$(o).M("q",15)}$("#8").B();$("u").r("<4 5=\'8\'></4>");1a(1I,1z,g);H P}$("#22").q(15)}3(!(T==="")){9 1H(){$("#8").B();$("u").r("<4 5=\'8\'></4>");1a(1q,1o,g);H P}$("#1Y").q(1H)}o.1i=9(e){3(e==L){K=2z.2y}n{K=e.2w}3(K==27){G()}n 3(K==3m){3(!(T=="")){o.1i="";1H()}}n 3(K==3l){3(!(14=="")){o.1i="";15()}}};18();$("#I").B();$("#1N").q(G);$("#8").s({U:"V"})};Y.O=f}n{6 l=f.2u(/^[^\\?]+\\??/,\'\');6 m=2s(l);Q=(m[\'v\']*1)+30||3i;12=(m[\'D\']*1)+2q||3h;3(!g==P){1D=g.1f(\' \');Q=(1D[0]*1)+30;12=(1D[1]*1)+2q}X=Q-30;Z=12-3g;3(f.N(\'2l\')!=-1){1J=f.1f(\'3f\');$("#16").B();3(m[\'1E\']!="1g"){$("#8").r("<4 5=\'2x\'><4 5=\'1A\'>"+d+"</4><4 5=\'2h\'><a z=\'#\' 5=\'W\' S=\'1p\'>1m</a> 1v 1l 1k</4></4><11 2g=\'0\' 2f=\'0\' O=\'"+1J[0]+"\' 5=\'16\' 1w=\'16"+1c.2d(1c.1j()*2c)+"\' 1d=\'1y()\' J=\'v:"+(X+29)+"p;D:"+(Z+17)+"p;\' > </11>")}n{$("#C").M();$("#8").r("<11 2g=\'0\' 2f=\'0\' O=\'"+1J[0]+"\' 5=\'16\' 1w=\'16"+1c.2d(1c.1j()*2c)+"\' 1d=\'1y()\' J=\'v:"+(X+29)+"p;D:"+(Z+17)+"p;\'> </11>")}}n{3($("#8").s("U")!="V"){3(m[\'1E\']!="1g"){$("#8").r("<4 5=\'2x\'><4 5=\'1A\'>"+d+"</4><4 5=\'2h\'><a z=\'#\' 5=\'W\'>1m</a> 1v 1l 1k</4></4><4 5=\'E\' J=\'v:"+X+"p;D:"+Z+"p\'></4>")}n{$("#C").M();$("#8").r("<4 5=\'E\' 3c=\'3b\' J=\'v:"+X+"p;D:"+Z+"p;\'></4>")}}n{$("#E")[0].J.v=X+"p";$("#E")[0].J.D=Z+"p";$("#E")[0].3a=0;$("#1A").13(d)}}$("#W").q(G);3(f.N(\'39\')!=-1){$("#E").r($(\'#\'+m[\'28\']).26());$("#8").25(9(){$(\'#\'+m[\'28\']).r($("#E").26())});18();$("#I").B();$("#8").s({U:"V"})}n 3(f.N(\'2l\')!=-1){18();3($.1t.37){$("#I").B();$("#8").s({U:"V"})}}n{$("#E").36(f+="&1j="+(1G 35().34()),9(){18();$("#I").B();1r("#E a.19");$("#8").s({U:"V"})})}}3(!m[\'1E\']){o.20=9(e){3(e==L){K=2z.2y}n{K=e.2w}3(K==27){G()}}}}33(e){}}9 1y(){$("#I").B();$("#8").s({U:"V"})}9 G(){$("#32").M("q");$("#W").M("q");$("#8").31("2Z",9(){$(\'#8,#C,#1C\').2Y("25").M().B()});$("#I").B();3(2n o.u.J.2e=="2b"){$("u","13").s({D:"1Z",v:"1Z"});$("13").s("1X","")}o.1i="";o.20="";H P}9 18(){$("#8").s({2X:\'-\'+1W((Q/2),10)+\'p\',v:Q+\'p\'});3(!(24.1t.2T&&24.1t.2S<7)){$("#8").s({2Q:\'-\'+1W((12/2),10)+\'p\'})}}9 2s(a){6 b={};3(!a){H b}6 c=a.1f(/[;&]/);23(6 i=0;i<c.1b;i++){6 d=c[i].1f(\'=\');3(!d||d.1b!=2){2P}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2u(/\\+/g,\' \');b[e]=f}H b}9 1Q(){6 a=o.3e;6 w=2t.1U||2k.1U||(a&&a.1T)||o.u.1T;6 h=2t.1S||2k.1S||(a&&a.1R)||o.u.1R;2v=[w,h];H 2v}9 1L(){6 a=2L.2K.1B();3(a.N(\'2J\')!=-1&&a.N(\'3r\')!=-1){H 1g}}',62,214,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|click|append|css||body|width||||href|TB_Counter|remove|TB_overlay|height|TB_ajaxContent|TB_TempArray|tb_remove|return|TB_load|style|keycode|null|unbind|indexOf|src|false|TB_WIDTH|this|title|TB_NextHTML|display|block|TB_closeWindowButton|ajaxContentW|imgPreloader|ajaxContentH||iframe|TB_HEIGHT|html|TB_PrevHTML|goPrev|TB_iframeContent||tb_position|thickbox|tb_show|length|Math|onload|span|split|true|nbsp|onkeydown|random|Key|Esc|close|imgLoader|TB_NextURL|Close|TB_NextCaption|tb_init|TB_FoundURL|browser|gif|or|name|TB_imageCount|tb_showIframe|TB_PrevURL|TB_ajaxWindowTitle|toLowerCase|TB_HideSelect|intUnits|modal|Image|new|goNext|TB_PrevCaption|urlNoQuery|addClass|tb_detectMacXFF|rel|TB_ImageOff|150|alt|tb_getPageSize|clientHeight|innerHeight|clientWidth|innerWidth|tb_pathToImage|parseInt|overflow|TB_next|auto|onkeyup|100|TB_prev|for|jQuery|unload|children||inlineId||unescape|undefined|1000|round|maxHeight|hspace|frameborder|TB_closeAjaxWindow|getElementById|match|self|TB_iframe|bmp|typeof|png|jpeg|40|jpg|tb_parseQuery|window|replace|arrayPageSize|which|TB_title|keyCode|event|img|TB_overlayBG|TB_overlayMacFFBGHack|TB_closeWindow|TB_secondLine|TB_caption|TB_Image|60|input|mac|userAgent|navigator|area|of|Prev|continue|marginTop|lt|version|msie|gt|hidden|Next|marginLeft|trigger|fast||fadeOut|TB_imageOff|catch|getTime|Date|load|safari|get|TB_inline|scrollTop|TB_modal|class|loadingAnimation|documentElement|TB_|45|440|630|try|substr|188|190|show|blur|ready|images|firefox'.split('|'),0,{}))

var quoteCounter = 0;
var totalQuotes=myQuotes.length; 

function setNext() {
	
	if (quoteCounter>=totalQuotes) {
		quoteCounter=0;
	}
    $('#contactquotes').html(myQuotes[quoteCounter]).fadeIn(1000).fadeTo(5000, 1).fadeOut(1000, setNext);
    quoteCounter++;
	
}

PEPS = {};

PEPS.rollover =
{
   init: function()
   {
      this.preload();
     
      $(".ro").hover(
         function () { $(this).attr( 'src', PEPS.rollover.newimage($(this).attr('src')) ); },
         function () { $(this).attr( 'src', PEPS.rollover.oldimage($(this).attr('src')) ); }
      );
   },

   preload: function()
   {
      $(window).bind('load', function() {
         $('.ro').each( function( key, elm ) { $('<img>').attr( 'src', PEPS.rollover.newimage( $(this).attr('src') ) ); });
      });
   },
   
   newimage: function( src )
   {
      return src.substring( 0, src.search(/(\.[a-z]+)$/) ) + '_o' + src.match(/(\.[a-z]+)$/)[0];
   },

   oldimage: function( src )
   {
      return src.replace(/_o\./, '.');
   }
};

function checkuser() {

	$('#checkusername').hide();
	$('#checkingusername').fadeIn(100);
	
	var userid = $("#USERID");
	$.get("/fetch.php?key=" + (Math.floor(Math.random()*999999999999)) + "", { name: userid.val() },
	  function(data){
		//alert("Data Loaded: " + data);
		$('#checkusername').fadeIn(100);
		$('#checkusername').html(data);
		$('#checkingusername').hide();
	  });	
}


function fillUsername(name) {
	var userid = $("#USERID");
	userid.val(name);
	//checkuser();
	$('#checkusername').fadeOut(100);
}

function initMenu() {
  $('#menu ul').hide();
  //$('#menu ul:first').show();
  $('#menu li a').click(
    function() {
      var checkElement = $(this).next();
	  
	  $('#menu li a').removeClass('menuselected');
	  $(this).addClass('menuselected');
	  
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
		$('#casinopopup_menu ul#menu ul:visible').hide();        
		$('#menu ul:visible').slideUp('fast');
        checkElement.slideDown('slow');	
        return false;
        }
      }
    );
  }
  
(function($) {

$.extend({
	metadata : {
		defaults : {
			type: 'class',
			name: 'metadata',
			cre: /({.*})/,
			single: 'metadata'
		},
		setType: function( type, name ){
			this.defaults.type = type;
			this.defaults.name = name;
		},
		get: function( elem, opts ){
			var settings = $.extend({},this.defaults,opts);
			// check for empty string in single property
			if ( !settings.single.length ) settings.single = 'metadata';
			
			var data = $.data(elem, settings.single);
			// returned cached data if it already exists
			if ( data ) return data;
			
			data = "{}";
			
			if ( settings.type == "class" ) {
				var m = settings.cre.exec( elem.className );
				if ( m )
					data = m[1];
			} else if ( settings.type == "elem" ) {
				if( !elem.getElementsByTagName )
					return undefined;
				var e = elem.getElementsByTagName(settings.name);
				if ( e.length )
					data = $.trim(e[0].innerHTML);
			} else if ( elem.getAttribute != undefined ) {
				var attr = elem.getAttribute( settings.name );
				if ( attr )
					data = attr;
			}
			
			if ( data.indexOf( '{' ) <0 )
			data = "{" + data + "}";
			
			data = eval("(" + data + ")");
			
			$.data( elem, settings.single, data );
			return data;
		}
	}
});

$.fn.metadata = function( opts ){
	return $.metadata.get( this[0], opts );
};

})(jQuery);  

jQuery.fn.mailme = function() {
    var at = / at /;
    var dot = / dot /g;
    this.each( function() {
        var addr = jQuery(this).text().replace(at,"@").replace(dot,".");
        var title = jQuery(this).attr('title')
        $(this)
            .after('<a href="mailto:'+addr+'" title="'+title+'">'+ addr +'</a>')
            .remove();
    });
};

/*
 * 
 * TableSorter 2.0 - Client-side table sorting with ease!
 * Version 2.0.3
 * @requires jQuery v1.2.3
 * 
 * Copyright (c) 2007 Christian Bach
 * Examples and docs at: http://tablesorter.com
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * 
 */

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.i({3:{7:{8:\'j\',9:\'3\',k:/({.*})/,4:\'3\'},t:6(a,b){g.7.8=a;g.7.9=b},l:6(a,b){5 c=$.i({},g.7,b);2(!c.4.n)c.4=\'3\';5 d=$.o(a,c.4);2(d)h d;d="{}";2(c.8=="j"){5 m=c.k.u(a.v);2(m)d=m[1]}p 2(c.8=="w"){2(!a.q)h r;5 e=a.q(c.9);2(e.n)d=$.x(e[0].y)}p 2(a.s!=r){5 f=a.s(c.9);2(f)d=f}2(d.z(\'{\')<0)d="{"+d+"}";d=A("("+d+")");$.o(a,c.4,d);h d}}});$.B.3=6(a){h $.3.l(g[0],a)}})(C);',39,39,'||if|metadata|single|var|function|defaults|type|name|||||||this|return|extend|class|cre|get||length|data|else|getElementsByTagName|undefined|getAttribute|setType|exec|className|elem|trim|innerHTML|indexOf|eval|fn|jQuery'.split('|'),0,{}))

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7($){$.1w({D:C 7(){6 k=[],12=[];q.1M={1N:"2G",1O:"2H",1P:"2I",1Q:"2J",1R:"2K",1x:18,2L:18,1i:"1S",19:{},12:[],1a:{14:["1T","1U"]},J:{},1V:E,1W:V,F:[],1j:[],1b:"1X",1Y:\'.\',G:E};7 W(s,d){1c(s+","+(C S().15()-d.15())+"2M")}q.W=W;7 1c(s){w(1k 1y!="1Z"&&1k 1y.G!="1Z"){1y.1c(s)}K{2N(s)}}7 1z(a,b){w(a.8.G){6 c=""}6 d=a.H[0].L;w(a.H[0].L[0]){6 e=[],X=d[0].X,l=X.x;y(6 i=0;i<l;i++){6 p=E;w($.M&&($(b[i]).M()&&$(b[i]).M().16)){p=1A($(b[i]).M().16)}K w((a.8.J[i]&&a.8.J[i].16)){p=1A(a.8.J[i].16)}w(!p){p=20(a,X[i])}w(a.8.G){c+="1l:"+i+" 2O:"+p.B+"\\n"}e.N(p)}}w(a.8.G){1c(c)}u e};7 20(a,b){6 l=k.x;y(6 i=1;i<l;i++){w(k[i].O($.1d(1B(a.8,b)),a,b)){u k[i]}}u k[0]}7 1A(a){6 l=k.x;y(6 i=0;i<l;i++){w(k[i].B.Y()==a.Y()){u k[i]}}u E}7 1C(a){w(a.8.G){6 b=C S()}6 d=(a.H[0]&&a.H[0].L.x)||0,21=(a.H[0].L[0]&&a.H[0].L[0].X.x)||0,k=a.8.19,R={1D:[],1e:[]};y(6 i=0;i<d;++i){6 c=a.H[0].L[i],1f=[];R.1D.N($(c));y(6 j=0;j<21;++j){1f.N(k[j].I(1B(a.8,c.X[j]),a,c.X[j]))}1f.N(i);R.1e.N(1f);1f=18};w(a.8.G){W("2P R y "+d+" L:",b)}u R};7 1B(a,b){w(!b)u"";6 t="";w(a.1i=="1S"){w(b.1E[0]&&b.1E[0].2Q()){t=b.1E[0].1F}K{t=b.1F}}K{w(1k(a.1i)=="7"){t=a.1i(b)}K{t=$(b).1g()}}u t}7 1m(a,b){w(a.8.G){6 d=C S()}6 c=b,r=c.1D,n=c.1e,22=n.x,1G=(n[0].x-1),23=$(a.H[0]),L=[];y(6 i=0;i<22;i++){L.N(r[n[i][1G]]);w(!a.8.1H){6 o=r[n[i][1G]];6 l=o.x;y(6 j=0;j<l;j++){23[0].2R(o[j])}}}w(a.8.1H){a.8.1H(a,L)}L=18;w(a.8.G){W("2S 1I:",d)}1n(a);24(7(){$(a).1o("2T")},0)};7 25(b){w(b.8.G){6 c=C S()}6 d=($.M)?V:E,26=[];y(6 i=0;i<b.1p.L.x;i++){26[i]=0};$1q=$("2U 2V",b);$1q.1r(7(a){q.13=0;q.1l=a;q.1s=27(b.8.1Q);w(28(q)||29(b,a))q.1t=V;w(!q.1t){$(q).1u(b.8.1N)}b.8.1j[a]=q});w(b.8.G){W("2W J:",c);1c($1q)}u $1q};7 2a(a,b,d){6 e=[],r=a.1p.L,c=r[d].X;y(6 i=0;i<c.x;i++){6 f=c[i];w(f.2X>1){e=e.2Y(2a(a,2Z,d++))}K{w(a.1p.x==1||(f.30>1||!r[d+1])){e.N(f)}}}u e};7 28(a){w(($.M)&&($(a).M().16===E)){u V};u E}7 29(a,i){w((a.8.J[i])&&(a.8.J[i].16===E)){u V};u E}7 1n(a){6 c=a.8.12;6 l=c.x;y(6 i=0;i<l;i++){1J(c[i]).I(a)}}7 1J(a){6 l=12.x;y(6 i=0;i<l;i++){w(12[i].B.Y()==a.Y()){u 12[i]}}};7 27(v){w(1k(v)!="31"){i=(v.Y()=="32")?1:0}K{i=(v==(0||1))?v:0}u i}7 2b(v,a){6 l=a.x;y(6 i=0;i<l;i++){w(a[i][0]==v){u V}}u E}7 1K(b,c,d,e){c.1v(e[0]).1v(e[1]);6 h=[];c.1r(7(a){w(!q.1t){h[q.1l]=$(q)}});6 l=d.x;y(6 i=0;i<l;i++){h[d[i][0]].1u(e[d[i][1]])}}7 2c(a,b){6 c=a.8;w(c.1V){6 d=$(\'<33>\');$("2d:34 35",a.H[0]).1r(7(){d.36($(\'<37>\').14(\'2e\',$(q).2e()))});$(a).38(d)}}7 2f(a,b){6 c=a.8,l=b.x;y(6 i=0;i<l;i++){6 s=b[i],o=c.1j[s[0]];o.13=s[1];o.13++}}7 1L(a,b,d){w(a.8.G){6 f=C S()}6 g="6 2g = 7(a,b) {",l=b.x;y(6 i=0;i<l;i++){6 c=b[i][0];6 h=b[i][1];6 s=(2h(a.8.19,c)=="1g")?((h==0)?"2i":"2j"):((h==0)?"2k":"2l");6 e="e"+i;g+="6 "+e+" = "+s+"(a["+c+"],b["+c+"]); ";g+="w("+e+") { u "+e+"; } ";g+="K { "}6 j=d.1e[0].x-1;g+="u a["+j+"]-b["+j+"];";y(6 i=0;i<l;i++){g+="}; "}g+="u 0; ";g+="}; ";39(g);d.1e.3a(2g);w(a.8.G){W("3b 3c "+b.3d()+" 3e 3f "+h+" 2m:",f)}u d};7 2i(a,b){u((a<b)?-1:((a>b)?1:0))};7 2j(a,b){u((b<a)?-1:((b>a)?1:0))};7 2k(a,b){u a-b};7 2l(a,b){u b-a};7 2h(a,i){u a[i].P};q.2n=7(g){u q.1r(7(){w(!q.1p||!q.H)u;6 d,$3g,$J,R,8,3h=0,3i;q.8={};8=$.1w(q.8,$.D.1M,g);d=$(q);$J=25(q);q.8.19=1z(q,$J);R=1C(q);6 f=[8.1P,8.1O];2c(q);$J.3j(7(e){d.1o("2o");6 b=(d[0].H[0]&&d[0].H[0].L.x)||0;w(!q.1t&&b>0){6 c=$(q);6 i=q.1l;q.1s=q.13++%2;w(!e[8.1R]){8.F=[];w(8.1x!=18){6 a=8.1x;y(6 j=0;j<a.x;j++){w(a[j][0]!=i){8.F.N(a[j])}}}8.F.N([i,q.1s])}K{w(2b(i,8.F)){y(6 j=0;j<8.F.x;j++){6 s=8.F[j],o=8.1j[s[0]];w(s[0]==i){o.13=s[1];o.13++;s[1]=o.13%2}}}K{8.F.N([i,q.1s])}};24(7(){1K(d[0],$J,8.F,f);1m(d[0],1L(d[0],8.F,R))},1);u E}}).3k(7(){w(8.1W){q.3l=7(){u E};u E}});d.1h("3m",7(){q.8.19=1z(q,$J);R=1C(q)}).1h("2p",7(e,a){$(q).1o("2o");8.F=a;6 b=8.F;2f(q,b);1K(q,$J,b,f);1m(q,1L(q,b,R))}).1h("3n",7(){1m(q,R)}).1h("3o",7(e,a){1J(a).I(q)}).1h("3p",7(){1n(q)});w($.M&&($(q).M()&&$(q).M().2q)){8.F=$(q).M().2q}w(8.F.x>0){d.1o("2p",[8.F])}1n(q)})};q.Q=7(b){6 l=k.x,a=V;y(6 i=0;i<l;i++){w(k[i].B.Y()==b.B.Y()){a=E}}w(a){k.N(b)}};q.2r=7(a){12.N(a)};q.T=7(s){6 i=3q(s);u(2s(i))?0:i};q.3r=7(s){6 i=3s(s);u(2s(i))?0:i};q.2t=7(s,a){6 b=\'\\\\\'+a.1Y;6 c=\'/(^[+]?0(\'+b+\'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)\'+b+\'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*\'+b+\'0+$)/\';u 17(c).Z($.1d(s))};q.3t=7(a){w($.3u.3v){7 2u(){3w(q.2v)q.3x(q.2v)}2u.3y(a.H[0])}K{a.H[0].1F=""}}}});$.3z.1w({D:$.D.2n});6 m=$.D;m.Q({B:"1g",O:7(s){u V},I:7(s){u $.1d(s.Y())},P:"1g"});m.Q({B:"3A",O:7(s,a){6 c=a.8;u $.D.2t(s,c)},I:7(s){u $.D.T(s)},P:"U"});m.Q({B:"3B",O:7(s){u/^[£$€?.]/.Z(s)},I:7(s){u $.D.T(s.11(C 17(/[^0-9.]/g),""))},P:"U"});m.Q({B:"3C",O:7(s){u/^\\d{2,3}[\\.]\\d{2,3}[\\.]\\d{2,3}[\\.]\\d{2,3}$/.Z(s)},I:7(s){6 a=s.3D("."),r="",l=a.x;y(6 i=0;i<l;i++){6 b=a[i];w(b.x==2){r+="0"+b}K{r+=b}}u $.D.T(r)},P:"U"});m.Q({B:"3E",O:7(s){u/^(2w?|2x|2y):\\/\\/$/.Z(s)},I:7(s){u 2z.1d(s.11(C 17(/(2w?|2x|2y):\\/\\//),\'\'))},P:"1g"});m.Q({B:"3F",O:7(s){u/^\\d{4}[\\/-]\\d{1,2}[\\/-]\\d{1,2}$/.Z(s)},I:7(s){u $.D.T((s!="")?C S(s.11(C 17(/-/g),"/")).15():"0")},P:"U"});m.Q({B:"3G",O:7(s){u/\\%$/.Z($.1d(s))},I:7(s){u $.D.T(s.11(C 17(/%/g),""))},P:"U"});m.Q({B:"3H",O:7(s){u s.3I(C 17(/^[A-3J-z]{3,10}\\.? [0-9]{1,2}, ([0-9]{4}|\'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\\s(3K|3L)))$/))},I:7(s){u $.D.T(C S(s).15())},P:"U"});m.Q({B:"3M",O:7(s){u/\\d{1,2}[\\/\\-]\\d{1,2}[\\/\\-]\\d{2,4}/.Z(s);},I:7(s,1I){6 c=1I.8;s=s.11(/\\-/g,"/");w(c.1b=="1X"){s=s.11(/(\\d{1,2})[\\/\\-](\\d{1,2})[\\/\\-](\\d{4})/,"$3/$1/$2")}K w(c.1b=="3N"){s=s.11(/(\\d{1,2})[\\/\\-](\\d{1,2})[\\/\\-](\\d{4})/,"$3/$2/$1")}K w(c.1b=="2A/2B/2C"||c.1b=="2A-2B-2C"){s=s.11(/(\\d{1,2})[\\/\\-](\\d{1,2})[\\/\\-](\\d{2})/,"$1/$2/$3")}u $.D.T(C S(s).15())},P:"U"});m.Q({B:"2m",O:7(s){u/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\\s(3O|3P)))$/.Z(s)},I:7(s){u $.D.T(C S("3Q/2D/2D "+s).15())},P:"U"});m.Q({B:"M",O:7(s){u E},I:7(s,a,b){6 c=a.8,p=(!c.2E)?\'3R\':c.2E;u $(b).M()[p]},P:"U"});m.2r({B:"3S",I:7(a){w(a.8.G){6 b=C S()}$("2d:3T",a.H[0]).2F(\':1T\').1v(a.8.1a.14[1]).1u(a.8.1a.14[0]).3U().2F(\':1U\').1v(a.8.1a.14[0]).1u(a.8.1a.14[1]);w(a.8.G){$.D.W("3V 3W 3X",b)}}})})(2z);',62,246,'||||||var|function|config||||||||||||||||||this||||return||if|length|for|||id|new|tablesorter|false|sortList|debug|tBodies|format|headers|else|rows|metadata|push|is|type|addParser|cache|Date|formatFloat|numeric|true|benchmark|cells|toLowerCase|test||replace|widgets|count|css|getTime|sorter|RegExp|null|parsers|widgetZebra|dateFormat|log|trim|normalized|cols|text|bind|textExtraction|headerList|typeof|column|appendToTable|applyWidget|trigger|tHead|tableHeaders|each|order|sortDisabled|addClass|removeClass|extend|sortForce|console|buildParserCache|getParserById|getElementText|buildCache|row|childNodes|innerHTML|checkCell|appender|table|getWidgetById|setHeadersCss|multisort|defaults|cssHeader|cssAsc|cssDesc|sortInitialOrder|sortMultiSortKey|simple|even|odd|widthFixed|cancelSelection|us|decimal|undefined|detectParserForColumn|totalCells|totalRows|tableBody|setTimeout|buildHeaders|tableHeadersRows|formatSortingOrder|checkHeaderMetadata|checkHeaderOptions|checkCellColSpan|isValueInArray|fixColumnWidth|tr|width|updateHeaderSortCount|sortWrapper|getCachedSortType|sortText|sortTextDesc|sortNumeric|sortNumericDesc|time|construct|sortStart|sorton|sortlist|addWidget|isNaN|isDigit|empty|firstChild|https|ftp|file|jQuery|dd|mm|yy|01|parserMetadataName|filter|header|headerSortUp|headerSortDown|asc|shiftKey|sortAppend|ms|alert|parser|Building|hasChildNodes|appendChild|Rebuilt|sortEnd|thead|th|Built|colSpan|concat|headerArr|rowSpan|Number|desc|colgroup|first|td|append|col|prepend|eval|sort|Sorting|on|toString|and|dir|document|shiftDown|sortOrder|click|mousedown|onselectstart|update|appendCache|applyWidgetId|applyWidgets|parseFloat|formatInt|parseInt|clearTableBody|browser|msie|while|removeChild|apply|fn|digit|currency|ipAddress|split|url|isoDate|percent|usLongDate|match|Za|AM|PM|shortDate|uk|am|pm|2000|sortValue|zebra|visible|end|Applying|Zebra|widget'.split('|'),0,{}))

/*
 * jQuery Form Plugin
 * version: 2.28 (10-MAY-2009)
 * @requires jQuery v1.2.2 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
;(function($) {

/*
    Usage Note:
    -----------
    Do not use both ajaxSubmit and ajaxForm on the same form.  These
    functions are intended to be exclusive.  Use ajaxSubmit if you want
    to bind your own submit handler to the form.  For example,

    $(document).ready(function() {
        $('#myForm').bind('submit', function() {
            $(this).ajaxSubmit({
                target: '#output'
            });
            return false; // <-- important!
        });
    });

    Use ajaxForm when you want the plugin to manage all the event binding
    for you.  For example,

    $(document).ready(function() {
        $('#myForm').ajaxForm({
            target: '#output'
        });
    });

    When using ajaxForm, the ajaxSubmit function will be invoked for you
    at the appropriate time.
*/

/**
 * ajaxSubmit() provides a mechanism for immediately submitting
 * an HTML form using AJAX.
 */
$.fn.ajaxSubmit = function(options) {
    // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
    if (!this.length) {
        log('ajaxSubmit: skipping submit process - no element selected');
        return this;
    }

    if (typeof options == 'function')
        options = { success: options };

    var url = $.trim(this.attr('action'));
    if (url) {
	    // clean url (don't include hash vaue)
	    url = (url.match(/^([^#]+)/)||[])[1];
   	}
   	url = url || window.location.href || ''

    options = $.extend({
        url:  url,
        type: this.attr('method') || 'GET'
    }, options || {});

    // hook for manipulating the form data before it is extracted;
    // convenient for use with rich editors like tinyMCE or FCKEditor
    var veto = {};
    this.trigger('form-pre-serialize', [this, options, veto]);
    if (veto.veto) {
        log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
        return this;
    }

    // provide opportunity to alter form data before it is serialized
    if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
        log('ajaxSubmit: submit aborted via beforeSerialize callback');
        return this;
    }

    var a = this.formToArray(options.semantic);
    if (options.data) {
        options.extraData = options.data;
        for (var n in options.data) {
          if(options.data[n] instanceof Array) {
            for (var k in options.data[n])
              a.push( { name: n, value: options.data[n][k] } );
          }
          else
             a.push( { name: n, value: options.data[n] } );
        }
    }

    // give pre-submit callback an opportunity to abort the submit
    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
        log('ajaxSubmit: submit aborted via beforeSubmit callback');
        return this;
    }

    // fire vetoable 'validate' event
    this.trigger('form-submit-validate', [a, this, options, veto]);
    if (veto.veto) {
        log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
        return this;
    }

    var q = $.param(a);

    if (options.type.toUpperCase() == 'GET') {
        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
        options.data = null;  // data is null for 'get'
    }
    else
        options.data = q; // data is the query string for 'post'

    var $form = this, callbacks = [];
    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });

    // perform a load on the target only if dataType is not provided
    if (!options.dataType && options.target) {
        var oldSuccess = options.success || function(){};
        callbacks.push(function(data) {
            $(options.target).html(data).each(oldSuccess, arguments);
        });
    }
    else if (options.success)
        callbacks.push(options.success);

    options.success = function(data, status) {
        for (var i=0, max=callbacks.length; i < max; i++)
            callbacks[i].apply(options, [data, status, $form]);
    };

    // are there files to upload?
    var files = $('input:file', this).fieldValue();
    var found = false;
    for (var j=0; j < files.length; j++)
        if (files[j])
            found = true;

	var multipart = false;
//	var mp = 'multipart/form-data';
//	multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);

    // options.iframe allows user to force iframe mode
   if (options.iframe || found || multipart) {
       // hack to fix Safari hang (thanks to Tim Molendijk for this)
       // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
       if (options.closeKeepAlive)
           $.get(options.closeKeepAlive, fileUpload);
       else
           fileUpload();
       }
   else
       $.ajax(options);

    // fire 'notify' event
    this.trigger('form-submit-notify', [this, options]);
    return this;


    // private function for handling file uploads (hat tip to YAHOO!)
    function fileUpload() {
        var form = $form[0];

        if ($(':input[name=submit]', form).length) {
            alert('Error: Form elements must not be named "submit".');
            return;
        }

        var opts = $.extend({}, $.ajaxSettings, options);
		var s = $.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts);

        var id = 'jqFormIO' + (new Date().getTime());
        var $io = $('<iframe id="' + id + '" name="' + id + '" src="about:blank" />');
        var io = $io[0];

        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });

        var xhr = { // mock object
            aborted: 0,
            responseText: null,
            responseXML: null,
            status: 0,
            statusText: 'n/a',
            getAllResponseHeaders: function() {},
            getResponseHeader: function() {},
            setRequestHeader: function() {},
            abort: function() {
                this.aborted = 1;
                $io.attr('src','about:blank'); // abort op in progress
            }
        };

        var g = opts.global;
        // trigger ajax global events so that activity/block indicators work like normal
        if (g && ! $.active++) $.event.trigger("ajaxStart");
        if (g) $.event.trigger("ajaxSend", [xhr, opts]);

		if (s.beforeSend && s.beforeSend(xhr, s) === false) {
			s.global && $.active--;
			return;
        }
        if (xhr.aborted)
            return;

        var cbInvoked = 0;
        var timedOut = 0;

        // add submitting element to data if we know it
        var sub = form.clk;
        if (sub) {
            var n = sub.name;
            if (n && !sub.disabled) {
                options.extraData = options.extraData || {};
                options.extraData[n] = sub.value;
                if (sub.type == "image") {
                    options.extraData[name+'.x'] = form.clk_x;
                    options.extraData[name+'.y'] = form.clk_y;
                }
            }
        }

        // take a breath so that pending repaints get some cpu time before the upload starts
        setTimeout(function() {
            // make sure form attrs are set
            var t = $form.attr('target'), a = $form.attr('action');

			// update form attrs in IE friendly way
			form.setAttribute('target',id);
			if (form.getAttribute('method') != 'POST')
				form.setAttribute('method', 'POST');
			if (form.getAttribute('action') != opts.url)
				form.setAttribute('action', opts.url);

            // ie borks in some cases when setting encoding
            if (! options.skipEncodingOverride) {
                $form.attr({
                    encoding: 'multipart/form-data',
                    enctype:  'multipart/form-data'
                });
            }

            // support timout
            if (opts.timeout)
                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);

            // add "extra" data to form if provided in options
            var extraInputs = [];
            try {
                if (options.extraData)
                    for (var n in options.extraData)
                        extraInputs.push(
                            $('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
                                .appendTo(form)[0]);

                // add iframe to doc and submit the form
                $io.appendTo('body');
                io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
                form.submit();
            }
            finally {
                // reset attrs and remove "extra" input elements
				form.setAttribute('action',a);
                t ? form.setAttribute('target', t) : $form.removeAttr('target');
                $(extraInputs).remove();
            }
        }, 10);

        var nullCheckFlag = 0;

        function cb() {
            if (cbInvoked++) return;

            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);

            var ok = true;
            try {
                if (timedOut) throw 'timeout';
                // extract the server response from the iframe
                var data, doc;

                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;

                if ((doc.body == null || doc.body.innerHTML == '') && !nullCheckFlag) {
                    // in some browsers (cough, Opera 9.2.x) the iframe DOM is not always traversable when
                    // the onload callback fires, so we give them a 2nd chance
                    nullCheckFlag = 1;
                    cbInvoked--;
                    setTimeout(cb, 100);
                    return;
                }

                xhr.responseText = doc.body ? doc.body.innerHTML : null;
                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
                xhr.getResponseHeader = function(header){
                    var headers = {'content-type': opts.dataType};
                    return headers[header];
                };

                if (opts.dataType == 'json' || opts.dataType == 'script') {
                    var ta = doc.getElementsByTagName('textarea')[0];
                    xhr.responseText = ta ? ta.value : xhr.responseText;
                }
                else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
                    xhr.responseXML = toXml(xhr.responseText);
                }
                data = $.httpData(xhr, opts.dataType);
            }
            catch(e){
                ok = false;
                $.handleError(opts, xhr, 'error', e);
            }

            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
            if (ok) {
                opts.success(data, 'success');
                if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
            }
            if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
            if (g && ! --$.active) $.event.trigger("ajaxStop");
            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');

            // clean up
            setTimeout(function() {
                $io.remove();
                xhr.responseXML = null;
            }, 100);
        };

        function toXml(s, doc) {
            if (window.ActiveXObject) {
                doc = new ActiveXObject('Microsoft.XMLDOM');
                doc.async = 'false';
                doc.loadXML(s);
            }
            else
                doc = (new DOMParser()).parseFromString(s, 'text/xml');
            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
        };
    };
};

/**
 * ajaxForm() provides a mechanism for fully automating form submission.
 *
 * The advantages of using this method instead of ajaxSubmit() are:
 *
 * 1: This method will include coordinates for <input type="image" /> elements (if the element
 *    is used to submit the form).
 * 2. This method will include the submit element's name/value data (for the element that was
 *    used to submit the form).
 * 3. This method binds the submit() method to the form for you.
 *
 * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
 * passes the options argument along after properly binding events for submit elements and
 * the form itself.
 */
$.fn.ajaxForm = function(options) {
    return this.ajaxFormUnbind().bind('submit.form-plugin',function() {
        $(this).ajaxSubmit(options);
        return false;
    }).each(function() {
        // store options in hash
        $(":submit,input:image", this).bind('click.form-plugin',function(e) {
            var form = this.form;
            form.clk = this;
            if (this.type == 'image') {
                if (e.offsetX != undefined) {
                    form.clk_x = e.offsetX;
                    form.clk_y = e.offsetY;
                } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
                    var offset = $(this).offset();
                    form.clk_x = e.pageX - offset.left;
                    form.clk_y = e.pageY - offset.top;
                } else {
                    form.clk_x = e.pageX - this.offsetLeft;
                    form.clk_y = e.pageY - this.offsetTop;
                }
            }
            // clear form vars
            setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 10);
        });
    });
};

// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
$.fn.ajaxFormUnbind = function() {
    this.unbind('submit.form-plugin');
    return this.each(function() {
        $(":submit,input:image", this).unbind('click.form-plugin');
    });

};

/**
 * formToArray() gathers form element data into an array of objects that can
 * be passed to any of the following ajax functions: $.get, $.post, or load.
 * Each object in the array has both a 'name' and 'value' property.  An example of
 * an array for a simple login form might be:
 *
 * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 *
 * It is this array that is passed to pre-submit callback functions provided to the
 * ajaxSubmit() and ajaxForm() methods.
 */
$.fn.formToArray = function(semantic) {
    var a = [];
    if (this.length == 0) return a;

    var form = this[0];
    var els = semantic ? form.getElementsByTagName('*') : form.elements;
    if (!els) return a;
    for(var i=0, max=els.length; i < max; i++) {
        var el = els[i];
        var n = el.name;
        if (!n) continue;

        if (semantic && form.clk && el.type == "image") {
            // handle image inputs on the fly when semantic == true
            if(!el.disabled && form.clk == el) {
            	a.push({name: n, value: $(el).val()});
                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
            }
            continue;
        }

        var v = $.fieldValue(el, true);
        if (v && v.constructor == Array) {
            for(var j=0, jmax=v.length; j < jmax; j++)
                a.push({name: n, value: v[j]});
        }
        else if (v !== null && typeof v != 'undefined')
            a.push({name: n, value: v});
    }

    if (!semantic && form.clk) {
        // input type=='image' are not found in elements array! handle it here
        var $input = $(form.clk), input = $input[0], n = input.name;
        if (n && !input.disabled && input.type == 'image') {
        	a.push({name: n, value: $input.val()});
            a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
        }
    }
    return a;
};

/**
 * Serializes form data into a 'submittable' string. This method will return a string
 * in the format: name1=value1&amp;name2=value2
 */
$.fn.formSerialize = function(semantic) {
    //hand off to jQuery.param for proper encoding
    return $.param(this.formToArray(semantic));
};

/**
 * Serializes all field elements in the jQuery object into a query string.
 * This method will return a string in the format: name1=value1&amp;name2=value2
 */
$.fn.fieldSerialize = function(successful) {
    var a = [];
    this.each(function() {
        var n = this.name;
        if (!n) return;
        var v = $.fieldValue(this, successful);
        if (v && v.constructor == Array) {
            for (var i=0,max=v.length; i < max; i++)
                a.push({name: n, value: v[i]});
        }
        else if (v !== null && typeof v != 'undefined')
            a.push({name: this.name, value: v});
    });
    //hand off to jQuery.param for proper encoding
    return $.param(a);
};

/**
 * Returns the value(s) of the element in the matched set.  For example, consider the following form:
 *
 *  <form><fieldset>
 *      <input name="A" type="text" />
 *      <input name="A" type="text" />
 *      <input name="B" type="checkbox" value="B1" />
 *      <input name="B" type="checkbox" value="B2"/>
 *      <input name="C" type="radio" value="C1" />
 *      <input name="C" type="radio" value="C2" />
 *  </fieldset></form>
 *
 *  var v = $(':text').fieldValue();
 *  // if no values are entered into the text inputs
 *  v == ['','']
 *  // if values entered into the text inputs are 'foo' and 'bar'
 *  v == ['foo','bar']
 *
 *  var v = $(':checkbox').fieldValue();
 *  // if neither checkbox is checked
 *  v === undefined
 *  // if both checkboxes are checked
 *  v == ['B1', 'B2']
 *
 *  var v = $(':radio').fieldValue();
 *  // if neither radio is checked
 *  v === undefined
 *  // if first radio is checked
 *  v == ['C1']
 *
 * The successful argument controls whether or not the field element must be 'successful'
 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.  If this value is false the value(s)
 * for each element is returned.
 *
 * Note: This method *always* returns an array.  If no valid value can be determined the
 *       array will be empty, otherwise it will contain one or more values.
 */
$.fn.fieldValue = function(successful) {
    for (var val=[], i=0, max=this.length; i < max; i++) {
        var el = this[i];
        var v = $.fieldValue(el, successful);
        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
            continue;
        v.constructor == Array ? $.merge(val, v) : val.push(v);
    }
    return val;
};

/**
 * Returns the value of the field element.
 */
$.fieldValue = function(el, successful) {
    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
    if (typeof successful == 'undefined') successful = true;

    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
        (t == 'checkbox' || t == 'radio') && !el.checked ||
        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
        tag == 'select' && el.selectedIndex == -1))
            return null;

    if (tag == 'select') {
        var index = el.selectedIndex;
        if (index < 0) return null;
        var a = [], ops = el.options;
        var one = (t == 'select-one');
        var max = (one ? index+1 : ops.length);
        for(var i=(one ? index : 0); i < max; i++) {
            var op = ops[i];
            if (op.selected) {
				var v = op.value;
				if (!v) // extra pain for IE...
                	v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
                if (one) return v;
                a.push(v);
            }
        }
        return a;
    }
    return el.value;
};

/**
 * Clears the form data.  Takes the following actions on the form's input fields:
 *  - input text fields will have their 'value' property set to the empty string
 *  - select elements will have their 'selectedIndex' property set to -1
 *  - checkbox and radio inputs will have their 'checked' property set to false
 *  - inputs of type submit, button, reset, and hidden will *not* be effected
 *  - button elements will *not* be effected
 */
$.fn.clearForm = function() {
    return this.each(function() {
        $('input,select,textarea', this).clearFields();
    });
};

/**
 * Clears the selected form elements.
 */
$.fn.clearFields = $.fn.clearInputs = function() {
    return this.each(function() {
        var t = this.type, tag = this.tagName.toLowerCase();
        if (t == 'text' || t == 'password' || tag == 'textarea')
            this.value = '';
        else if (t == 'checkbox' || t == 'radio')
            this.checked = false;
        else if (tag == 'select')
            this.selectedIndex = -1;
    });
};

/**
 * Resets the form data.  Causes all form elements to be reset to their original value.
 */
$.fn.resetForm = function() {
    return this.each(function() {
        // guard against an input with the name of 'reset'
        // note that IE reports the reset function as an 'object'
        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
            this.reset();
    });
};

/**
 * Enables or disables any matching elements.
 */
$.fn.enable = function(b) {
    if (b == undefined) b = true;
    return this.each(function() {
        this.disabled = !b;
    });
};

/**
 * Checks/unchecks any matching checkboxes or radio buttons and
 * selects/deselects and matching option elements.
 */
$.fn.selected = function(select) {
    if (select == undefined) select = true;
    return this.each(function() {
        var t = this.type;
        if (t == 'checkbox' || t == 'radio')
            this.checked = select;
        else if (this.tagName.toLowerCase() == 'option') {
            var $sel = $(this).parent('select');
            if (select && $sel[0] && $sel[0].type == 'select-one') {
                // deselect all other options
                $sel.find('option').selected(false);
            }
            this.selected = select;
        }
    });
};

// helper fn for console logging
// set $.fn.ajaxSubmit.debug to true to enable debug logging
function log() {
    if ($.fn.ajaxSubmit.debug && window.console && window.console.log)
        window.console.log('[jquery.form] ' + Array.prototype.join.call(arguments,''));
};

})(jQuery);

function jqueryPopups() {
	$('a').each(function(){
						 
		attribs = $(this).attr('rel').split(" ");
		if (attribs[0] == "popup") {
			
			var currentTime = new Date();
			var timeInSeconds = currentTime.getTime();

			var type = "standard";
			var strWidth = "800";
			var strHeight = "580";
			
			if (attribs[1]!=null) {type = attribs[1];}
			if (attribs[2]!=null) {strWidth = attribs[2];}
			if (attribs[3]!=null) {strHeight = attribs[3];}		
			$(this).attr('rev',$(this).attr('href'));
					
			if (type == "standard") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
			if (type == "console" || type == "fullscreen") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0";
			$(this).click(function(){
				$(this).attr('href','#');
				newWindow = window.open($(this).attr('rev'), 'newWin'+timeInSeconds, tools);
				newWindow.focus();
			});
			
		}
	
	});
}

$(document).ready(function() {
						   
	externalLinks();
	jqueryPopups();
	setNext();
	PEPS.rollover.init();
	initMenu();
	$(".popupwindow").popupwindow();
	$('span.mailme').mailme();
	$("#sportsbookform").validate();
	$("#leftloginform").validate();
	$("#leftloginform2").validate();
	
	// initialize scrollable  
		$("div.scrollable").scrollable({ 
				 
			// items are auto-scrolled in 2 secnod interval 
			interval: 8000, 
			 
			// when last item is encountered go back to first item 
			loop: true,  
			
			clickable: false,
			 
			// make animation a little slower than the default 
			speed: 600, 
			size: 4,
			 
			// when seek starts make items little transparent 
			onBeforeSeek: function() { 
				this.getItems().fadeTo(300, 0.2);         
			}, 
			 
			// when seek ends resume items to full transparency 
			onSeek: function() { 
				this.getItems().fadeTo(300, 1); 
			} 
		});     		
		
}); 