var obj = null;

function checkHover() {
	if (obj) {
		obj.find('ul').fadeOut('fast');	
		obj.find('.Menu').fadeIn("slow");;
	} //if
} //checkHover

function showmodal()
{
	$().dialog({ 
    modal: true, 
    overlay: { 
        opacity: 0.5, 
        background: "black" 
		} 
	});
}
	
$(function() {	
	
	$('#hiden').hide();
	
	$('a#hiden-toggle').click(function() {
	    $('#hiden').toggle(400);
	    return false;
		});
		
		$('.issue').hover(
			function () {
			$('.imageissue').hide();
			var imageid = $(this).attr('alt')
			$('#'+imageid).show();
      }, 
	  
      function () { 
	  	$('.imageissue').hide();
		$('#issuemain').show();}
    );


	showInfoModal('getinfo','850px');
       
/*	$(".thumbnails-box a").fancybox(); 
	$(".thumbnails-box a").fancybox({ 'hideOnContentClick': true }); 
	$(".thumbnails-box a").fancybox({ 'zoomSpeedIn': 1000, 'zoomSpeedOut': 1000, 'overlayShow': true }); 
	$('#carousel-cb04').jcarousel({});
	$('#carousel-cb05').jcarousel({});
	$('#carousel-cb06').jcarousel({});
	$('#carousel-cb07').jcarousel({});
	$('#carousel-cb08-car').jcarousel({});
	$('#carousel-cb08-med').jcarousel({});
*/
	$('.intmenue').click(
      function () {
      	$('.intmenue').css({"color":""})
      	$('.intmenue').css({"font-size":""})
      
        $(this).css({"color":"black","font-size":"1.2em"});
        var section = $(this).attr('name')
        
        $('.sec').hide()
        $('#'+section).slideDown()
      }
	)
	
	$('ul.sf-menu').superfish();	
});


function showInfoModal(element, wsize)
{
	if($('#'+element).length == 0)
		return
		
	$.blockUI({ 
		 message: $('#'+element), 
		css: {  
        padding:        10, 
        margin:         0, 
        width:          wsize,  
        top:            '15%',  
        left:           '15%',  
        textAlign:      'center',  
        color:          '#000',  
        border:         '3px solid #333', 
        backgroundColor:'#FCFFF7', 
        cursor:         'crosshair' 
    }, 
     
    // styles for the overlay 
    overlayCSS:  {  
        backgroundColor:'#000',  
        opacity:        '0.6'  
    }, 
     
    // z-index for the blocking overlay 
    baseZ: 1000, 
     
    // set these to true to have the message automatically centered 
    centerX: true, // <-- only effects element blocking (page block controlled via css above) 
    centerY: true, 
     
    // allow body element to be stetched in ie6; this makes blocking look better 
    // on "short" pages.  disable if you wish to prevent changes to the body height 
    allowBodyStretch: true, 
     
    // be default blockUI will supress tab navigation from leaving blocking content; 
    constrainTabKey: true, 
     
    // fadeOut time in millis; set to 0 to disable fadeout on unblock 
    fadeOut:  400, 
     
    // suppresses the use of overlay styles on FF/Linux (due to significant performance issues with opacity) 
    applyPlatformOpacityRules: true 

		   }); 
    
		$('#' +element +' #close').click(function() { 
            $.unblockUI(); 
            return false; 
        }); 
	
		$('#more').click(function() { 
             $.unblockUI(); 
            return false; 
        }); 
}
     
     
function toggleSection(section)
{
	$('#'+section).toggle(
      function () {
        $(this).css({"backgroundcolor":"blue"});
      },
      function () {
        $(this).css({"backgroundcolor":"red"});
      },
      function () {
        $(this).css({"backgroundcolor":""});
      }
	)
}



