﻿//ircrole.js.
//Created for Intel IRC site by Anton Ageev, AMIPrint.
//Version 1.0.

//Shows all elements with specified class name.
function ShowByClassName(className)
{
	$( "." + className ).each( function( intIndex )
		{
			$( this ).show( );
		});
}

//Hides all elements with specified class name.
function HideByClassName(className)
{
	$( "." + className ).each( function( intIndex )
		{
			$( this ).hide( );
		});
}

//ircrole document ready function.
$( document ).ready( function( )
{
	HideByClassName( "FOR_ASSOCIATE" );
	HideByClassName( "FOR_PREMIER" );
	HideByClassName( "FOR_REGISTERED" );
	
	if ( ( typeof ( optionaldata5 ) != "undefined" ) && ( optionaldata5 == "ASSOCIATE" ) )
	{
		ShowByClassName ( "FOR_ASSOCIATE" );
	}
	
	if ( ( typeof ( optionaldata5 ) != "undefined" ) && ( optionaldata5 == "PREMIER") )
	{
		ShowByClassName( "FOR_PREMIER" );
	}
	
	if ( ( typeof ( optionaldata5 ) != "undefined" ) && ( optionaldata5 == "REGISTERED" ) )
	{
		ShowByClassName( "FOR_REGISTERED" );
	}
});