// JavaScript Document



// Target IE6 and below and redirect
if ($.browser.msie && $.browser.version <= 6 ) 
$(window.location).attr('href', 'includes/ie6/upgrade-browser.html');
// end ie6 redirect



$(document).ready(function() { 





/* IE7 hack : reverses z-index page order so that ie7 shows flyout menu on top*/
$(function() {
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});
// end*/






	







/*						   
if (!$.browser.webkit) {
	
	$("#content-wrapper").corner("5px bl br cc:#65BAF0");
	$("#footer-wrapper").corner("5px  cc:#FFF");
	$(".mongrel").corner("5px cc:#333333");
	$(".menu-tab").corner("5px tl tr cc:#333333");
	$(".mongrel-content-box").corner("5px cc:#FFF");


	$(".dateblock").corner("5px cc:#FFF");
	
}
*/

jQuery('.festivalnews_container').hover(function(){
    $(this).stop().animate({backgroundColor: '#E1E1E1'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#FFF'}, 500);
});


jQuery('.eventlist_container').hover(function(){
    $(this).stop().animate({backgroundColor: '#CCC'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#E1E1E1'}, 500);
});




jQuery('.submit').hover(function(){
    $(this).stop().animate({backgroundColor: '#ABD574'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#8CC43D'}, 500);
});

	
jQuery('#nav a').hover(function(){
    $(this).stop().animate({backgroundColor: '#ADFF2D'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#29292B'}, 500);
});


jQuery('#nav a.home').hover(function(){
    $(this).stop().animate({backgroundColor: '#5A5A5A'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#999999'}, 500);
});
	

jQuery('#nav a.whats-on').hover(function(){
    $(this).stop().animate({backgroundColor: '#8AC841'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#AED97C'}, 500);
});


jQuery('#nav a.news').hover(function(){
    $(this).stop().animate({backgroundColor: '#D55508'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#F57111'}, 500);
});


jQuery('#nav a.exhibitors').hover(function(){
    $(this).stop().animate({backgroundColor: '#CB8C00'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#F9B900'}, 500);
});


jQuery('#nav a.gallery').hover(function(){
    $(this).stop().animate({backgroundColor: '#038190'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#009CAF'}, 500);
});
	

jQuery('#nav a.show-info').hover(function(){
    $(this).stop().animate({backgroundColor: '#940D4A'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#CC1264'}, 500);
});

jQuery('#nav a.mongrel-sub').hover(function(){
    $(this).stop().animate({backgroundColor: '#8AC841'}, 100);
}, function() {
    $(this).stop().animate({backgroundColor: '#AED97C'}, 500);
});



$('#nav li').hover(  
         function () {  
             //show its submenu  
            $('ul', this).fadeIn(300);

         },  
         function () {  
             //hide its submenu  
             $('ul', this).fadeOut(200);           
         }  
     );






/*
if ($.browser.webkit) {
 
$('.mongrel').corner({
     tl: { radius: 5 },
     tr: { radius: 5 },
     bl: { radius: 5 },
     br: { radius: 5 }

});

$('.mongrel-content-box').corner({
     tl: { radius: 5 },
     tr: { radius: 5 },
     bl: { radius: 5 },
     br: { radius: 5 }

});



$('.header-a').corner({
     tl: { radius: 5 },
     tr: { radius: 5 },
     bl: { radius: 5 },
     br: { radius: 5 }

});

}

*/




	
	
	
	
$("input").focus(function () { 
         $(this).parents('div.textboxcorners').css('background-color', '#FFF'); 
		 $(this).css('background-color', '#FFF'); 
    });
$("input").blur(function () { 
         $(this).parents('div.textboxcorners').css('background-color', '#F3F3F3'); 
		 $(this).css('background-color', '#F3F3F3'); 
    });
	
$("textarea").focus(function () { 
         $(this).parents('div.textboxcorners').css('background-color', '#FFF'); 
		 $(this).css('background-color', '#FFF'); 
    });	

$("textarea").blur(function () { 
         $(this).parents('div.textboxcorners').css('background-color', '#F3F3F3'); 
		 $(this).css('background-color', '#F3F3F3'); 
    });	





$("input.submit").focus(function () { 
         $(this).parents('span.submitcorners').css('background-color', '#999'); 
		 $(this).css('background-color', '#8CC43D'); 
		 $(this).css('color', '#FFF');
    });	
$("input.submit").blur(function () { 
         $(this).parents('span.submitcorners').css('background-color', '#9C3'); 
		 $(this).css('background-color', '#8CC43D'); 
		 $(this).css('color', '#FFF'); 
    });	
	

  });









