 var headerTitle = [];
 var headerTPos = [];
 var headerLPos = [];
 var x = 0;





        function setTitle(arg) {
             var i = arg;
            $('h2.mainImageTag').html(headerTitle[i]);

            if(headerLPos[i] == '' || headerLPos[i] == null) {
                 $('h2.mainImageTag').css('left','37px');
            } else {
                 $('h2.mainImageTag').css('left',headerLPos[i]+'px');
            }
           
             if(headerTPos[i] == '' || headerTPos[i] == null) {
                 $('h2.mainImageTag').css('top','175px');
            } else {
                 $('h2.mainImageTag').css('top',headerTPos[i]+'px');
            }
        }

var firstRun = true;

       function onAfter(curr, next, opts) {
           var slide = opts.currSlide;
           setTitle(slide);
firstRun = false;
           $('h2.mainImageTag').animate({filter: 'alpha(opacity=100)',opacity: '1'},400);
       }

       function onBefore() {
       if(firstRun == false) {
           $('h2.mainImageTag').animate({filter: 'alpha(opacity=0)',opacity: '0'},800);
        }
}
      

 
	$(document).ready(function(){
		//$.noConflict();
		
             $('.mainSlider').cycle({ 
                 fx:     'fade', 
                 speed: 2000,
                 timeout: 10500,
                 delay: -3000,
                 after: onAfter,
                 before: onBefore
             });

$(".example7").colorbox({width:"420", height:"420", iframe:true});

            $('.text-block1').cycle({ 
                 fx: 'scrollUp', 
                 timeout: 8500,
                 speed: 3000,
                 delay: -2000,
                 easeIn:  'easeInOutExpo',
                 easeOut:  'easeInOutExpo' 
             });

             $('.column').hover(
		  function() {
			$('.overlay', this).animate({filter: 'alpha(opacity=90)',opacity: '0.9'},400);
			$('.text-holder', this).animate({filter: 'alpha(opacity=100)',opacity: '1'},400);
                        $('.text-more', this).animate({filter: 'alpha(opacity=100)',opacity: '1'},400);
                        $('.more', this).animate({filter: 'alpha(opacity=100)',opacity: '1'},400);
			$('.caption', this).animate({top: '10'},400);
		},
		  function() {
			$('.overlay', this).animate({filter: 'alpha(opacity=0)',opacity: '0'},400);
			$('.text-holder', this).animate({filter: 'alpha(opacity=0)',opacity:'0'},300);
                        $('.text-more', this).animate({filter: 'alpha(opacity=0)',opacity:'0'},300);
                        $('.more', this).animate({filter: 'alpha(opacity=0)',opacity:'0'},300);
			$('.caption', this).animate({top: '205'},300);
		});

$('.text-more').css('filter','alpha(opacity=0)');
$('.text-more').css('opacity','0');



      });

setTitle(0);
