	$(document).ready(function(){

		$('.adflash a').flash(
			{ height: 95, width: 134 },
			{ version: 8 },
			function(htmlOptions) {
				$this = $(this);
				htmlOptions.src = $this.attr('href');
				$this.before($.fn.flash.transform(htmlOptions));
				$this.hide();
			}
		);	
	
		$.sifr({ path: 'themes/plussixtyone/swf/', save: true  });
		
		$('#menu-large dt').sifr({ font: 'helvetica', fontSize: '100px', color: '#ffffff', link: "#FF005B", hover: "#FF005B", underline: false });
		$('#menu-small dt').sifr({ font: 'helvetica', color: '#ffffff', link: "#FF005B", hover: "#FF005B", underline: false });
		$('#menu-section dt.light').sifr({ font: 'helvetica', color: '#ffffff', link: "#FF005B", hover: "#FF005B", underline: false });
		$('#menu-section dt.dark').sifr({ font: 'helvetica', color: '#3f3f3f', link: "#757579", hover: "#ffffff", underline: false });
		$('#menu-section-alt dt.light').sifr({ font: 'helvetica', fontSize: '13px', color: '#049DD7', link: "#049DD7", hover: "#FF005B", underline: false });
		$('#menu-section-alt dt.dark').sifr({ font: 'helvetica', fontSize: '13px', color: '#757579', link: "#757579", hover: "#FF005B", underline: false });
		$('h2').sifr({ font: 'helvetica', color: '#FF005B', link: "#FF005B", hover: "#757579", underline: false });
		$('h3').sifr({ font: 'helvetica', fontSize: '14px', color: '#ffffff', link: "#FF005B", hover: "#FF005B", underline: false });
		$('h6').sifr({ font: 'helvetica', fontSize: '22px', color: '#ffffff', width: 500 });
		
		$(".show-beauty").click(function(){
			$('div.image-block img').filter(".active").hide();
		});
		
		$(".changemenu").click(function(){
			$('#menu-top dt.active').removeClass("active").addClass("standard").sifr({unsifr: true});
			$('#menu-top dt.standard').sifr({ font: 'helvetica', fontSize: '100px', color: '#757579', link: "#ffffff", hover: "#757579", underline: false });			
		});
				
		$("div.image-block img").removeAttr("alt")
								
	});
	
	

	
	function addHover(e) {
				
		var poTitle = $(this).attr("title");
		var poHref = $(this).attr("href");
		var poRel = $(this).attr("rel");
		var poClass = $(this).attr("class");
		//var poRandomnId = "imageHover-"+Math.floor(Math.random()*11)
		var poRandomnId = "imageHover";
		
		var x = (e.pageX) - 90;
		var y = (e.pageY) - 170;
				
		$("dt img.over").addClass("hide");
		$("dt img.out").removeClass("hide");
		
		var temp = new Array();
		temp = poClass.split(' ');
		
		if ( temp[0] != "" ) {
			foreach(temp);
		}			
				
		$("div.image-hover").remove();
		$("#body-wrap").append("<div id="+poRandomnId+" class='image-hover' style='position: absolute; top:"+y+"px; left:"+x+"px;'><a href='"+poHref+"''><img src='"+poRel+"' /></a><span><a href='"+poRel+"' title='"+poTitle+"'>"+poTitle+"</a></span></div>");
		//$("#"+poRandomnId+"").fadeIn("fast")
		
		return false;
	}
	
	function removeHover() {
		//$("div.image-hover").fadeOut("fast");
		$("div.image-hover").remove();		
	}

	function foreach(array) {
	  
	  var thismenuitem;
	  
	  for (var n = 0; n < array.length; n++) {

	  $('dt#'+ array[n] +' img.over').removeClass("hide");
	  $('dt#'+ array[n] +' img.out').addClass("hide");

	  }
	  
	}
	
	function show(whichtype) {
		
		$("dt img.over").addClass("hide");
		$("dt img.out").removeClass("hide");
		
		if ( whichtype == "all" ) {
			$('div.image-block a').show();
			$("dt#"+whichtype+" img.over").removeClass("hide");
			$("dt#"+whichtype+" img.out").addClass("hide");
		}
		
		else {
			$("div.image-block a").not("."+whichtype+"").hide();
			$('div.image-block a').filter("."+whichtype+"").fadeIn("fast").css({ display: "block" });	
			$("dt#"+whichtype+" img.over").removeClass("hide");
			$("dt#"+whichtype+" img.out").addClass("hide");		
		}
		
	}
	
	function slideshow(whichway) {
		
		var numImages = $('.imageitem').size();
		var randomImage = Math.floor(Math.random()*numImages);
		
		if ( whichway == "next" ) {
			$("#slideshow-wrap").trigger( 'next' );
		}

		if ( whichway == "prev" ) {
			$("#slideshow-wrap").trigger( 'prev' );
		}

		if ( whichway == "rand" ) {
			$("#slideshow-wrap").trigger( 'goto', [ randomImage ] );
		}
		
		else {
			$("#slideshow-wrap").trigger( 'next' );
		}
		
	}
	
	function loadexpo() {
		window.open( "http://www.madebyexpo.com/" );
	}

