jQuery.noConflict();         
blur_logic = 0;
jQuery(document).ready(function($){ 
    
	/*var ops = window.navigator.userAgent;
    var r = ops.indexOf("Mac");
    if(r>=0){
		$(".center .box .new_wedding_list dl").css("width","172px");
	}
	
	$("#pop-m .opacity_bg, #pop-m .close-x").click(function(){
			
			$("#pop-m").hide();
										   
		});*/
	
    $('#wording_img').mouseover(function(){
		 $('#wording_suggestion').show();
	});
	$('#wording_suggestion').mouseover(function(){
		 $('#wording_suggestion').show();
	});
	$('#wording_suggestion').mouseout(function(){
		 $('#wording_suggestion').hide();
	});

	$("#description_layout").mouseover(function(){
				temp_l = $(this).parent().parent().css("z-index");	
				$(this).parent().parent().css("z-index","100000000000000");
				$(this).bind('mouseout', function() {  $(this).parent().parent().css("z-index",temp_l);
    });

												});
	
	$('#search_autocomplete').mouseover(function(){
		blur_logic = 1;
	}).mouseout(function(){
		blur_logic = 0;
	});
	
	$('body').not($('#search')).not($('#preventblur')).click(function(){
		if(blur_logic == 0)
		{
			$('#search_autocomplete').hide();
		}
	});
	/**********  ï¿½ï¿½ï¿½menu	 ******************/

 

	$(".menu1 >ul >li").mouseover( function(){

			

		$(this).css({
			//background: "#FFE9F5"
		});

	});

	$(".menu1 >ul >li").mouseout( function(){

			

		$(this).css({
			//background: "#F1F5F6"
		});

	});

	/**********  facebook banner	 ******************/

	$(".face_book_close_banner").click(function(){ // Compare Menu in Navigator



		close_feedback()

	}); 							

	$(".facebook_open").click(function(){ // Compare Menu in Navigator

          

		open_feedback();

	});

	function close_feedback(){

			 

		$("#facebook_c").animate( {
			width: "0"
		}, {
			queue: false,
			duration: 1000
		} )

		//$("#face_book_banner > .t").animate( { marginRight: "0"}, { queue: false, duration: 1000 } )

		//$("#face_book_banner > .face_book_banner").animate( { marginRight: "0"}, { queue: false, duration: 1000 } )

		$("#facebook_open").toggle(1000);

		$("#facebook_c").hide(1500);
		$("#face_book_banner").css("z-index","1");// ÎªÁËÔÚie7ÏÂ²»¸²¸ÇselectÑ¡Ïî
		$("#face_book_banner").css("width","40px");// ÎªÁËÔÚie7ÏÂ²»¸²¸ÇselectÑ¡Ïî

	}

	function open_feedback(){

			 

		$("#facebook_c").show();

		$("#facebook_c").animate( {
			width: "570px"
		}, {
			queue: false,
			duration: 1000
		} )

		$("#facebook_open").toggle("slow");
		$("#face_book_banner").css({"z-index":"999","width":"570px"});

	}

		

	function delay_close(){

		setTimeout(function(){
			close_feedback()
			},2000);

	}

	$(".nav_imgage").mouseover( function(){

			

		$(this).css({
			opacity: "0.9"
		});

	});

	$(".nav_imgage").mouseout( function(){

			

		$(this).css({
			opacity: "1"
		});

	});

		 

	$("#select_8").change(function(){//Viwe Page --  Bottom Front Wording Options

				

		if($("#select_8").find("option:selected").text().indexOf('Own Text')>=0)$("#enter_text").show();

		else $("#enter_text").hide();

	});

	$("#click_assembly").click(function(){//Viwe Page --  Bottom Front Wording Options

		findDimensions();

		var  WWidth = 438;

		var  WHeight = 619;

		var   WLeft   =   Math.ceil((winWidth   -   WWidth)   /   2  );

		var   WTop   =   Math.ceil((winHeight   -   WHeight)   /   2  );

		if(WLeft<0)WLeft=0;

		if(WTop<0)WTop=0;

		$("#assembly_guide").css({
			left: WLeft,
			top: WTop
		});

		$("#assembly_guide").toggle("slow");

	});

	$("#close_assembly").click(function(){//Viwe Page --  Bottom Front Wording Options

		$("#assembly_guide").toggle("slow");

	});

	var winWidth = 0;

	var winHeight = 0;

	function findDimensions() //ï¿½ï¿½ï¿½ï¿½ï¿½È¡ï¿½ï¿½ï¿½Ú³ß´ï¿?

	{



		//ï¿½ï¿½È¡ï¿½ï¿½ï¿½Ú¿ï¿½ï¿?

		if (window.innerWidth)

			winWidth = window.innerWidth;

		else if ((document.body) && (document.body.clientWidth))

			winWidth = document.body.clientWidth;

		//ï¿½ï¿½È¡ï¿½ï¿½ï¿½Ú¸ß¶ï¿½

		if (window.innerHeight)

			winHeight = window.innerHeight;

		else if ((document.body) && (document.body.clientHeight))

			winHeight = document.body.clientHeight;

		//Í¨ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Documentï¿½Ú²ï¿½ï¿½ï¿½bodyï¿½ï¿½ï¿½Ð¼ï¿½â£¬ï¿½ï¿½È¡ï¿½ï¿½ï¿½Ú´ï¿½ï¿½?

		if (document.documentElement  && document.documentElement.clientHeight && document.documentElement.clientWidth)

		{

			winHeight = document.documentElement.clientHeight;

			winWidth = document.documentElement.clientWidth;

		}

	}

	//*************************

	var b_left=0;//ï¿½ï¿½Ê¼left

	begin_left = b_left; //begin_left Îªï¿½ï¿½Ê¼ï¿½Æ¶ï¿½Ê±ï¿½ï¿½leftÖµ

	var img_num = imgages_number;//ï¿½ï¿½Í¼Æ¬ï¿½ï¿½

	var img_width = 951; //Ã¿ï¿½ï¿½ï¿½Æ¶ï¿½ï¿½ï¿½È£ï¿½ï¿½ï¿½Í¼Æ¬ï¿½ï¿½ï¿½

	var total_long = -(img_width*(img_num-1)-begin_left);//img_num*img_width;//ï¿½Ü³ï¿½ï¿½ï¿½

	var slide_img = null;  //setTimeoutï¿½ï¿½ï¿½ï¿½

	var first_img = 0; //0 ï¿½ï¿½Ê¾ï¿½ï¿½ï¿½Çµï¿½Ò»ï¿½ï¿½Í¼Æ¬ï¿½ï¿½1ï¿½ï¿½Ê¾ï¿½ï¿½Ò»ï¿½ï¿½Í¼Æ¬

	var time_s = 5000; //Ã»ï¿½ï¿½Í¼Æ¬ï¿½Ä¼ï¿½ï¿½Ê±ï¿½ï¿?

	//var no_slide = 0; //ï¿½Ç·ñµ½´ï¿½ï¿½ï¿½ï¿½Ò»ï¿½ï¿½Í¼ï¿½?

	var forword_click = 0;  // ï¿½Ç·ï¿½ï¿½ï¿½ï¿½ï¿½Ò»ï¿½ï¿½

	var pre_click = 0;  // ï¿½Ç·ï¿½ï¿½ï¿½Ç°Ò»ï¿½ï¿½

	var slide_time = 700; //Ò»ï¿½ï¿½Í¼Æ¬ï¿½ï¿½ï¿½Ð»ï¿½ï¿½Ù¶ï¿½



	function autoscroll_forward(){

	

		//if(begin_left <=total_long){clearTimeout(slide_img); first_img =0; /*Î´ï¿½ï¿½ï¿½ï¿½ï¿½Ò»ï¿½ï¿½Í¼ï¿½?/begin_left+=img_width;/*ï¿½ï¿½Îªï¿½ï¿½ï¿½ï¿½ï¿½Ò»ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Òªï¿½ï¿½È¥Ò»ï¿½ï¿?/}

		//	  else {

		//		  $("#slide_images").animate({ left:begin_left+"px"},500,function(){ if(forword_click !=1 )begin_left-=img_width; forword_click = 0;});

		//	      //first_img =0;

		//		  slide_img = setTimeout(function(){autoscroll_forward();},time_s);

		//		   first_img =0;//ï¿½ï¿½ï¿½Çµï¿½Ò»ï¿½ï¿½Í¼Æ¬

		//	 }// ï¿½ï¿½ï¿½ï¿½Ñ­ï¿½ï¿½

		if(begin_left <total_long){
			begin_left = b_left;
		}

		$("#slide_images").animate({
			left:begin_left+"px"
			},slide_time,function(){
			if(forword_click !=1 )begin_left-=img_width;
			forword_click = 0;
		});

		//first_img =0;

		slide_img = setTimeout(function(){
			autoscroll_forward();
		},time_s);

		first_img =0;//ï¿½ï¿½ï¿½Çµï¿½Ò»ï¿½ï¿½Í¼Æ¬

	}

	function autoscroll_back(){

		if(begin_left >b_left){
			first_img=1;/*ï¿½Ñµï¿½ï¿½ï¿½ï¿½Ò»ï¿½ï¿½Í¼ï¿½?/
			begin_left-=img_width;/*ï¿½ï¿½Îªï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ò»ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Òªï¿½ï¿½ï¿½ï¿½Ò»ï¿½ï¿½*/
		}

		else {

			$("#slide_images").animate({
				left:begin_left+"px"
				},slide_time,function(){});

			slide_img = setTimeout(function(){
				autoscroll_forward();
			},time_s);

		}
	}

	slide_img = setTimeout(function(){
		autoscroll_forward();
	},time_s); //ï¿½Ô¶ï¿½ï¿½ï¿½ï¿½ï¿½

	$('.arrow_forward').bind('click', function() {

		clearTimeout(slide_img);

		forword_click = 1; //

		if(begin_left >=total_long){

			begin_left-=img_width;

			autoscroll_forward();

		}

	

	});

	$('.arrow_back').bind('click', function() {

		clearTimeout(slide_img);

		if(first_img !=1){
			begin_left+=img_width;
			autoscroll_back();
		}



	});

 

	//*************************	
});

	
