
var doltier = {};

(function($){

	doltier.popup = function(url) {
		var popup = window.open(url, 'doltierPopup', 'menubar=yes,toolbar=no,location=yes,status=yes,scrollbars=yes,resizable=yes,width=630,height=800');
		popup.focus();
		//return false;
	}
	
	doltier.popup02 = function(url) {
		var popup02 = window.open(url, 'doltierPopup', 'menubar=yes,toolbar=no,location=yes,status=yes,scrollbars=yes,resizable=yes,width=630,height=500');
		popup02.focus();
		//return false;
	}

	$(document).ready(function(){

		/* set rollover. */
		$('img.over, input.over').rollover({
			suffix: '_over'
		});
		setupGnav();

		/* status current. */
		$('img.current').each(function(){
			this.src = this.src.replace(/^(.+)(\.[a-z]+)$/, '$1_over$2');
		});

		/* open link as '_blank'. */
		$('a[rel=external]').click(function(){					
			window.open(this.href, '_blank');
			return false;
		});

		/* open link in popup. */
		$('a.popup').click(function(){					
			doltier.popup(this.href);
			return false;
		});

		/* fix png for ie6 */
		if ($.browser.msie && parseInt(($.browser.version)) < 7) {
			var img = $('#separator').css('backgroundImage').slice(5, -2);
			$('#separator').css({
				filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+ img +',sizingMethod=scale)',
				backgroundImage: 'none'
			});
		}

		/* Set up Global nav. */
		function setupGnav() {
			/* Set Global nav behavior. */
			$('#gnav > ul > li')
				.hover(
					function(){
						$(this).children('ul').stop(true, true).fadeIn();
					},
					function(){
						$(this).children('ul').stop(true, true).fadeOut();
					}
				)
				.children('ul')
					.css('opacity', 0.95)
					.hide()
				.end()
			;
		}

	});

})(jQuery);



/*
 * jQuery tiny rollover plugin.
 *
 * @param {Object} Several options.
 * @return {Object} jQuery object.
 */
(function(a){a.fn.rollover=function(c){var d="$1"+a.extend({suffix:"_on"},c).suffix+"$2";return a(this).each(function(){var b=new Image;b.src=this.src.replace(/^(.+)(\.[a-z]+)$/,d);a(this).data("rolloverImage",{defaultImage:this.src,hoverImage:b.src}).hover(function(){this.src=a(this).data("rolloverImage").hoverImage},function(){this.src=a(this).data("rolloverImage").defaultImage})})}})(jQuery);



