// Global IMGD functions for desktop
$(document).ready(function()
			{		
$(document).keydown(function (e) {
//N
if (e.keyCode == 39 || e.charCode == 39 || e.which == 39 ){
var next_link = $(".nav-next a").attr("href");
if(next_link){
window.location = next_link;
}
}
//P
if (e.keyCode == 37 || e.charCode == 37 || e.which == 37){
var prev_link = $("a[rel=prev]").attr("href");
if(prev_link){
window.location = prev_link;
}
}
});	
$('#viewmore, p.foliodesc, ul.ffooterml, ul.foliolist, ul.ffootermr, .floopentryt').hide();
$('img.folio').removeClass('0ver');				  
$('a.foliothumb').fadeTo("fast", 0);
$('#comform').hide();
$('ul.ffooterml').hide();
$('ul.ffootermr').hide();
$('.floopentryt').hide();					
$("#bbm").click(function()
{
$('ul.ffooterml').toggle();return false;					
});		
$("a#comlink").click(function()
{
$('#comform').toggle();return false;
});
$("#bbp").click(function()
{
$('ul.ffootermr').toggle();return false;
});
$("#moreinfo").click(function()
				{
//$('p.foliodesc').slideToggle();return false;
$('p.foliodesc').toggle();return false;
}); 
$( "img.folio").each(
function( intIndex ){
$( this ).bind (
"mouseover",
function(){
$(this).addClass('over');
});
$( this ).bind (
"mouseout",
function(){
$(this).removeClass('over');
}); 
});		
$( "a.foliothumb").each(
function( intIndex ){
$( this ).bind (
"mouseover",
function(){
$(this).fadeTo("fast", 1);
});
$( this ).bind (
"mouseout",
function(){
$(this).fadeTo("fast", 0);
}); 
});
});
