var bannerSpeed = 10000;
$(document).ready(function() {
	$('input[type=checkbox]').css({ border:0, padding: 0, margin: 0, width: 'auto' }); 
	$('input[type=radio]').css({ border:0, width: 'auto' }); 
	$('.specialin:first').show(); 
	$('.indextab:first').show(); 
	
	$('.tooltip').qtip({
	   content: {
			attr: 'title'
		},
	   position: {
		  my: 'top center',  // Position my top left...
		  at: 'bottom center' // at the bottom right of...
	   },
   style: {
      classes: 'ui-tooltip-dark ui-tooltip-rounded'
   }
	});
	
	$('.minplu').click(function() {
		var index = $('.minplu').index(this);
		$(this).toggleClass('minus2');
		$($('.minpludiv')[index]).slideToggle();
		return false;
	});
	
	$('.mpagetabsactive a').not(".back").click(function() {
		var index = $('.mpagetabsactive a').index(this);
		$('.mpagetabsactive a').removeClass('selected');
		$(this).addClass('selected');
		$('.mpagetab').slideUp();
		$($('.mpagetab')[index]).slideDown();
		return false;
	});
	
	if($('select').length > 0)
	{
		$("select").selectBox();
	}

	$('.bulkregistertab:first').show();
	$('.bulkregistertabs a').click(function() {
		var index = $('.bulkregistertabs a').index(this);
		$('.bulkregistertabs a').removeClass('selected');
		$(this).addClass('selected');
		$('.bulkregistertab').slideUp();
		$($('.bulkregistertab')[index]).slideDown();
		return false;
	});
	
	$('.htsep').click(function() {
		var index = $('.htsep').index(this);
		$(this).find('b').toggleClass('minus');
		$($('.hts')[index+1]).slideToggle();
		return false;
	});

	
	$('#indextabs a').click(function() {
		if($(this).attr('href') != 'domainchecker.php')
		{
			var index = $('#indextabs a').index(this)-1;
			$('#indextabs a').removeClass('selected');
			$(this).addClass('selected');
			$('.indextab').slideUp();
			$($('.indextab')[index]).slideDown();
			return false;
			
		}
	});
	
	$('.sss div a').click(function() {
		var index = $('.sss div a').index(this);
		$($('.sss div div')[index]).slideToggle();
		return false;
	});
	
	$('#clientlogin').click(function() {
		$('#loginin').slideToggle(1000, "easeOutBounce", function () {});
	});
	
	$('.ih div.ihin:nth-child(2)').show();

	$(".rinput").rangeinput({
		change: function(e, i) {
			index = $(".rinput").index(this.getInput());
			$('.ih:eq(' + index + ') .ihin').hide();
			$('.ih:eq(' + index + ') .ihin:eq(' + i + ')').show();
		},
		onSlide: function(e, i) {
			index = $(".rinput").index(this.getInput());
			$('.ih:eq(' + index + ') .ihin').hide();
			$('.ih:eq(' + index + ') .ihin:eq(' + i + ')').show();
		}
	});
	

	$(".srinput").rangeinput({
		change: function(e, i) {
			index = $(".srinput").index(this.getInput());
			$('.specialin').hide();
			$('.specialin:eq(' + (i-1) + ')').show();
		},
		onSlide: function(e, i) {
			index = $(".srinput").index(this.getInput());
			$('.specialin').hide();
			$('.specialin:eq(' + (i-1) + ')').show();
		}
	});

	Cufon.replace('#clientlogin span, .clientlogin span, #sepet a span, .ihin h2, .ihtop, .ihprice strong, .ihprice b, .ihprice i, .ihdesc b, #news h2, .footermenu b, #footertwitter b, #footertwitter h1, #ftcontent, #pageleft h1, .indextab h1, #rnews h2, .pricenew, .bulkregistertabs a, .hosting h2, .hosting b, .htspecs h2, .ht div, .htsep, .vps h2, .vps h3, .contact h2, #mpagetop h1, .ticketstep4, #bannernav li a, .cartsteps div b, .mpagecontentin h4, .cartsubheading, .sdetail, .shead, .sname', { fontFamily: 'Ubuntu Condensed' });
	Cufon.replace('#menu a, .ihlinks a, .lsin h2, .indexbutton, .rmenu h2, .hostingbottom a, .button, .contactsend, .mpanelhead b, .mpagecontentin h5, .chead b, .autocalibri, .ticketuser strong, .speprice', { fontFamily: 'Calibri' });
	Cufon.replace('.ihprice span', { fontFamily: 'Bebas Neue' });

	$('#ticker').cycle({ 
		fx:     'scrollUp', 
		cleartypeNoBg: true,
		timeout: 4000
	});
	
	$('#rnewsin').cycle({ 
		cleartypeNoBg: true,
		fx:     'scrollVert', 
		prev:   '#rsnewsprev', 
		next:   '#rsnewsnext',
		timeout: 4000
	});
	
	$('#tweets').cycle({ 
		cleartypeNoBg: true,
		fx:     'scrollVert', 
		timeout: 4000
	});

	$('.news').cycle({ 
		fx:     'scrollHorz', 
		prev:   '#newsprev', 
		next:   '#newsnext',
		timeout: 4000
	});


	$('#banner').cycle({ 
		fx:     'fade', 
		cleartypeNoBg: true,
		timeout: bannerSpeed,
		pager:  '#bannernav', 
		prev:   '#bannerprev', 
		next:   '#bannernext',
		pagerAnchorBuilder: function(idx, slide) { 
			// return selector string for existing anchor 
			return '#bannernav li:eq(' + idx + ') a'; 
		} 
	});
	
	
	$('.hosting ul li:even').addClass('row1');

	$('.datatable tr:even').addClass('row1');
	$('.datatable tr').mouseover(function() {
		$(this).addClass('over');
	}).mouseout(function() {
		$(this).removeClass('over');
	});

	$('.data tr:even').addClass('row1');
	$('.data tr').mouseover(function() {
		$(this).addClass('over');
	}).mouseout(function() {
		$(this).removeClass('over');
	});

/*
*/
});


