function getNextGame(){
	var imgSrc = 	new String(jQuery('img#gameImage').attr('src'));
	var start = 	(imgSrc.lastIndexOf('/')+1);
	var end = 		imgSrc.indexOf('.gif');
	var fileName = 	imgSrc.substring(start,end);
	var filePath = 	new String("/wp-content/themes/palaceofchance/images/");
	switch(fileName){
		case 'shopping':
			jQuery('img#gameImage').attr('src',filePath+'shark.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/cardshark.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/cardshark.swf?nocache='+Math.Random()'");
			break;
		case 'shark':
			jQuery('img#gameImage').attr('src',filePath+'dragon.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/crazydragon.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/crazydragon.swf?nocache='+Math.Random()'");
			break;
		case 'dragon':
			jQuery('img#gameImage').attr('src',filePath+'good_bad.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/g2bbad_progressive_b.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/g2bbad_progressive_b.swf?nocache='+Math.Random()'");
			break;
		case 'good_bad':
			jQuery('img#gameImage').attr('src',filePath+'ride.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/LER_progressive_b.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/LER_progressive_b.swf?nocache='+Math.Random()'");
			break;
		case 'ride':
			jQuery('img#gameImage').attr('src',filePath+'caribbean.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/cstud_progressive_b.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/cstud_progressive_b.swf?nocache='+Math.Random()'");
			break;
		case 'caribbean':
			jQuery('img#gameImage').attr('src',filePath+'light_speed.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/lightspeed.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/lightspeed.swf?nocache='+Math.Random()'");
			break;
		case 'light_speed':
			jQuery('img#gameImage').attr('src',filePath+'midlife.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/shoppingspree.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/shoppingspree.swf?nocache='+Math.Random()'");
			break;
		case 'midlife':
			jQuery('img#gameImage').attr('src',filePath+'iris.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/iris.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/iris.swf?nocache='+Math.Random()'");
			break;
		case 'iris':
			jQuery('img#gameImage').attr('src',filePath+'shopping.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/shoppingspree.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/shoppingspree.swf?nocache='+Math.Random()'");
			break;
	}
}
function getPrevGame(){
	var imgSrc = 	new String(jQuery('img#gameImage').attr('src'));
	var start = 	(imgSrc.lastIndexOf('/')+1);
	var end = 		imgSrc.indexOf('.gif');
	var fileName = 	imgSrc.substring(start,end);
	var filePath = 	new String("/wp-content/themes/palaceofchance/images/");
	switch(fileName){
		case 'shopping':
			jQuery('img#gameImage').attr('src',filePath+'shark.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/cardshark.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/cardshark.swf?nocache='+Math.Random()'");
			break;
		case 'shark':
			jQuery('img#gameImage').attr('src',filePath+'dragon.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/crazydragon.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/crazydragon.swf?nocache='+Math.Random()'");
			break;
		case 'dragon':
			jQuery('img#gameImage').attr('src',filePath+'good_bad.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/g2bbad_progressive_b.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/g2bbad_progressive_b.swf?nocache='+Math.Random()'");
			break;
		case 'good_bad':
			jQuery('img#gameImage').attr('src',filePath+'ride.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/LER_progressive_b.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/LER_progressive_b.swf?nocache='+Math.Random()'");
			break;
		case 'ride':
			jQuery('img#gameImage').attr('src',filePath+'caribbean.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/cstud_progressive_b.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/cstud_progressive_b.swf?nocache='+Math.Random()'");
			break;
		case 'caribbean':
			jQuery('img#gameImage').attr('src',filePath+'light_speed.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/lightspeed.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/lightspeed.swf?nocache='+Math.Random()'");
			break;
		case 'light_speed':
			jQuery('img#gameImage').attr('src',filePath+'midlife.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/shoppingspree.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/shoppingspree.swf?nocache='+Math.Random()'");
			break;
		case 'midlife':
			jQuery('img#gameImage').attr('src',filePath+'iris.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/iris.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/iris.swf?nocache='+Math.Random()'");
			break;
		case 'shopping':
			jQuery('img#gameImage').attr('src',filePath+'shopping.gif');
			jQuery('param#param1').attr("value","http://progressives.realtimegaming.com/shoppingspree.swf?nocache='+Math.Random()'");
			jQuery('embed#embed1').attr("src","http://progressives.realtimegaming.com/shoppingspree.swf?nocache='+Math.Random()'");
			break;
	}
}
function imageSwap(imgName){
	var imgOut = 	new String('/wp-content/themes/palaceofchance/images/games/b_arrow.gif');
	var imgOver = 	new String('/wp-content/themes/palaceofchance/images/games/b_arrow_o.gif');
	if(jQuery(imgName).attr('src')==imgOver){
		jQuery(imgName).attr('src',imgOut);
	}else{
		jQuery(imgName).attr('src',imgOver);
	}
	return true;
}
function swapImage(id,mType){
	var navNames1 = {
		"download":	new Array("url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_dw.gif)","url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_dw-o.gif)"),
		"promo":	new Array("url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_promos.gif)","url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_promos-o.gif)"),
		"banking":	new Array("url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_banking.gif)","url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_banking-o.gif)"),
		"games":	new Array("url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_viewgames.gif)","url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_viewgames-o.gif)"),
		"rules":	new Array("url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_rules.gif)","url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_rules-o.gif)"),
		"about":	new Array("url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_aboutus.gif)","url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_aboutus-o.gif)"),
		"support":	new Array("url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_support.gif)","url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_support-o.gif)"),
		"home":		new Array("url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_home.gif)","url(/wp-content/themes/palaceofchance/images/nav-primary/1_m_home-o.gif)")
	}
	return navNames1[id][mType];
}
jQuery(document).ready(function () {
	jQuery('#promo1').mouseover(function(){jQuery(this).attr('src','/wp-content/themes/palaceofchance/images/promotions/b_promo_customer_o.jpg');}).mouseout(function(){ jQuery(this).attr('src','/wp-content/themes/palaceofchance/images/promotions/b_promo_customer.jpg');});
	jQuery('#promo2').mouseover(function(){jQuery(this).attr('src','/wp-content/themes/palaceofchance/images/promotions/b_promo_monthly_o.jpg');}).mouseout(function(){ jQuery(this).attr('src','/wp-content/themes/palaceofchance/images/promotions/b_promo_monthly.jpg');});
	jQuery('#promo3').mouseover(function(){jQuery(this).attr('src','/wp-content/themes/palaceofchance/images/promotions/b_promo_refer_o.jpg');}).mouseout(function(){ jQuery(this).attr('src','/wp-content/themes/palaceofchance/images/promotions/b_promo_refer.jpg');});
	jQuery('#promo4').mouseover(function(){jQuery(this).attr('src','/wp-content/themes/palaceofchance/images/promotions/b_promo_vip_o.jpg');}).mouseout(function(){ jQuery(this).attr('src','/wp-content/themes/palaceofchance/images/promotions/b_promo_vip.jpg');});
});