/**
 * exchange headlines.
 */
$(document).ready(function() {
	if (($.browser.msie == false) || ($.browser.version != '6.0')) {
		var target = $('h1.contentHeadline');
		target.each(function(i) {
					var text = $(this).text();
					if (text == '') {
						return;
					}
					text = text.replace(/& /g, '%26 ');
					swfobject.embedSWF("../../flash/h1.swf", this, "920", "32",
							"9", null, {
								text : text
							}, {
								allowscriptaccess : "sameDomain",
								bgcolor : "#000",
								wmode : "transparent"
							});
				});
		target = $('div#siteContent h2');
		target.each(function(i) {
					var text = $(this).text();
					if (text == '') {
						return;
					}
					text = text.replace(/& /g, '%26 ');
					swfobject.embedSWF("../../flash/h2.swf", this, "880", "25",
							"9", null, {
								text : text
							}, {
								allowscriptaccess : "sameDomain",
								bgcolor : "#000",
								wmode : "transparent"
							});
				});
		target = $('div.authenticationHead h2');
		target.each(function(i) {
					var text = $(this).text();
					if (text == '') {
						return;
					}
					swfobject.embedSWF("../../flash/h2.swf", this, "880", "25",
							"9", null, {
								text : text
							}, {
								allowscriptaccess : "sameDomain",
								bgcolor : "#000",
								wmode : "transparent"
							});
				});
		target = $('div.storeContentDescription div h2');
		target.each(function(i) {
					var text = $(this).text();
					if (text == '') {
						return;
					}
					text = text.replace(/& /g, '%26 ');
					swfobject.embedSWF("../../flash/h2_338px.swf", this, "338",
							"25", "9", null, {
								text : text
							}, {
								allowscriptaccess : "sameDomain",
								bgcolor : "#000",
								wmode : "transparent"
							});
				});
	}
});

function openThickboxFromMainMood(imgNo, coll) {
	uri = "/cg/theme-details.jsp?locale="
			+ loc
			+ "&URL=/cg/img/popup_images_startMovie/"
			+ coll
			+ "/"
			+ imgNo
			+ ".jpg&width=675&height=500&minus=25&TB_iframe=true&TB_transparent=true";
	tb_show('thickbox', uri);
}

function popup(file, name, width, height, i1, i2, i3) {

	uri = file;

	if (uri.indexOf('?') > -1) {
		uri += "&";
	} else {
		uri += "?";
	}
	// uri += "width=" + (width-29) + "&height=" + (height-12) +
	// "&TB_iframe=true&TB_transparent=true";
	uri += "width=" + (width) + "&height=" + (height + 25)
			+ "&TB_iframe=true&TB_transparent=true";
	tb_show('', uri);
}
