$(function () {
        if ($.browser.msie && $.browser.version < 7) return;		
		
		$(".nav").children("li").each(function() {
    		var current = "nav current-" + ($(this).attr("class"));
  			var parentClass = $(".nav").attr("class");
    		if (parentClass != current) {
      			  $(this).children("a").css({backgroundImage:"none"});  
      		}
		});   
		
		attachNavEvents(".nav", "home");
		attachNavEvents(".nav", "about");
		attachNavEvents(".nav", "contact");
		attachNavEvents(".nav", "dolls");
		attachNavEvents(".nav", "shop");
		
		function attachNavEvents(parent, myClass) {
			$(parent + " ." + myClass).mouseover(function() {
				$(this).before('<div class="nav-' + myClass +'"></div>');
				$("div.nav-" + myClass).css({display:"none"}) .fadeIn(300);
			}).mouseout(function() {
				$("div.nav-" + myClass).fadeOut(300, function() {
					$(this).remove();
				});
			});
		}

});

$(function() {
    $('#slideshow').cycle({
        delay: 1000, 
    	timeout: 7000,
   		speed: 500,
		pause: 1
});

   $(".content h2")
        .prepend("<img src='images/ornament_left.png' /> &nbsp;")
        .append("&nbsp; <img src='images/ornament_right.png' />");
});
	
	$(document).ready(function(){
		$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'fast',
		showTitle: false,
		theme: 'light_rounded'
});
		});
