﻿/*::::::::::::::::::::::::::::::::::::::::::::
		Home JS
		Copyright © 2010 McMurry
::::::::::::::::::::::::::::::::::::::::::::*/

(function ($) {
	$(function () {
		// jQuery
		// Marquee
		if ($('#marquee .slide').length > 1) {
			if ($.browser.msie && $.browser.version.substr(0, 1) < 7) {
			} else {
				$.getScript('/Resources/Common/Js/jquery.cycle.all.min.js', function () {
					$('#marquee-wrap').prepend('<div id="marquee-navigation-wrap"><div class="marquee-navigation"></div></div>')
					$('#marquee').cycle({ fx: 'fade', speed: '300', timeout: '7500', pager: '.marquee-navigation', pause: 1 });
					$('#marquee-navigation-wrap .marquee-navigation a:first').addClass('first');
				});
			}
		}
		// News
		$('#content-wrap .contentbtm dl dt, #content-wrap .contentbtm dl dd').hover(function () {
			if ($(this).is('dt')) {
				$(this).addClass('hover').next('dd').addClass('hover');
			} else {
				$(this).addClass('hover').prev('dt').addClass('hover');
			}
		}, function () {
			if ($(this).is('dt')) {
				$(this).removeClass('hover').next('dd').removeClass('hover');
			} else {
				$(this).removeClass('hover').prev('dt').removeClass('hover');
			}
		}).click(function () {
			var u = '#';
			if ($(this).is('dt')) {
				u = $(this).next('dd').find('a').attr('href');
			} else {
				u = $(this).find('a').attr('href');
			}
			window.location = u;
		});
	});
})(jQuery);
