// JavaScript Document
$(document).ready(function() {
   $(".roll img").hover(
	 function(){this.src = this.src.replace("-1.","-O.");},
	 function(){this.src = this.src.replace("-O.","-1.");}
	);
	
	$('.dropdown').mouseenter(function(){
		$('.sublinks').stop(false, true).hide();
	
		var submenu = $(this).parent().next();

		submenu.css({
			position:'absolute',
			top: $(this).offset().top + $(this).height() + 'px',
			left: $(this).offset().left + 'px',
			zIndex:10000
		});
		
		submenu.stop().slideDown(300);
		
		submenu.mouseleave(function(){
			$(this).slideUp(300);
		});
	});
	// Pop windows
	 $(".slidingDiv").hide();
        $(".show_hide").show();
    	$('.show_hide').click(function(){
    		$(".slidingDiv").slideToggle();
    	});
		
		$(".slidingDiv2").hide();
        $(".show_hide2").show();
    	$('.show_hide2').click(function(){
    		$(".slidingDiv2").slideToggle();
    	});
		
	$("area[rel^='prettyPhoto']").prettyPhoto();
		
		$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'facebook',slideshow:3000, autoplay_slideshow: false});
		$(".gallery:last a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'facebook2',slideshow:10000, hideflash: true});  
		
});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29171884-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
