//首页js文件
//index.asp
jQuery(function(){
	//jQuery('.SearchMain input:checkbox').checkBox();
	//图片切换
	jQuery('#FocusPic').before('<div id="FocusPicNav">').cycle({
		fx:'fade',
		//speed:  'fade',
        timeout: 6000,
        next:   '#FocusPic',
        pager:  '#FocusPicNav'
    });
	jQuery('#FocusPic img').unbind('click').click(function(){
		var link = jQuery(this).attr("rel");
		if(link){
			window.open(link);
		}	
	});
	
	//隔行换色
	jQuery('#AreaPrice tr:even').addClass('color');
	 
	//搜索标签切换
	jQuery('#SearchTitle > ul').tabs({ selected: 0,disabled: [3]});
	
	//第二个标签点击跳转
	jQuery('#SearchTitle a:eq(1)').click(function(){
		BuyRent = 'Buy';
	});	
	//第三个标签点击跳转
	jQuery('#SearchTitle a:eq(2)').click(function(){
		BuyRent = 'Rent';
	});	
	//第四个标签点击跳转
	jQuery('#SearchTitle a:eq(3)').click(function(){
		window.open(jQuery(this).attr("rel"));
	});	

	
	//荣誉展示	    
	jQuery("#HonorList").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev"
    });	
    (function($){
		$.fn.extend({
			scrollSource:function(){
				return this.each(function(){	
					var self = this, li = $('li',self), len = li.length, curr = 0;
					function start(){
						$('.SourcePic',self).html($('div',li[curr]).html());
						curr ++;
						if(curr>=len){
							curr = 0;
						}
						setTimeout(start,3000);
					}
					start();
				});
			}
		});
	})(jQuery)

	$('#SourceCommend,#SourceHot,#SourceNew,#SourceHits').scrollSource();

});
