			jQuery(document).ready(function(){
			var option = {
				directory: 'images/corner_ads/',
				side: 'right',     
				turnImage: 'fold.png',  // The triangle-shaped fold image
				maxHeight: 400,         // The maximum height. Duh.
				startingWidth: 100,     // The height and width 
				startingHeight: 100,    // with which to start (these should probably be camelCase, d'oh.)
				autoCurl: true         // If this is set to true, the fold will curl/uncurl on mouseover/mouseout.
			};
			
		
			jQuery( '#target' ).fold(option);
		});

	
		jQuery(document).ready(function() {
		  var options = {
			newsList: "#news",
			controls: false,
			startDelay: 25,
			placeHolder1: "_",
			tickerRate: 25,
			loopDelay: 2000,
			stopOnHover: false
		  }
		  jQuery().newsTicker(options);
		});
		
		function slideSwitch() {
			var $active = jQuery('#banner_ad A.active');

			if ( $active.length == 0 ) $active = jQuery('#banner_ad A:last');

			var $next =  $active.next().length ? $active.next()
				: jQuery('#banner_ad A:first');

			$active.addClass('last-active');

			$next.css({opacity: 1.0})
				.addClass('active')
				.animate({opacity: 1.0}, 0, function() {
					$active.removeClass('active last-active');
				});
		}

		jQuery(function() {
			setInterval( "slideSwitch()", 5000 );
		});
		
		var dom = (document.getElementById && !document.all)? 1: 0;

		function DivShowHide(ObjID, ObjImg){
			var obj = (dom)? document.getElementById(ObjID): document.all[ObjID];
			var img = (dom)? document.getElementById(ObjImg): document.all[ObjImg];

			if(obj.style.visibility == "hidden"){ // show
				obj.style.visibility = "visible";
				obj.style.display = "block";
				img.src="images/arrow-up-icon.png";
			}
			else { // hide
				obj.style.visibility = "hidden";
				obj.style.display = "none";
				img.src="images/arrow-down-icon.png"
			}
		}
		
		function DivShowHideIndex(ObjID, ObjImg){
			var obj = (dom)? document.getElementById(ObjID): document.all[ObjID];
			var img = (dom)? document.getElementById(ObjImg): document.all[ObjImg];

			if(obj.style.visibility == "hidden"){ // show
				obj.style.visibility = "visible";
				obj.style.display = "block";
			}
			else { // hide
				obj.style.visibility = "hidden";
				obj.style.display = "none";
			}
		}

		jQuery(document).ready(function(){
			jQuery('.cash_reel, .games_reel').bxSlider({
				alignment: 'vertical',        // 'horizontal', 'vertical' - direction in which slides will move
				controls: false,                 // determines if default 'next'/'prev' controls are displayed
				speed: 500,                     // amount of time slide transition lasts (in milliseconds)
				pager: false,                    // determines if a numeric pager is displayed (1 2 3 4...)
				pager_short: false,             // determines if a 'short' numeric pager is displayed (1/4)
				pager_short_separator: ' / ',   // text to be used to separate the short pager
				margin: 0,                      // if 'horizontal', applies a right margin to each slide, if 'vertical' a
												// bottom margin is applied. example: margin: 50
				next_text: 'next',              // text to be displayed for the 'next' control
				next_image: '',                 // image to be used for the 'next' control
				prev_text: 'prev',              // text to be displayed for the 'prev' control
				prev_image: '',                 // image to be used for the 'prev' control
				auto: true,                    // determines if slides will move automatically
				pause: 3500,                    // time between each slide transition (auto mode only) 
				auto_direction: 'next',         // order in which slides will transition (auto mode only)
				auto_hover: true,               // determines if slideshow will pause while mouse is hovering over slideshow
				auto_controls: false,           // determines if 'start'/'stop' controls are displayed (auto mode only)
				ticker: false,                  // determines if slideshow will behave as a constant ticker
				ticker_controls: false,         // determines if 'start'/'stop' ticker controls are displayed (ticker mode only)
				ticker_direction: 'next',       // order in which slides will transition (ticker mode only)
				ticker_hover: true,             // determines if slideshow will pause while mouse is hovering over slideshow
				stop_text: 'stop',              // text to be displayed for the 'stop' control
				start_text: 'start',            // text to be displayed for the 'start' control
				wrapper_class: 'bxslider_wrap'  // class name to be used for the outer wrapper of the slideshow
			});
		});
		
		var $jx = jQuery.noConflict();
		$jx.fn.cycle.defaults.timeout = 4000;

		$jx(function() {
			// run the code in the markup!
			$jx('#jp_slide').cycle({
				fx:     'scrollUp',
				timeout: 5000,
				delay:  -3000
				});
		});
		
var expDays = 1; // number of days the cookie should last

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
}

function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {
  var exp = new Date();
  exp.setTime (exp.getTime() - 1);
  var cval = GetCookie (name);
  document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function amt(){
  var count = GetCookie('count')
  if(count == null) {
    SetCookie('count','1')
    return 1
  } else {
    var newcount = parseInt(count) + 1;
    DeleteCookie('count')
    SetCookie('count',newcount,exp)
    return count
  }
}

function getCookieVal(offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
  endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
  var count = GetCookie('count');
  if (count == null) {
    count=1;
    SetCookie('count', count, exp);
		jQuery(document).ready(function(){
		//Examples of how to assign the ColorBox event to elements
		//jQuery("div[rel='val']").colorbox({open:"true"});
		jQuery(".index").colorbox({open:"true", width:"532px", inline:true, href:"#index_inline"});

		});
  } else {
    count++;
    SetCookie('count', count, exp);
  }
}
