$(document).ready(function(){
	$("div.embed").each(function(){
		var source = $(this).attr("className").match( /sourceid(\d+)/ );
		source = source[1];
		var attr = null;
		if ( source == 2 ) {
			attr = { width: '448px', height: '340px' };
		} else if ( source == 3 ) {
			attr = { width: '448px', height: '340px' };
		} else if ( source == 4 ) {
			attr = { width: '398px', height: '270px' }; 
		} else if ( source == 5 ) {
			attr = { width: '478px', height: '358px' }; 
		} else if ( source == 6 ) {
			attr = { width: '448px', height: '364px' }; 
		} else if ( source == 16 ) {
			attr = { width: '170px', height: '375px' }; 
		} else if ( source == 17 ) {
			attr = { width: '448px', height: '340px' };
		} else if ( source == 18 ) {
			attr = { width: '448px', height: '340px' };
		} else if ( source == 19 ) {
			attr = { width: '432px', height: '268px' }; 
		}
		if ( attr ) {
			$(this).append(
				$('<img>')
					.attr( 'src', 'http://static.adult-realm.com/graphics/blank.gif' )
					.css( { position: 'absolute', top: '0px', left: '0px', cursor: 'pointer', zIndex: '1000' } )
					.css( attr )
					.click(function(){
						var w=810;
						var h=495;
						var l=(screen.width/2)-(w/2);
						var t=(screen.height/2)-(h/2);
						var win = window.open(
							'http://www.livejasmin.com/freechat.php?random&pstour=t2&'+
							'psprogram=REVS&template=freechat3&6cam&pstool=15_2&psid=gbxyg6',
							'PerformerBox', 'toolbar=yes,resizable=yes,scrollbars=yes,width='+w+',height='+h+',left='+l+',top='+t
							);
						})
					);
		}
	});
});

function bookmark(url,title) {
	if (!url) url = "http://www.adult-realm.com";
	if (!title) title = "Adult Realm - over 150 movies each day";
	if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) 
		window.sidebar.addPanel(title,url,"");
	else if (typeof window.external == "object") 
		window.external.AddFavorite(url,title);
	else if (window.opera && document.createElement)
	{
		var a = document.createElement('A');
		if (!a) return false; //IF Opera 6
		a.setAttribute('rel','sidebar');
		a.setAttribute('href',url);
		a.setAttribute('title',title);
		a.click();
	} else {
		alert( "Hit [Ctrl] + D to bookmark" );
	} 
	return false;
}

