// DOM Ready$(function() {	$('#slides').slides({				preload: true,				preloadImage: 'img/loading.gif',				play: 4000,				fadeSpeed: 550,				slideSpeed: 550,				pause: 2500,				hoverPause: true			});	$('a[href=#logo]').click(function(){	$('html, body').animate({scrollTop:0}, 'slow');    return false;    });	    var $el, leftPos, newWidth;        $mainNav2 = $("#example-two");       /*        EXAMPLE TWO    */        $mainNav2.append("<li id='magic-line-two'></li>");        var $magicLineTwo = $("#magic-line-two");        $magicLineTwo        .width($(".current_page_item_two").width())        .height($mainNav2.height())        .css("left", $(".current_page_item_two a").position().left)        .data("origLeft", $(".current_page_item_two a").position().left)        .data("origWidth", $magicLineTwo.width())        .data("origColor", $(".current_page_item_two a").attr("rel"));                    $("#example-two a").hover(function() {        $el = $(this);        leftPos = $el.position().left;        newWidth = $el.parent().width();        $magicLineTwo.stop().animate({            left: leftPos,            width: newWidth,            backgroundColor: $el.attr("rel")        })    }, function() {        $magicLineTwo.stop().animate({            left: $magicLineTwo.data("origLeft"),            width: $magicLineTwo.data("origWidth"),            backgroundColor: $magicLineTwo.data("origColor")        });        });			  //GALLERY  var galleryItems = $("#content .item a");  var rollImages = $("#content span.rollover");    if(galleryItems.length > 0){    //rollover items    rollImages.css({"display": "none"});    galleryItems.mouseover(function(){      var item = $(this).find(".rollover");      var n = item.queue("fx");      if(n==0){        item.fadeIn();       }    });    galleryItems.mouseleave(function(){      $(this).find(".rollover").fadeOut();    });    // FANCYBOX			$("a.gallery").fancybox({				'opacity'		: false,				'overlayShow'	: false,				'transitionIn'	: 'elastic',				'transitionOut'	: 'elastic',				'titlePosition' 	: 'over',				'hideOnContentClick' : true,				'titlePosition' : 'inside',				'cyclic'	: true	    });  }	    	    /* Kick IE into gear */    $(".current_page_item_two a").mouseenter();		// PRELOADER		$("#content .item").preloadify({        imagedelay: 100,        mode: 'sequency'    });});
