$(document).ready(function () {
		/* Let JUniform Start */
			$("select, input:checkbox, input:radio, input:file").uniform();
			
		/* Navigation Href */
			$(".makeLink").click(function () {
				window.open($(this).attr('href'),'_self');
			});		
			
		/* Replace Text Inputs */
			$(".replaceText").focus(function () {
				var currentValue = $(this).val();
				var orgValue = $(this).attr("orgValue");
				if (currentValue == orgValue)
					$(this).val("");
			}).blur(function () {
				var orgValue = $(this).attr("orgValue");				
				if ($(this).val() == "")
					$(this).val(orgValue);
			});									
			
		/* Promo Slider */
			$('ul.slidingList').each(function (i, e) {
				var getMode = $(this).parent(".sliderContent").attr("mode");
				var getQuantity = $(this).parent(".sliderContent").attr("quantity");
				var slideType = $(this).parent(".sliderContent").attr("slideType");
				var getInfiniteLoop = $(this).parent(".sliderContent").attr("infiniteLoop");
				
				if (slideType == "false")
					slideType = false;
				else
					slideType = true;

				if (getInfiniteLoop == "false")
					getInfiniteLoop = false;
				else
					getInfiniteLoop = true;					
				
				var slider = new Array();
				slider[i] = $(e).bxSlider({
					mode: getMode,
					displaySlideQty: getQuantity,
					captions: true,
					auto: slideType,
					infiniteLoop: getInfiniteLoop,
					hideControlOnEnd: true,
					captionsSelector: '#my-caption',
					pager: true,
					pagerSelector: '#my-pager'
				});
			});		
			
		/* Tabs */
			$(".tabContent").hide();
			$("dl.makeTab dd:first-child").addClass("active").show();
			$(".tabs").find(".tabContent:first").show();
		
			$("dl.makeTab dd").click(function() {
				$(this).parent().find('dd').removeClass("active");
				$(this).addClass("active");
				$(this).parents('.tabs').find(".tabContent").hide();
		
				var activeTab = $(this).attr("href");
				$(activeTab).show();
				return false;
			});		
			
		/* TipBox */
			$(".toggleTip").bind("mouseenter",function() {		
				$(this).children(".tipBox").fadeIn(200);
			}).bind("mouseleave",function() {
				$(this).children(".tipBox").fadeOut(300);
			});
			
		/* */
			$(".whereIam .dotted").width(948 - $(".whereIam .where").width());
		
		/* Login */
			$(".loginBox").click(function() {
				$(".login").addClass("loginActive");
				$(".loginForm").fadeIn(200);; return false;
			});
			$(document).click(function() {
				$(".login").removeClass("loginActive");
				$(".loginForm").hide();;
			});
			$(".loginForm").click(function(e) {
				e.stopPropagation();
			});		

});
