jQuery(document).ready(function(){
	jQuery('ul.columns li:nth-child(3n)').css("border","none");
	jQuery('.small:nth-child(2n)').css("margin-right","0").css("margin-left","6px");
	
	jQuery('#tabs').tabs();
	
	jQuery('#site-search').focus(function(){ 
		if(jQuery(this).hasClass('default')) {
			jQuery(this).val('').removeClass('default');
		} 
	})
	.blur(function(){
		if(jQuery(this).val()=='') {
				jQuery(this).val('Search').addClass('default');
			} 
		})
	;
	
	//-- top menu
	jQuery('#top-menu a').mouseover(function(){
		if(jQuery(this).parent().hasClass('current-page-ancestor')  || jQuery(this).parent().hasClass('current-menu-item')) {
			return;
		}
		jQuery(this).css("background-image", "url(/wp-content/themes/bjc/images/burgundy-tab.jpg)");
		jQuery('span',this).css("background-image", "url(/wp-content/themes/bjc/images/burgundy-tab.jpg)");
		
	});
	
	
	jQuery('#top-menu a').mouseout(function(){
		if(jQuery(this).parent().hasClass('current-page-ancestor') || jQuery(this).parent().hasClass('current-menu-item')) {
			return;
		}
		jQuery(this).css("background-image", "url(/wp-content/themes/bjc/images/gray-tab.jpg)");
		jQuery('span',this).css("background-image", "url(/wp-content/themes/bjc/images/gray-tab.jpg)");
		
	});
	jQuery('#top-menu li.current-menu-item a').css("background-image", "url(/wp-content/themes/bjc/images/red-tab.jpg)");
	jQuery('#top-menu li.current-menu-item span').css("background-image", "url(/wp-content/themes/bjc/images/red-tab.jpg)");
	jQuery('#top-menu li.current-page-ancestor>a').css("background-image", "url(/wp-content/themes/bjc/images/red-tab.jpg)");
	jQuery('span','#top-menu li.current-page-ancestor>a').css("background-image", "url(/wp-content/themes/bjc/images/red-tab.jpg)");
	
	
	//-- submenu
	jQuery('#sub-menu li').corner("top 5px");
	jQuery('#sub-menu li').mouseover(function(){
		if(jQuery(this).hasClass('current-menu-item')) {
			return;
		}
		jQuery(this).css("background-color", "#8C1800");
	});
	
	
	jQuery('#sub-menu li').mouseout(function(){
		if(jQuery(this).hasClass('current-menu-item')) {
			return;
		}
		jQuery(this).css("background-color", "#A8AAA5");
	});
	
	//--home button
	jQuery('#left-top a').mouseover(function(){
		if(jQuery(this).hasClass('active')) {
			return;
		}
		jQuery(this).css("background-image", "url(/wp-content/themes/bjc/images/burgundy-tab.jpg)");
		jQuery('span',this).css("background-image", "url(/wp-content/themes/bjc/images/burgundy-tab.jpg)");
		
	});
	
	
	jQuery('#left-top a').mouseout(function(){
		if(jQuery(this).hasClass('active')) {
			return;
		}
		jQuery(this).css("background-image", "url(/wp-content/themes/bjc/images/gray-tab.jpg)");
		jQuery('span',this).css("background-image", "url(/wp-content/themes/bjc/images/gray-tab.jpg)");
		
	});
	jQuery('#left-top a.active').css("background-image", "url(/wp-content/themes/bjc/images/red-tab.jpg)");
	jQuery('#left-top a.active span').css("background-image", "url(/wp-content/themes/bjc/images/red-tab.jpg)");
	
	
	
	
	jQuery('.submenu li')
			.mouseover(function(){jQuery(this).css("background-image", "url(/wp-content/themes/bjc/images/burgundy_tab_content.png)")})
			.mouseout(function(){jQuery(this).css("background-image", "url(/wp-content/themes/bjc/images/grey_tab_content.png)")});
	jQuery('.submenu li:nth-child(2n)').addClass('odd');
	
	
	//-- casino bonus
	jQuery('.casino-bonus').css("width", "100%").parent().css("padding", "0");
	
	jQuery('.casino-bonus tr:nth-child(2n+1)').css("background-color","#F8DF9D");
	
	
	/*jQuery('#left-menu li>ul.sub-menu').each(function(i,e){
		alert(i);
		var el = jQuery(e); 
		
		if(el.parent().hasClass('current_page_parent')) {
			
			el.show();
		} else {
			el.hide();
		}
		
	});*/
	
	jQuery('table.casino-bonus').tablesorter();
	jQuery('table.cgames').tablesorter(); 
	
	
	jQuery('.wp-table-reloaded tr td:last-child').css('padding','1px');
	//jQuery('.wp-table-reloaded tr td:last-child a').hide();
	
	jQuery('.qr-tooltip').tooltip({ 
	    track: true, 
	    delay: 0, 
	    showURL: false, 
	    showBody: " - ", 
	    fade: 250 
	});

	jQuery('.diglike').jqDropDown({ effect: 'fade', effectSpeed: 300, modal: true });

});


