﻿    $(document).ready(function() {
            $('#slideshow1').cycle({
	            speed:    800,
	            timeout:  2500,
	            clip:     'fade',
	            before:   function(c,n,o) {$(o.caption).html(o.currFx);},
	            caption:  '#caption1'
            });
            $('#slideshow2').cycle({
	            speed:    800,
	            timeout:  2500,
	            clip:     'fade',
	            before:   function(c,n,o) {$(o.caption).html(o.currFx);},
	            caption:  '#caption1'
            });
            $('#thoughtdiv').cycle({ 
                fx:     'blindZ', 
                speed:  300,
                prev:   '#prev1', 
                next:   '#next1', 
//                after:   onAfter, 
                nowrap:  1, 
                timeout: 0 
            });
            $('#testimonialdiv').cycle({ 
                 fx:     'blindZ', 
                timeout: 20000, 
                speed:   500 
            });
            $(function() {
                $("#1").lavaLamp({
                    fx: "backout",
                    speed: 700,
                    click: function(event, menuItem) {
                        return true;
                    }
                });
            });
        });
        function onAfter(curr, next, opts) {
            var index = opts.currSlide;
            $('#prev1')[index == 0 ? 'hide' : 'show']();
            $('#next1')[index == opts.slideCount - 1 ? 'hide' : 'show']();
        }

        var count=1;
        var desc=[];
        desc[1]="If you are with a person who doesn’t bring out the best in you; you are not with the right person.";
        desc[2]="\"Conquer yourself, understand your emotions, build your character and you will be on the road to excellence.\"";
        desc[3]="\"The key to a better life: Complain less, appreciate more. Whine less, laugh more. Talk less, listen more. Want less, give more. Hate less, love more. Scold less, praise more. Fear less, hope more.\"";
        desc[4]="\"All successful people are dreamers; but not all dreamers are successful.\"";
        desc[5]="\"People are not poor because they have less money, but because they do not laugh  much.\"";
        desc[6]="\"Always listen to your elder's advice, not because they are always right, but because they have more experience at being wrong.\"";
        desc[7]="A life spent making mistakes is not only more honorable but more useful than a life spent doing nothing.";
        desc[8]="Life just is. You have to flow with it. Give yourself to the moment.  Let it happen.";
        desc[9]="Live now. Make now always the most precious time. Now will never come again.";         
        desc[10]="\"Challenges are 'tough' to those who never face them but 'easy' to those who accept them.\"";         
        desc[11]="\"There will always be tomorrow, but you have to live today.\"";         
        function descSrc() {
          if (count <= 1)
                count = 12;
          if (count > 1 ) 
          {
            count--;
            document.getElementById("thoughtdiv").innerHTML=desc[count];
          } 
        }
        function incSrc() {
          if (count >= 11)
                count = 0;
          if (count<11) 
          {
            count++;
            document.getElementById("thoughtdiv").innerHTML=desc[count];
          } 
        }
        var count1=1;
        var desc1=[];
        desc1[1]="../IMG/diamond.jpg";
        desc1[2]="../IMG/trauma.jpg";
        desc1[3]="../IMG/data.jpg";
        desc1[4]="../IMG/maths.jpg";
        desc1[5]="../IMG/netonclick.jpg";
        function descSrc1() {
          if (count1 <= 1)
                count1 = 6;
          if (count1 > 1 ) 
          {
            count1--;
            document.getElementById("clientimg").src=desc1[count1];
          } 
        }
        function incSrc1() {
          if (count1 >= 5)
                count1 = 0;
          if (count1<5) 
          {
            count1++;
            document.getElementById("clientimg").src=desc1[count1];
          } 
        }
        function taLimit(taObj,maxL) {
	        if (taObj.value.length==maxL) return false;
	        return true;
        }
        function taCount(taObj,Cnt,maxL) { 
	        objCnt=createObject(Cnt);
	        objVal=taObj.value;
	        if (objVal.length>maxL) objVal=objVal.substring(0,maxL);
	        if (objCnt) objCnt.innerText=maxL-objVal.length;
	        return true;
        }
        function createObject(objId) {
	        if (document.getElementById) return document.getElementById(objId);
	        else if (document.layers) return eval("document." + objId);
	        else if (document.all) return eval("document.all." + objId);
	        else return eval("document." + objId);
        }

