// JavaScript Document

$.fn.homeAnimate = function(){
	
	//var statusNow;
	
	
	$("#bannerBlog ul li").mouseover(function(e) {
		$(this).animate({opacity : '1'},300);	
		//$(this).css({backgroundPosition : 'bottom'});
    })
	
	$("#bannerBlog ul li").mouseout(function(e) {
        $(this).returnOpacity();
    });
	
	
	// Title image Thumb //
	$("#horizContainer ul li").mouseover(function() {
        //alert("ll");
		//$(this).css({backgroundPosition : 'bottom'});
		$(this).find("h2").animate({ 'font-size' : '14' , 'color' : '#3a3a3a'},{duration : 200 , easing: "swing"},"");
	
    });
	
	$("#horizContainer ul li").mouseleave(function() {
        //alert("ll");
		$(this).css({backgroundPosition : 'top'});
		$(this).find("h2").animate({ "font-size" : '13' , 'color' : '#5e5e5e'},{duration : 200 , easing: "easeOutBack"},"");
    });

	
	
	
	$("ul#newstList li").click(function(e) {
		/*$("ul#newstList li").css({'background-position' : 'top left','color' : '#5e5e5e'});
        $(this).css({'background-position' : 'bottom left', 'color' : '#e97602'});*/
		$("ul#newstList li").css({'background-position' : 'top left','color' : '#5e5e5e'});
        $(this).css({'background-position' : 'bottom left', 'color' : '#e97602'});
    });
	
	
	
	$("ul#newstList li a").click(function(e) {
		$("ul#newstList li a").css({'background-position' : 'top left','color' : '#5e5e5e'});
        $(this).css({'background-position' : 'bottom left', 'color' : '#e97602'});
    });
	
	
	
	$("ul#newstList2 li").click(function(e) {
		/*$("ul#newstList li").css({'background-position' : 'top left','color' : '#5e5e5e'});
        $(this).css({'background-position' : 'bottom left', 'color' : '#e97602'});*/
		$("ul#newstList2 li").css({'background-position' : 'top left','color' : '#5e5e5e'});
        $(this).css({'background-position' : 'bottom left', 'color' : '#e97602'});
    });
	
	
	
	$("ul#newstList2 li a").click(function(e) {
		$("ul#newstList2 li a").css({'background-position' : 'top left','color' : '#5e5e5e'});
        $(this).css({'background-position' : 'bottom left', 'color' : '#e97602'});
    });
	
	
	



	/// ktype ///
	$("#printDiv3 ul li div").hover(function(){
		//alert("df");
		$(this).find('img').animate({right: "-4"} ,{ duration : 200, easing: "easeOutBack"});
		$(this).find('img').attr("src", "images/leftArOrang.png");
		$(this).animate({ marginLeft : '+10'},200);
		});
		
		$("#printDiv3 ul li div").mouseout(function(){
		//alert("df");
		$(this).find('img').animate({right: "+4"},{ duration : 200, easing: "swing"});	
		$(this).find('img').attr("src", "images/leftArblack.png");
		$(this).animate({ marginLeft : '3'},200);
	
		});
	/// end ktype ///
	
	/*$("#rightArrow").mouseover(function() {
        $("#centerSlide ul").animate({
			
			left : '-=150'
			},400)
    });*/
	
	
	/*var numm = $("#centerSlide li").length;
	alert(numm);*/
	$("#closeIco").click(function(e) {
		//alert("click");
		$("div.mBox").animate({ top : '+=100', opacity: '0'},400);
        $("div.mBox").fadeOut();
		$("#prBoxc").animate({ top : '+=100', opacity: '0'},400);
        $("#prBoxc").fadeOut();
    });
	$("#closeIco2").click(function(e) {
		//alert("click");
		$("#prBoxc").animate({ top : '+=100', opacity: '0'},400);
        $("#prBoxc").fadeOut();
    });
	
	$("#closeIco4").click(function(e) {
		//alert("click");
		$("#socialNews").animate({ top : '+=100', opacity: '0'},400);
        $("#socialNews").fadeOut();
    });
	
	
	$("#closeIco3").click(function(e) {
		//alert("click");
		$("#ktypeBox").animate({ top : '+=100', opacity: '0'},400);
        $("#ktypeBox").fadeOut();
    });
	
	$("#closeIco5").click(function(e) {
		//alert("click");
		$("#videoBox").animate({ top : '+=100', opacity: '0'},400);
        $("#videoBox").fadeOut();
    });
	
	/////////////////// li list ///////
	
	$("li#whatsNew").click(function(e) {
		$("#prBoxc").hide();
		$("#ktypeBox").hide();
		$("#socialNews").hide();
		$("#videoBox").hide();
		$("#hideDiv").fadeIn(100);	
	
		//$(this).attr('title','show');
		//alert($(this).attr("title"));
        
		$("#hideDiv").animate({
			
			opacity : '1',
			top: '-280'
		
			},{duration : 500, easing:"easeOutBack"});
	
    });
	
	$("li#prNews").click(function(e){
		$("#hideDiv").hide();
		$("#ktypeBox").hide();
		$("#socialNews").hide();
		$("#videoBox").hide();
		$("#prBoxc").fadeIn(100);
		$("#prBoxc").animate({
			
			opacity : '1',
			top: '-280'
		
			},{duration : 500, easing:"easeOutBack"});
	
		});
		
		
		$("li#kType").click(function(e){
		$("#hideDiv").hide();
		$("#prBoxc").hide();
		$("#socialNews").hide();
		$("#videoBox").hide();
		$("#ktypeBox").fadeIn(100);
		$("#ktypeBox").animate({
			
			opacity : '1',
			top: '-280'
		
			},{duration : 500, easing:"easeOutBack"});
	
		});
		
		
			$("li#forSocial").click(function(e){
		$("#hideDiv").hide();
		$("#prBoxc").hide();
		$("#ktypeBox").hide();
		$("#videoBox").hide();
		$("#socialNews").fadeIn(100);
		$("#socialNews").animate({
			
			opacity : '1',
			top: '-280'
		
			},{duration : 500, easing:"easeOutBack"});
	
		});
		
		
		
				$("li#videoBtn").click(function(e){
		$("#hideDiv").hide();
		$("#prBoxc").hide();
		$("#ktypeBox").hide();
		$("#socialNews").hide();
		$("#videoBox").fadeIn(100);
		$("#videoBox").animate({
			
			opacity : '1',
			top: '-280'
		
			},{duration : 500, easing:"easeOutBack"});
	
		});
	////////////////////////////////
	
};


$.fn.returnOpacity = function(){
	
	$(this).animate({opacity : '1'},300);
	$(this).css({backgroundPosition : 'top'});
	//alert("d");
	
	};
	

