function getId() {
	return document.body.getAttribute('id');
}
function initSlideShow() {	
		var cyclePrefs = {
			fx:      'zoom',
			cleartypeNoBg: true,
			speedIn:  2500, 
			speedOut: 500,
			timeout: 1000, 
			easeIn:  'easeInBounce', 
			easeOut: 'easeOutElastic', 
			sync:     0, 
			delay:   -4000,
			after: explodeEff
		};
		var i = 1, d = 2000;
		function explodeEff() {
			$(this).delay(2000+250*i).effect('explode');
			i=i+1;	 
		}
		$(function() {
			setTimeout(function() {
			if ($.support.opacity) {
				$('#figure img:first').fadeIn(2000, function() {
					$('#figure').cycle(cyclePrefs);
				});
			} else {
				$('#figure').cycle(cyclePrefs);
			}
			}, 2000 );
		});
			
	}
if (getId()=="index" || getId()=="about") {
	setTimeout(function(){
		$('#contentTop').append('<div id="logo"></div>');
		swfobject.embedSWF("../RuneTx.swf", "logo", "220", "160", "9.0.0", {},{}, {wmode: "transparent",quality:"high"});
		}, 100);
	setTimeout(function(){
		$('#contentTop').append('<div id="mag"></div>');
		swfobject.embedSWF("../MagicianTx.swf", "mag", "120", "90", "9.0.0", {},{}, {wmode: "transparent",quality:"high"});
		}, 2000);
		
if (getId()=="index") {
	$( '#figure' ).append('<img alt="rune photo" src="images/home_ssh/2.png" width="290" height="428"><img alt="rune photo" src="images/home_ssh/3.png" width="290" height="428"><img alt="rune photo" src="images/home_ssh/4.png" width="290" height="428">');
	} else if (getId()=="about") {
	$( '#figure' ).append('<img alt="rune photo" src="images/about_ssh/2.png" width="290" height="428"><img alt="rune photo" src="images/about_ssh/3.png" width="290" height="428">');
	}
	initSlideShow();
}
setTimeout(function(){
	$('#contentTop').append('<div id="starzs"></div>');
	swfobject.embedSWF("../stars2.swf", "starzs", "180", "120", "9.0.0", {},{}, {wmode: "transparent",quality:"high"});
	}, 2000);

function initSlideShow2() {	
		var cyclePrefs = {
			fx: 'all',
			timeout: 2000
		};
		$('#ssh').cycle(cyclePrefs);
	}

if (getId()=="gallery" || getId()=="magic-shop") {
	initSlideShow2();
	}
if (getId()=="magic-shop") {
	$('#ssh').click(function() {
		window.location = 'http://www.conjuring-center.com/';
	})
}
var setUpHrefs = function() {
	$('a.cur').click(function(e) {
		e.preventDefault();
	});
}
setUpHrefs();	
