

$(document).ready(function(){	
	/*	
	$("#leftarea li").fadeTo("fast", 0.6); // This sets the opacity of thumbs to fade down to 60% on page load
	//$("#leftarea h2").fadeTo("fast", 0.6); // This sets the opacity of thumbs to fade down to 60% on page load
	$('.current_page_item').fadeTo("fast", 1);
	$('.current-cat').fadeTo("fast", 1);
	
	$("#leftarea li").hover(function(){
		$(this).stop().fadeTo("slow", 1.0); // This should set the opacity to 100% on hover
		//$('#leftarea h2').fadeTo("fast", 1);
	$('.current_page_item').fadeTo("fast", 1);
	$('.current-cat').fadeTo("fast", 1);
	},function(){
		$(this).stop().fadeTo("fast", 0.6); // This should set the opacity back to 60% on mouseout
	$('.current_page_item').fadeTo("fast", 1);
	//$('#leftarea h2').fadeTo("fast", 0.6);
	$('.current-cat').fadeTo("fast", 0.6);
	});*/
	
	// Hover emulation for IE 6.
  	if ($.browser.msie && parseInt($.browser.version) == 6) {
   		$('#navigation li').hover(function() {
      		$(this).addClass('ieHover');
    	}, function() {
      		$(this).removeClass('ieHover');
    	});	 
	
	
	
	
	
   
   		//DD_belatedPNG.fix('.png_bg');

	
	
	}
	 
	 

	 
	 
	 
	 
	 
	$('#searchform  button').hover(function() {
		$(this).css("cursor","pointer");
    }, function() {
		$(this).css("cursor","auto");
    });
	 
	$('.template').hover(function() {
		$(this).css("cursor","pointer");
		$(this).click(function() {
			window.location=$(this).find("a").attr("href");return false;
		});
    }, function() {
		$(this).css("cursor","auto");
    });
	 
	$('.applications').hover(function() {
		$(this).css({"cursor":"pointer"});
		$(this).click(function() {
			window.location=$(this).find("a").attr("href");return false;
		});
    }, function() {
		$(this).css("cursor","auto");
    });
	 
	$('.services').hover(function() {
		$(this).css("cursor","pointer");
		$(this).click(function() {
			window.location=$(this).find("a").attr("href");return false;
		});
    }, function() {
		$(this).css("cursor","auto");
    });
	
	
	$('a[@rel*="external"]').click(function(){
		window.open(this.href);
		return false;
	});
	
	$('#twitterlatest a').click(function(){
		window.open(this.href);
		return false;
	});
	
	
	$('.boxBody div.show').slideDown(500);
  //Get all the LI from the #tabMenu UL
  $('#tabMenu > li').click(function(){
    //perform the actions when it's not selected
    if (!$(this).hasClass('selected')) {  
      //remove the selected class from all LI    
      $('#tabMenu > li').removeClass('selected');
      //Reassign the LI
      $(this).addClass('selected');
      //Hide all the DIV in .boxBody
      $('.boxBody div').slideUp(500);
      //Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
      $('.boxBody div:eq(' + $('#tabMenu > li').index(this) + ')').slideDown(500);
    }
  }).mouseover(function() {
    //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
    $(this).addClass('mouseover');
    $(this).removeClass('mouseout');
	$(this).css({cursor: 'pointer'});
  }).mouseout(function() {
    //Add and remove class
    $(this).addClass('mouseout');
    $(this).removeClass('mouseover'); 
	$(this).css({cursor: 'auto'});   
  });

  //Mouseover with animate Effect for Category menu list
  $('.boxBody #category li').click(function(){
    //Get the Anchor tag href under the LI
    window.location = $(this).children().attr('href');
  }).mouseover(function() {
    //Change background color and animate the padding
    $(this).css('background','#000');
    $(this).children().animate({paddingLeft:"20px"}, {queue:false, duration:300});
  }).mouseout(function() {
    //Change background color and animate the padding
    $(this).css('background','');
    $(this).children().animate({paddingLeft:"0"}, {queue:false, duration:300});
  });  
	
  //Mouseover effect for Posts, Comments, Famous Posts and Random Posts menu list.
  $('#.boxBody li').click(function(){
    window.location = $(this).children().attr('href');
  }).mouseover(function() {
    $(this).css('background','#000');
  }).mouseout(function() {
    $(this).css('background','');
  });
	
	
	
	if($("#twitter").length > 0){
	$("#twitter").getTwitter({
		userName: "webegg",
		numTweets: 1,
		loaderText: "Loading tweets...",
		slideIn: true,
		showHeading: false,
		headingText: "Follow me on Twitter",
		showProfileLink: true
	});
	}
	
	
	
    $("#myController").jFlow({
        slides: "#slides",  // the div where all your sliding divs are nested in
        controller: ".jFlowControl", // must be class, use . sign
        slideWrapper : "#jFlowSlide", // must be id, use # sign
        selectedWrapper: "jFlowSelected",  // just pure text, no sign
        width: "800px",  // this is the width for the content-slider
        height: "130px",  // this is the height for the content-slider
        duration: 400,  // time in miliseconds to transition one slide
        prev: ".jFlowPrev", // must be class, use . sign
        next: ".jFlowNext" // must be class, use . sign
    });
    
	$('#topintro').cycle({
    fx:    'scrollRight',
    sync:   0,
    timeout: 12000,
	pause: 1
});
	$('.intro').cycle({
    fx:    'scrollRight',
    sync:   0,
    timeout: 12000,
	pause: 1
});
	$('.quick').cycle({
    fx:    'scrollLeft',
    sync:   0,
    timeout: 1000,
	pause: 1
});
	
	
	if($("form .checkbox").length > 0){
	$('form .checkbox').jqTransform();
	}
	
	
$('#exampledom').css('cursor','pointer');

$('#exampledom').css('color','#999999');


$("#exampledom").focus(function(){
		if ($(this).val()=="www.exampledomain.co.uk"){$(this).val("");$(this).css('color','#000000');}
	});

$("#exampledom").blur(function(){
		if ($(this).val()==""){$(this).val("www.exampledomain.co.uk");$(this).css('color','#999999');}
	});

$('a.email').each(function(){
			e = this.rel.replace('[at]','@');
			this.href = 'mailto:' + e;
			$(this).text(e);
		});


pageTracker._setVar('visited');
});


Cufon.replace('#rightarea h1');
Cufon.replace('.rightarea h1');
Cufon.replace('#leftarea h2');
//Cufon.replace('#rightarea h3');
Cufon.replace('.content .slide-wrapper p',{hover:true,hoverables:{strong:true,em:true,a:true}});
Cufon.replace('.content #myController span',{hover:true,hoverables:{strong:true,em:true,a:true}});
Cufon.replace('.content .introbox p',{hover:true,hoverables:{strong:true,em:true,a:true}});
Cufon.replace('.content .intro p',{hover:true,hoverables:{strong:true,em:true,a:true}});
Cufon.replace('.content .quick p',{hover:true,hoverables:{strong:true,em:true,a:true}});
//Cufon.replace('#navigation li a');
Cufon.replace('#twitter h2');
Cufon.replace('h2.pagetitle');
Cufon.replace('.pagerightarea .maincontent h2');
//Cufon.replace('#navigation li a');




