var DISPLAY_COMING_SOON_SITE = false;  // Change to false to hide coming_soon site

/************************************************************************************************
* Site:
* - name
* - display (if false, "coming_soon" alert box when clicked)
* - _url 
* - class_logo (css class for logo image)
* - type (main | niche)
* - desc (description)
*/
var sites = [
	{name:"meetlocals", display:true, _url:"www.meetlocals.com",class_logo:"meetlocals",type:"main", desc:"Meetlocals.com is taking online dating to another level. Compatible with all mobile phones, you can search and chat with other members in real-time based on where you are. View photos & videos, read profiles, and send up-to-the-second updates directly from your homepage."},	
	
	{name:"WebDate", display:true, _url:"www.webdate.com",class_logo:"webdate",type:"main", desc:"WebDate.com was released in 2002 and is one of the premiere online free dating sites. Using custom dating software, we deliver communication and content quickly and efficiently. Webdate.com was our first online dating community and its platform has proven to be a successful component in developing our other dating sites."},

	{name:"Fling", display:true, _url:"www.fling.com",class_logo:"fling",type:"main", desc:"Spotlighted features include video uploads, real time video chat, and messaging. Fling employs sophisticated software to cater to the high demand of a quickly-growing and extremely active online dating."},
	
	{name:"WealthyMen", display:true, _url:"www.wealthymen.com",class_logo:"wealthymen",type:"main", desc:"WealthyMen.com caters to those seeking an elite dating experience. Designed with exclusivity in mind, the site fully caters to the most affluent singles in the world seeking travel partners across the globe."},	
	
	{name:"BlackFling", display:true, _url:"www.blackfling.com",class_logo:"blackfling",type:"niche", desc:"BlackFling.com is our newest online adult dating site.  At BlackFling.com we bring single Black women and men together in an online atmosphere conducive to dating and building relationships that will last...or not. This is the place to meet sexy black singles. "},

	{name:"Caliente", display:false, _url:"www.caliente.com",class_logo:"caliente",type:"niche", desc:"Caliente.com - coming soon"},	
	
	{name:"GayFling", display:false, _url:"www.gayfling.com",class_logo:"gayfling",type:"niche", desc:"GayFling.com - coming soon"}
];


// Create a <div> element with logo + link to site + description
// if site.display = false, the class "coming_soon" is added
function siteItem(site) {
	var $div = $('<div class="site_desc group"/>'), $a = siteCarousel(site), $p = $('<p class="site_p l">'+site.desc+'</p>');
	
	if(site.display == true) {
		$div.attr('onclick','window.open(\'http://'+site._url+'\',\'_blank\');');
	} else {
		$div.addClass('coming_soon');
	}
	
	
	$a.addClass('l');
	$a.appendTo($div);
	$p.appendTo($div);
	return $div;
}



// Create a <a> element with logo + link to site
// if site.display = false, the class "coming_soon" is added
function siteCarousel(site) {
	var $a = $('<a href="http://'+site._url+'" target="_blank" class="site_logo '+site.class_logo + '" title="Visit '+site.name+'"></a>');
	if(site.display == false) {
		$a.addClass('coming_soon');
	}
	$('<img src="_img/sp.gif"/>').appendTo($a);
	return $a;
}

// Create a <li> element with link to site 
// if site.display = false, the class "coming_soon" is added
function siteList(site) {
	var $li = $('<li/>'), $a = $('<a href="http://'+site._url+'" target="_blank" title="Visit '+site.name+'">'+site._url+'</a>');
	if(site.display==false) {
		$a.addClass('coming_soon');
	}
	$a.appendTo($li)
	return $li;
}


// Populate horizontal carousel of sites
function populateSiteCarousel() {
	var $ul = $('#h_carousel ul'), $li;	
	$.each(sites,function()  {
		if(DISPLAY_COMING_SOON_SITE || (!DISPLAY_COMING_SOON_SITE && this.display == true)) {  
			$li =  $('<li/>');
			siteCarousel(this).appendTo($li);
			$li.appendTo($ul);
		}
	});
}

// Populate list of sites (#main_sites and #niche_sites) 
function populateSiteLists() {
	var $main = $('ul#main_sites'), $niche = $('ul#niche_sites');
	$.each(sites,function()  {
		 if(DISPLAY_COMING_SOON_SITE || (!DISPLAY_COMING_SOON_SITE && this.display == true)) {  	 
			 var $s = siteList(this);
			 if(this.type == "main")  $s.appendTo($main);
			 else 					  $s.appendTo($niche);
		 }
	});
}


// Populate main list of sites (portfolio page)
function populateSiteList() {
	var $list = $('#sites_list');
	$.each(sites,function()  {
		 if(DISPLAY_COMING_SOON_SITE || (!DISPLAY_COMING_SOON_SITE && this.display == true)) {  	
			siteItem(this).appendTo($list);
		 }
	});
}


