//global vars
var flash_version = "8.0.0"

//embed flash toolbar
var flashvars = {};
var params = {
	play: "true",
	menu: "false"
};
swfobject.embedSWF("flash/toolbar.swf", "toolbar", "800", "124", flash_version, false, flashvars, params);






//embed you tube video
/*
 	<object width="320" height="265">
		<param name="movie" value="http://www.youtube.com/v/Bg6wdXEasy0&hl=en&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01"></param>
		<param name="allowFullScreen" value="true"></param>
		<param name="allowscriptaccess" value="always"></param>
		<embed src="http://www.youtube.com/v/Bg6wdXEasy0&hl=en&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed>
	</object>
 */
var youtube_path = "http://www.youtube.com/v/Bg6wdXEasy0&hl=en&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01";
var flashvars = {};
var params = {
	allowFullScreen: "true",
	allowscriptaccess: "always",
	menu: "false"
};
var attributes = {
	id: "youtube"
};
swfobject.embedSWF(youtube_path, "youtube_embed", "320", "265", flash_version, false, flashvars, params, attributes);




//embed sewing and fashion flash slideshows
/*
 *  <param name="allowScriptAccess" value="sameDomain" />
	<param name="movie" value="programs/slideshow.swf" />
	<param name="base" value="programs/fashion/images/A/" />
	<param name="quality" value="high" />
	<param name="scale" value="exactfit" />
	<param name="bgcolor" value="#ffffff" />
 */
$(document).ready(function() {
	$('.picFrame > div').each(function() {
		var ss = {
			id: $(this).attr('id').slice(3,4),
			width: $(this).children('img').attr('width'),
			height: $(this).children('img').attr('height')
		};
		
		var flashvars = {};
		var params = {
			allowScriptAccess: "sameDomain",
			base: "programs/fashion/images/" + ss.id + "/",
			quality: "high",
			scale: "exactfit",
			bgcolor: "#ffffff",
			menu: "false"
		};
		var attributes = {};
		
		swfobject.embedSWF("programs/slideshow.swf", this.id, ss.width, ss.height, flash_version, false, flashvars, params, attributes);
	});
	
	
	
	// retrieve rss feed
	$.get('/blog.php', function(data) {
		$('item', data).each(function() {
			var title = $(this).children('title').text();
			var link = $(this).children('link').text();
			var desc = $(this).children('description').text();
			var date = $(this).children('pubDate').text();
			
			var html = "<a href='" + link + "' title='" + desc + "'>" + title + "</a>";
			$('#news').append(html);
		});
	});
	
	
});




var retriveNews