
var smf_themeInfo = {
	2701: {
		name: 'Red Clique',
		desc: '<span style="color: green;" class="bbc_color"><span style="font-size: 14pt;" class="bbc_size">Red Clique</span></span><br /><hr /><strong> By : Ricky. |&nbsp; <a href="http://ifandbut.com/talk/index.php?topic=580.0" class="bbc_link" target="_blank">Theme Support</a>&nbsp; | <a href="http://custom.simplemachines.org/themes/index.php?action=profile;u=34192" class="bbc_link" target="_blank">My More Themes</a> </strong><br /><br />A beautiful sleek theme for SMF with classic combination of red and grey shades. Suitable for all kinds of communities. This theme has centered logo which is asked by many community members, giving their logo a prominent place in header. Logo can be changed from Admin panel and so do other features like custom copyright&nbsp; in footer, terms and condition page link etch. <br /><br /><span style="color: green;" class="bbc_color"><span style="font-size: 14pt;" class="bbc_size">Features</span></span><br /><hr /><ul class="bbc_list"><li>A fluid width theme, change width as per your need.</li><li>Centered logo - can be changed from admin panel,</li><li>Gray and Red modern combination with classic feel</li><li>Utilizing CSS3 supported by all modern browser</li><li>Allows you to add custom copyright in footer</li><li>Allows you add custom Privacy, Terms and Contact us link</li></ul><br /><span style="color: green;" class="bbc_color"><span style="font-size: 14pt;" class="bbc_size">Admin Panel Features</span></span><br /><hr />Goto<br /><strong>Admin --&gt; Configuration --&gt; Current Theme</strong><br /><br /><br /><br /><span style="color: green;" class="bbc_color"><span style="font-size: 14pt;" class="bbc_size">Some Screenshots</span></span><br /><hr /><div align="center"><br /><img src="http://www.simplemachines.org/community/index.php?action=dlattach;topic=499770.0;attach=217813;image" alt="" width="540" class="bbc_img resized" /><br /><br /><br /><img src="http://www.simplemachines.org/community/index.php?action=dlattach;topic=499770.0;attach=217815;image" alt="" width="540" class="bbc_img resized" /><br /><br /><br /><img src="http://www.simplemachines.org/community/index.php?action=dlattach;topic=499770.0;attach=217817;image" alt="" width="540" class="bbc_img resized" /><br /><br /></div><br /><span style="color: green;" class="bbc_color"><span style="font-size: 14pt;" class="bbc_size">License</span></span><br /><hr />Please see included license.txt for more information. However, in short , you are free to use and modify theme unless you follow terms mentioned in license.txt included in theme package. <br /><br /><br /><span style="color: green;" class="bbc_color"><span style="font-size: 14pt;" class="bbc_size">Updates</span></span><br /><hr /><br />16/03/2013 : Made new Icons , making it more suitable for just any kind of community.<br /><br /><br /><span style="color: green;" class="bbc_color"><span style="font-size: 14pt;" class="bbc_size">In the Last</span></span><br /><hr />If you use my theme and liked it then kindly give your <a href="http://ifandbut.com/talk/index.php?topic=580.0" class="bbc_link">comment or atleast saying thanks</a> can be really helpful and encouraging.<br />',
		file: 'red-clique.tar.gz',
		author: 'Ricky.'
	},
	2761: {
		name: 'Possible',
		desc: '<div align="center"><strong>Possible</strong><br /><em>by <a href="http://www.bryandeakin.com" class="bbc_link" target="_blank">Bryan Runic Deakin</a></em><br /><br />Possible is a simply flat style theme, using soothing greens to create a unique and pleasant professional layout.<br /><br />The theme includes:<br /><br />* Custom Copyright<br />* Social Media Icons<br />* Physical Address List<br />* Privacy, ToS and Contact Editable Links<br />* and many more features!<br /><br />As this theme uses CSS3 it may not work well in all browsers.<br /><br />Basic support will be given on the SMF Support Topic, but please contact us through the bryandeakin.com for more direct and friendlier one on one support.&nbsp; Please do not private message anyone on this site for assistance.<br /><br /><strong>Why Not Visit:</strong> <a href="http://www.bryandeakin.com" class="bbc_link" target="_blank">Bryan Deakin dot Com</a><br /><strong>Live Demo:</strong> <a href="http://demo.bryandeakin.com" class="bbc_link" target="_blank">Bryan Deakin dot Com Demo Site</a><br /></div>',
		file: 'possible.zip',
		author: 'pouvik'
	},
	2760: {
		name: 'Redmed',
		desc: 'RedMed Theme | Free Themes<br /><br />Utilizing CSS3 supported by all modern browser<br /><br /><strong>License - Read included text file.</strong><br /><br /><strong>License </strong>in brief, you can make any changes to this theme to fit your needs, however under no circumstance are you allowed to make any changes to the copyright link.<br /><br /><br /><img src="http://s27.postimg.org/bcpozzhpv/redmed.png" alt="" width="566" height="500" class="bbc_img resized" /><br /><br />Theme owner by <a href="http://www.omernarin.com" class="bbc_link" target="_blank">http://www.omernarin.com</a> | nRn',
		file: 'Redmed_v01.zip',
		author: 'Sh@rp'
	},
	2758: {
		name: 'Charity',
		desc: '<div align="center"><strong>Charity</strong><br /><em>by <a href="http://www.bryandeakin.com" class="bbc_link" target="_blank">Bryan Runic Deakin</a></em><br /><br />Charity is a simply flat style theme, using pastel colors to create a unique and pleasant professional layout.<br /><br />The theme includes:<br /><br />* Custom Copyright<br />* Social Media Icons<br />* Physical Address List<br />* Privacy, ToS and Contact Editable Links<br />* and many more features!<br /><br />As this theme uses CSS3 it may not work well in all browsers.<br /><br />Basic support will be given on the SMF Support Topic, but please contact us through the bryandeakin.com for more direct and friendlier one on one support.&nbsp; Please do not private message anyone on this site for assistance.&nbsp; A big thank you to K@ for releasing this theme in my absence!<br /><br /><strong>Why Not Visit:</strong> <a href="http://www.bryandeakin.com" class="bbc_link" target="_blank">Bryan Deakin dot Com</a><br /><strong>Live Demo:</strong> <a href="http://demo.bryandeakin.com/index.php" class="bbc_link" target="_blank">Bryan Deakin dot Com Site</a></div>',
		file: 'charity.zip',
		author: 'pouvik'
	},
	552: {
		name: 'Extreme Blue',
		desc: 'demo : <a href="http://www.smfdesign.net/" class="bbc_link" target="_blank">www.smfdesign.net</a><br />',
		file: 'Extreme_Blue.zip',
		author: 'Fussilet'
	}
};
var smf_featured = 2701;
var smf_random = 552;
var smf_latestThemes = [2761, 2760, 2758];
function smf_themesMoreInfo(id)
{
	window.smfLatestThemes_temp = document.getElementById("smfLatestThemesWindow").innerHTML;

	// !!! Why not just always auto?
	document.getElementById("smfLatestThemesWindow").style.overflow = "auto";
	setInnerHTML(document.getElementById("smfLatestThemesWindow"),
	'\
		<h3 style="margin: 0; padding: 4px;">' + smf_themeInfo[id].name + '</h3>\
		<h4 style="margin: 0;padding: 4px;"><a href="http://custom.simplemachines.org/themes/index.php?lemma=' + id + '">View Theme Now!</a></h4>\
		<div style="overflow: auto;">\
			<img src="http://custom.simplemachines.org/themes/index.php?action=download;lemma='+id+';image=thumb" alt="" style="float: right; margin: 10px;" />\
			<div style="padding:8px;">' + smf_themeInfo[id].desc.replace(/<a href/g, '<a href') + '</div>\
		</div>\
		<div style="padding: 4px;" class="smalltext"><a href="javascript:smf_themesBack();void(0);">(go back)</a></div>');
}

function smf_themesBack()
{
	document.getElementById("smfLatestThemesWindow").style.overflow = "";
	setInnerHTML(document.getElementById("smfLatestThemesWindow"), window.smfLatestThemes_temp);
	window.scrollTo(0, findTop(document.getElementById("smfLatestThemesWindow")) - 10);
}

window.smfLatestThemes = '\
	<div id="smfLatestThemesWindow">\
		<div>\
			<img src="http://www.simplemachines.org/smf/images/themes.png" width="102" height="98" style="float: right; margin: 0 0 10px 10px;" alt="(package)" />\
			<ul style="list-style: none; padding: 0; margin: 0 0 0 5px;">';
for(var i=0; i < smf_latestThemes.length; i++)
{
	var id_theme = smf_latestThemes[i];
	window.smfLatestThemes += '\
				<li style="list-style: none;"><a href="javascript:smf_themesMoreInfo(' + id_theme + ');void(0);">' + smf_themeInfo[id_theme].name + ' by ' + smf_themeInfo[id_theme].author + '</a></li>';
}

window.smfLatestThemes += '\
			</ul>';
if ( smf_featured !=0 || smf_random != 0 )
{

	if ( smf_featured != 0 )
		window.smfLatestThemes += '\
				<h4 style="padding: 4px 4px 0 4px; margin: 0;">Featured Theme</h4>\
				<p style="padding: 0 4px; margin: 0;">\
					<a href="javascript:smf_themesMoreInfo('+smf_featured+');void(0);">'+smf_themeInfo[smf_featured].name + ' by ' + smf_themeInfo[smf_featured].author+'</a>\
				</p>';
	if ( smf_random != 0 )
		window.smfLatestThemes += '\
				<h4 style="padding: 4px 4px 0 4px;margin: 0;">Theme of the Moment</h4>\
				<p style="padding: 0 4px; margin: 0;">\
					<a href="javascript:smf_themesMoreInfo('+smf_random+');void(0);">'+smf_themeInfo[smf_random].name + ' by ' + smf_themeInfo[smf_random].author+'</a>\
				</p>';
}
window.smfLatestThemes += '\
		</div>\
	</div>';

function findTop(el)
{
	if (typeof(el.tagName) == "undefined")
		return 0;

	var skipMe = in_array(el.tagName.toLowerCase(), el.parentNode ? ["tr", "tbody", "form"] : []);
	var coordsParent = el.parentNode ? "parentNode" : "offsetParent";

	if (el[coordsParent] == null || typeof(el[coordsParent].offsetTop) == "undefined")
		return skipMe ? 0 : el.offsetTop;
	else
		return (skipMe ? 0 : el.offsetTop) + findTop(el[coordsParent]);
}

function in_array(item, array)
{
	for (var i in array)
	{
		if (array[i] == item)
			return true;
	}

	return false;
}