function cssHelp(){
	//hides bottom border on last li in ul tags
	$('ul li:last-child').css({borderBottomColor: '#ffffff'});
	
	//hides bottom border on tag prior to li used as a spacer or adZone in the ourMovies menu list in leftColumn
	$('ul li.leftNavHorizontalSpacer').prev().css({borderBottomColor: '#ffffff'});
	$('ul li.adZone3').prev().css({borderBottomColor: '#ffffff'});
		
	//hides bottom border on last div in movie title lists on homepage
	$('td.movieDetailLinks div.movieDetailLink:last-child a').css({borderBottomColor: '#ffffff'});

	//hides bottom border on list items with images as their children in left column extra component
	$('div.leftNavExtras ul.packageMenu li img').parents('li').css({borderBottomColor: '#ffffff'});
	
	//hides bottom border on Personals in extras component (leftColumn) an adds spacing before image
	$('div.leftNavExtras ul.packageMenu a[name="Personals"]').parent().css({borderBottomColor: '#ffffff', paddingBottom: '10px'});	
		
	//hides background color on anchor tags with images as their children in left column extra and ourMovies component
	$('div.leftNavExtras ul.packageMenu li img').parents('a').css({backgroundColor: 'transparent'});	
	$('div.leftNavExtras ul.ourMovies li img').parents('a').css({backgroundColor: 'transparent'});

	//removes br tags in customer service module so styling can be applied that mimics the other modules in left column 
	$('div.leftNavCustomerService br').css({display: 'none'});
	$('div.leftNavCustomerService a br').css({display: 'block'});
	$('div.leftNavCustomerService a:last-child').css({borderBottomColor: '#ffffff'});
	$('div.leftNavCustomerService a img').parent().css({backgroundColor: 'transparent', borderBottomColor: '#ffffff', paddingBottom: '10px'});

	
	//add button graphics
	var inputTypeSubmit = $('input[type="submit"]');
	var inputTypeButton = $('input[type="button"]');
	var watchNowButton = $('a.watchNow');
	
	if(inputTypeSubmit.length) buildInputButtons(inputTypeSubmit);
	if(inputTypeButton.length) buildInputButtons(inputTypeButton);
	if(watchNowButton.length) buildInputButtons(watchNowButton);


	//customize forms in my account - my settings
	if($('div.mySettingsContainer').length){
		$('#accountContent div.tabOutline form table td').attr('align', 'left'); //align table ceells to left
		$('#accountContent div.mySettingsContainer form input[type="submit"]').parent().css({textAlign: 'left',margin: '10px 0px'}); //align submit buttons to left
		$('div#myWebSettings > form > br').remove();
		
		//adjust box widths		
		var emailSettingsHeight = 78;
		var localSettingsHeight = 143;
		var currencySettingsHeight = 97;
		var passwordSettingsHeight = 126;
		var webSettingsHeight = 242;
		
		var emailSettingsModifier = $('div#updateEmail > form').attr('offsetHeight') - emailSettingsHeight;
		var localSettingsModifier = $('div#myLocaleSettings > form').attr('offsetHeight') - localSettingsHeight;
		var currencySettingsModifier = $('div#myCurrencySettings > form').attr('offsetHeight') - currencySettingsHeight;
		var passwordSettingsModifier = $('div#changePassword > form').attr('offsetHeight') - passwordSettingsHeight;
		var webSettingsModifier = $('div#myWebSettings > form').attr('offsetHeight') - webSettingsHeight;
	
		var emailSettingsParent = $('div#updateEmail').attr('offsetHeight') + emailSettingsModifier;
		var localSettingsParent = $('div#myLocaleSettings').attr('offsetHeight') + localSettingsModifier;
		var currencySettingsParent = $('div#myCurrencySettings').attr('offsetHeight') + currencySettingsModifier;
		var passwordSettingsParent = $('div#changePassword').attr('offsetHeight') + passwordSettingsModifier;
		var webSettingsParent = $('div#myWebSettings').attr('offsetHeight') + webSettingsModifier;
		
		$('div#updateEmail').css({height: emailSettingsParent});
		$('div#myLocaleSettings').css({height: localSettingsParent});
		$('div#myCurrencySettings').css({height: currencySettingsParent});
		$('div#changePassword').css({height: passwordSettingsParent});
		$('div#myWebSettings').css({height: webSettingsParent});
	}


	//un-bold paging text my account - movies
	$('div.resultRowHeader1').css({fontWeight: 'normal'});
		
	
	//customize "my previous wishes" table in my account - my wishlist 
	$('div#wishlistContent .myAccountSettingsTabHeader:last').css({background: 'none', border: 'none', color: '#1D5282', marginBottom: '0px', paddingLeft: '0px'});
	$('div#wishlistContent > table').css({border: '1px solid #d1d1d1', borderCollapse: 'collapse', width: '100%'});
	$('div#wishlistContent > table th').css({backgroundImage: 'url("http://pic.aebn.net/v8_skins/CustomSkins/AEBN000001/tid822/table_headerBkg.gif")', backgroundRepeat: 'repeat-x', border: '1px solid #d1d1d1', color: '#E8F4FF', lineHeight: '24px', textAlign: 'center'});
	$('div#wishlistContent > table td').css({border: '1px solid #d1d1d1', lineHeight: '24px', paddingLeft: '4px', verticalAlign: 'middle'});


	//IE7/IE8 CSS Help
	if ( ((document.all) && (navigator.appVersion.indexOf('MSIE 7.'))) || (navigator.userAgent.indexOf('Trident/4.')) != -1 ) ie7CSSHelp();

	
	//IE6 CSS Help
	if((document.all)&&(navigator.appVersion.indexOf('MSIE 6.')!= -1)) ie6CSSHelp();
	
		
}


function buildInputButtons(inputType){
	//builds the css for all input buttons and select anchor tags
	jQuery.each(inputType, function(){
		var inputWidth = $(this).attr('offsetWidth');
		var widthGroup = (inputWidth < 46) ? 33 : (inputWidth < 70) ? 75 : (inputWidth < 105) ? 110 : (inputWidth < 125) ? 130 : (inputWidth < 145) ? 150 : (inputWidth < 175) ? 180 : (inputWidth < 205) ? 210 : 250;
		var displayNone = new Array('goButton4','goButton5','goButtonPPVPrices');
		
		for(i=0; i<displayNone.length; i++){
			if(this.id == (displayNone[i])){
				$(this).css({display: 'none'});
				return;
			}else {
				$(this).css({backgroundColor: 'transparent', border: 'none', color: '#1d270d', display: 'inline-block', height: '24px', visbility: 'visible'});								
			}			
		}

		switch(widthGroup){
			case 33:
				$(this).css({backgroundImage: 'url("http://pic.aebn.net/v8_skins/CustomSkins/AEBN000001/tid822/button_'+widthGroup+'.gif")', width: widthGroup, visibility: 'visible'});					
				break;
			case 75:
				$(this).css({backgroundImage: 'url("http://pic.aebn.net/v8_skins/CustomSkins/AEBN000001/tid822/button_'+widthGroup+'.gif")', width: widthGroup, visibility: 'visible'});												
				break;
			case 130:
				$(this).css({backgroundImage: 'url("http://pic.aebn.net/v8_skins/CustomSkins/AEBN000001/tid822/button_'+widthGroup+'.gif")', width: widthGroup, visibility: 'visible'});					
				break;
			case 150:
				$(this).css({backgroundImage: 'url("http://pic.aebn.net/v8_skins/CustomSkins/AEBN000001/tid822/button_'+widthGroup+'.gif")', width: widthGroup, visibility: 'visible'});
				break;
			case 180:
				$(this).css({backgroundImage: 'url("http://pic.aebn.net/v8_skins/CustomSkins/AEBN000001/tid822/button_'+widthGroup+'.gif")', width: widthGroup, visibility: 'visible'});					
				break;
			case 210:
				$(this).css({backgroundImage: 'url("http://pic.aebn.net/v8_skins/CustomSkins/AEBN000001/tid822/button_'+widthGroup+'.gif")', width: widthGroup, visibility: 'visible'});					
				break;
			default:
				$(this).css({backgroundImage: 'url("http://pic.aebn.net/v8_skins/CustomSkins/AEBN000001/tid822/button_'+widthGroup+'.gif")', width: widthGroup, visibility: 'visible'});									
		}
	});
}


function ie7CSSHelp(){
//remove link underlines on anchor tags on help pages
	$('div.helpFaq a b').parent().css({textDecoration: 'none'});
	$('div.helpFaq a h3').parent().css({textDecoration: 'none'}); 
	$('div.helpFaq a h4').parent().css({textDecoration: 'none'});
}


function ie6CSSHelp(){
//places background color on right column li elements on hover comment out if latter want to change behavior of right column
	$('div#rightColumn li').hover(
		function(){
			$(this).css({backgroundColor: '#D1D1D1'});
		}, 
		function(){
			$(this).css({backgroundColor: 'transparent'});
		}
	);
	
	//places underline under scene detail/hide detail control in scenes (puts hover state on div)
	$('div.resultRowViewDetails').hover(
		function(){
			$(this).css({textDecoration: 'underline'});
		}, 
		function(){
			$(this).css({textDecoration: 'none'});
		}
	);
}

//jquery onDom Loader
$(function(){
	//hide inputs
	$('input'[type='submit']).css({visibility:'hidden'});
	
	orientation822 = $(".leftVodHeader").text();
	orientation822 = jQuery.trim(orientation822);
	
	if(orientation822 != "Gay VOD"){
		$('#rtZoneBannerTMP').append('<img src="http://pic.aebn.net/realtouch/banners/745x80_straight.jpg" border="0">');
	} else {
		$('#rtZoneBannerTMP').append('<img src="http://pic.aebn.net/realtouch/banners/745x80_gay.jpg" border="0">');
		$('#rtZoneBannerTMP').attr('href','http://realtouch.com/?cm_mmc=XXXVIDEOTHEATRE-_-Gay-_-WelcomeMessage-_-RealTouch');		
	}
	
	cssHelp();
});

// onLoad controller
var previousOnload = window.onload;
var needGenreSwitchLink = null;

window.onload = function () {
	if(previousOnload){previousOnload();}
	if(needGenreSwitchLink != null){needGenreSwitchLink();}
}


