 $(function () {
        if ($.browser.msie && $.browser.version < 7) return;
        
        $('#navigation li')
            .removeClass('highlight')
            .find('a')
            .append('<span class="hover" />').each(function () {
                    var $span = $('> span.hover', this).css('opacity', 0);
                    $(this).hover(function () {
                        // on hover
                        $span.stop().fadeTo(500, 1);
                    }, function () {
                        // off hover
                        $span.stop().fadeTo(500, 0);
                    });
                });
                
    });
 
 
//jQuery(window).bind("load", function() {
	//		jQuery("div#slider1").codaSlider()
			// jQuery("div#slider2").codaSlider()
			// etc, etc. Beware of cross-linking difficulties if using multiple sliders on one page.
//		});



jQuery(document).ready(function() {
								
		
		

  $(".linkslist a, .listwithleftarrow a").hover(
						   
	   function () {
      $(this).animate({paddingLeft: "15px"}, {queue:false, duration:300});
						   },
		function () {
      $(this).animate({paddingLeft: "0px"}, {queue:false, duration:300});
						   }				   
						   
    );
  
  

  

	$(".portfolio  li:nth-child(6n), .portfolio  li:nth-child(3n)").css("paddingRight", "0");
	
	$(".portfolio  li:nth-child(5n)").css("marginRight", "0");
	//$(".homeportfolio  li:nth-child(4n) a").css("marginRight", "0");
	//$(".homeportfolio  li:nth-child(7n) a").css("marginRight", "0");
	//$(".homeportfolio  li:nth-child(5n) a,.homeportfolio  li:nth-child(6n) a,.homeportfolio  li:nth-child(7n) a").css("marginTop", "15px");
	
	
	
	$('#slides').cycle({ 
    fx:     'scrollHorz', 
    speed:  'slow', 
    timeout: 0, 
    next:   '#next', 
    prev:   '#prev' ,
	 pager:  '#pager',
	 pagerAnchorBuilder: pagerFactory


	});
	
    function pagerFactory(idx, slide) {
        var s = idx > 2 ? ' style=""' : '';
        return '<li'+s+'><a href="#">'+(idx+1)+'</a></li>';
    };



$("#default").show("slow");




var $mycurrentdiv ; 


$(".portfolio a").click(function(){
								 
								 $(".portfolio a").css("border", "8px solid #3F3F3F");
								 $(this).css("border", "8px solid #48a7e2");
								 
								 
								if ($mycurrentdiv) { $("#thumbviewer #"+($mycurrentdiv)).hide("slow");}
								 
								 $mycurrentdiv = $(this).attr("name");
								 
								 if ($("#default").is(":visible")) {
									$("#default").hide("slow");
									$("#thumbviewer #"+($mycurrentdiv)).show("slow");
									
								  } else {
									$("#thumbviewer #"+($mycurrentdiv)).show("slow");
								  }

								 //if (mycurrentdiv=='1'){$("#default").fadeOut("slow")} else {$("#thumbviewer div").fadeIn("slow")};
								 	
									

	 
     								 
					
						   

		
      
    

	
});	
});





   
	

	







       
			




				



				