// For Sitemap navigation and home oage

function showmag(value)
{
		$('#nav_slider_left').empty().html('<font color=white>Loading Content...</font>');
	
	$('#nav_slider_left').load('getmagzine.php?magzine_id='+value);
	

}
$(document).ready(function () {



// Mouse Over
$(function() {
    $("img.over")
        .mouseover(function() { 
            var src = $(this).attr("src").match(/[^\.]+/) + "-hover.jpg";
			
            $(this).attr("src", src);
        })
        .mouseout(function() {
				
					
            var src = $(this).attr("src").replace("-hover", "");
            $(this).attr("src", src);
        });
});
// Sub Naivigation
$(function() {
    $(".home_nav > ul > li")
        .mouseover(function() { 
//            alert("Mouse Over");
$(this).toggleClass('subnavigation_active')
//$(this).corner("round tr, tl 15px");
if ($(this).attr('id') == "magz")
{

// found the Magzines id
}
else
{
if ( $('#nav_slider').is(':visible')){

$('#nav_slider').hide();
$('.body_content').css ("z-index",'1');
} 
}// end of else 
        })
        .mouseout(function() {
				
$(this).toggleClass('subnavigation_active')	
$('.home_nav_li').removeClass("subnavigation_active");	//resting back to normal

//$(this).uncorner();

        });
});



// Naigation Reset

				$('#sitemap_hover').hide();
				$('#nav_slider').corner();
				$('#nav_slider').hide();
//$("#nav_slider").dropShadow();$("#nav_slider").dropShadow();

$('.userlogin').colorbox({innerWidth:'400px', innerHeight:'300px',onClosed:function(){ $(location).attr('href',"index.php"); }
				}

);				

$('#magz').bind('click', function(e) { 
									   $('.body_content').css ("z-index",'-2')
        $('#nav_slider').show('slide', {easing: 'easeOutQuint', direction: 'up'}, 1500);
		
		$("#nav_slider").dropShadow();$("#nav_slider").dropShadow();
		})

$('#nav_slider').bind('mouseleave', function(e) { 

$('#nav_slider').hide('slide', {easing: 'easeOutQuint', direction: 'up'}, 1000,function (){$('.body_content').css ("z-index",'1');});

												 })



$('#sitemaphover').bind('click', function(e) {
        $('.sitemap_hover').toggle('slide', {easing: 'easeOutQuint', direction: 'down'}, 1000);

	
	
});
$('#sitemap_hover').bind('mouseleave', function(e) { 
       $('.sitemap_hover').toggle('slide', {easing: 'easeOutQuint', direction: 'down'}, 1000);

									
		
});


    /*$('#slideshow').cycle({
		fx: 'fade',timeout:8000 // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});*/
	 



				
							});

