//Call function when the dom is ready
$.basehref = '/design/channel/sbs6/';

$(function() {
//global scripts & behaviors
$.include($.basehref+'js/menu-behaviors.js');
$.include($.basehref+'js/g-behaviors.js', 
	[ 
		$.include($.basehref+'js/jquery.media.js'),
		$.include($.basehref+'js/jquery.metadata.js'),
		$.include($.basehref+'js/jquery.thickbox.js')
    ] 
);

//epg scripts & behaviors	
if ( $('body.epg').length > 0 )
$.include($.basehref+'js/epg-behaviors.js', 
	[ 
		$.include($.basehref+'js/jquery.scrollTo.js')
    ] 
);

//gallery scripts & behaviors	
if ( $('.photo-gallery').length > 0 )
$.include($.basehref+'js/gallery-behaviors.js', 
	[ 
		$.include($.basehref+'js/jquery.gallery.js')
    ] 
);

//smack the body back in shape (IE 6 rendering bug)
if ( $.browser.msie && ($.browser.version < 7.0 ) )
$("body").addClass("smack");


});
