var $jq_old = jQuery.noConflict();
$jq_old(document).ready(function(){

  $jq_old(".lang select").live("change",function(){
    window.location = $jq_old(this).val()
  })

	$jq_old(".accordion").accordion({
		autoHeight: false
	});

	$jq_old('.call ul li .count_a').click(function(){
		$jq_old(".call ul li").removeClass("active");
		$jq_old(this).parent().addClass("active");
		$jq_old(".call ul li ul").hide();
		$jq_old(this).parent().find("ul").show();
	});

	$jq_old(".top_profile .option li:first").hover(
		function () {
			$jq_old(this).find("ul").show();
			$jq_old(this).addClass('active');
		},
		function () {
			$jq_old(this).find("ul").hide();
			$jq_old(this).removeClass('active');
		}
	);

	$jq_old(".top_profile .count .c-2").hover(
		function () {
			$jq_old(".top_profile .count .tip").show();
		},
		function () {

		}
	);

	$jq_old(".top_profile .count .tip").hover(
		function () {

		},
		function () {
			$jq_old(this).hide();
		}
	);

	$jq_old('.step p.txt').each(function(){
	if ($jq_old(this).height() < '26') {
	 $jq_old(this).addClass('one_line');
	}
	if ($jq_old(this).height() > '28') {
	 $jq_old(this).addClass('no_margin');
	}
	})


	$jq_old('.open .feature .slider .close').click(function() {
		$jq_old('.open .feature').hide();
	});



	$jq_old('.star_line').raty({
		width: 140
	});

	$jq_old(".inline").colorbox({inline:true, opacity: 0.7});

	$jq_old("#demo-input-local ,#demo-input-local-tag").tokenInput([
		{id: 7, name: "Ruby"},
		{id: 11, name: "Python"},
		{id: 13, name: "JavaScript"},
		{id: 17, name: "ActionScript"},
		{id: 19, name: "Scheme"},
		{id: 23, name: "Lisp"},
		{id: 29, name: "C#"},
		{id: 31, name: "Fortran"},
		{id: 37, name: "Visual Basic"},
		{id: 41, name: "C"},
		{id: 43, name: "C++"},
		{id: 47, name: "Java"}

	]);

});

$jq_old(function() {
	$jq_old("input.date").datepicker();
});

$jq_old(function(){
	$jq_old('#slides').slides({
		pagination: false,
		next: 'next',
		prev: 'prev',
		slideSpeed: 750,
        play: 10000,
        hoverPause: true,
        animationStart: function(current) {
          $jq_old(".welcome #slider-title").fadeOut(750);
          $jq_old(".welcome #slider-intro").fadeOut(750);
          $jq_old(".welcome #slider-web_address").fadeOut(750);
        },
		animationComplete: function(current) {
		var slide = $("#slide-"+current);
        $jq_old(".welcome #slider-title").html(slide.find("#title").val());
        $jq_old(".welcome #slider-intro").html(slide.find("#intro").val());
        $jq_old(".welcome #slider-web_address").attr("href", slide.find("#web_address").val());
        $jq_old(".welcome #slider-title").fadeIn();
        $jq_old(".welcome #slider-intro").fadeIn();
        $jq_old(".welcome #slider-web_address").fadeIn();
	}
	});
});


