$(document).ready(function(){
 
    $("ul.subnav").parent().append("<span></span>");
	
    $("ul.topnav li span").click(function() { 
		
        $(this).parent().find("ul.subnav").slideDown('fast').show();
 
        $(this).parent().hover(function() {
        }, function(){	
	        $(this).parent().find("ul.subnav").slideUp('slow');
        });
 
        }).hover(function() { 
	        $(this).addClass("subhover");
        }, function(){
	        $(this).removeClass("subhover");
    });
 
});

$(window).bind("load", function() { 

	$("div#mygallery").slideViewerPro({ 
		thumbs: 3,  
	    thumbsPercentReduction: 20, 
	    galBorderWidth: 0, 
	    thumbsTopMargin: 10, 
	    thumbsRightMargin: 10, 
	    thumbsBorderWidth: 5, 
	    thumbsActiveBorderOpacity: 0.8, 
	    thumbsBorderOpacity: 0, 
	    buttonsTextColor: "#000000", 
	    autoslide: true,  
	    typo: false 
    });

	$("div#myprojects").slideViewerPro({ 
		thumbs: 2,
	    thumbsPercentReduction: 20, 
	    galBorderWidth: 0, 
	    thumbsTopMargin: 10, 
	    thumbsRightMargin: 10, 
	    thumbsBorderWidth: 5, 
	    thumbsActiveBorderOpacity: 0.8, 
	    thumbsBorderOpacity: 0, 
	    buttonsTextColor: "#000000", 
	    autoslide: true,  
	    typo: false 
    });
}); 
