
$(window).ready(function(){

	if ($('a[rel]').length>0) {
		$('a[rel]').each(function(){
			$(this).click(function(event){
				event.preventDefault();
			});
		});
	}

        if ($('img[overlay]').length>0) {
		$('img[overlay]').each(function(){
        	$(this).css({'display':'none !important'});
		});
	}
	
});


$(function() {
	$('a[rel]').overlay({
            speed : 'fast',
            fadeInSpeed : 'fast',
            // hide trigger when the overlay is opened
            onBeforeLoad: function() {
                $.each($.browser, function(i, val) {
                 if(i=="msie" && jQuery.browser.version.substr(0,1)=="6")
                    $('select').css({'display':'none'});
                });
                $('img[overlay]').each(function(){
          			$(this).attr('src','');
          			$(this).css({'width':'0'});
            		$(this).css({'height':'0'});   
				});
            },
            onClose: function() {
                $.each($.browser, function(i, val) {
                 if(i=="msie" && jQuery.browser.version.substr(0,1)=="6")
                    $('select').css({'display':'block'});
                });
            }
        });
        
        $("#accordion").tabs("#accordion div.pane", {
			tabs: 'h2', 
			effect: 'slide'
		});
});