$(document).ready(function() {
	
	$('.dropdown ul li:first-child a').css('border-top', '0');
	$('.dropdown ul li:last-child a').css('border-bottom', 'none');
	
	$('.dropdown h2').click(function() {
	
        
        
        if($(this).next('.list').css('display') ==  'block'){
           $(this).next('.list').fadeOut();
           $(this).children('a').removeClass('up');
                       
        }  else {
        $(this).children('a').addClass('up');
		$(this).next('.list').fadeIn();
        }
	
	});
	/*
	$('#themes li a').hover(function(){
	
		$(this).prev('.tooltip').fadeIn(500);
	
	},function(){
		$(this).prev('.tooltip').fadeOut(100);
	});
	*/
	
	
		// Tooltip that uses #mytip as tooltip element with a custom offset
		$('#themes li').tooltip('#preview',20,20);
		
     //$('#disable').css('opacity','0.5');
     $(window).load(function(){
         
        var h = $(window).height();
        h = h - 60;
        
//If the User resizes the window, adjust the #container height
        $(window).bind("resize", resizeWindow);
        function resizeWindow( e ) {
            var newh = $(window).height();
             newh = newh - 60; 
            //$("#container").css("min-height",  );
            $('#iframe').height(newh)
        }
         

        //alert(h);
        
        $('#iframe').height(h);
        //$('#iframe').height(h).fadeIn();
        //$('#disable').fadeOut();
        $('#styles h2 a').text('More Styles...');
        
        
         
     }) ;
	
	
	
	
});
