$(function(){
   // play clips
        var tm = null;
        $('.clip').hover(
            function(){
              var img = $(this).find('img');
              tm = setInterval(function(){
                 var n = /_(.{2})\.[^.]+$/g.exec(img.attr('src'));
                 if (typeof n == 'object') {
                    n = parseInt(n[1],10);
                    n = n >= 10 ? 1 : ++n;
                    n = n == 10 ? '10' : ('0' + n);
                    img.attr('src', img.attr('src').replace(/_(.{2})\.([^.]+)$/, '_'+n+'.$2'));
                 }
                },600);
            },
            function(){
                !tm || clearInterval(tm);
            }
        );
});

<!--

function element(id){
	return document.getElementById ? document.getElementById(id) : document.all[id];
}

function refreshCams() {
	xajax_refreshcams();
	setTimeout('refreshcams()', 60000);
}

var Checked_image='images/default/high/checkbox_on.png';
var Unchecked_image='images/default/high/checkbox_off.png';

function ShowCheck(obj){

	if(obj.className=='uncheck')
	{
		obj.className='check';
		obj.src=Checked_image;
	}
	else
	{
		obj.className='uncheck';
		obj.src=Unchecked_image;
	}
	return true;
/*obj.src=(obj.src==Checked_image?Unchecked_image:Checked_image);*/
}

function maxWindow(url, name, width, height) {
  features = 'scrollbars=1,resizable=1,menubar=0,toolbar=0,location=0,status=0,top=0,left=0,screenX=0,screenY=0,';

  if (window.screen) {
    aw = screen.availWidth;
    ah = screen.availHeight;
    features = features+'width='+(aw-20)+',height='+(ah-38);
  }
  else {
    features = features+'width='+width+',height='+height;
  }
  window.open(url, name, features);
}
  
function popupWindow(url, w, h) {
  var middleLeft = 400 - w;
  var middleTop = 10;
	        
  if (window.screen) {
    middleLeft = (screen.availWidth / 2) - (w / 2);
  }
			          
  window.open(url, '', 'scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,status=0,top='+middleTop+',left='+middleLeft+',width='+w+',height='+h);
}
  
function openNewWindow(URLtoOpen, windowName, windowFeatures) { 
  newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}

function addBookmark(title,url) {
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
	return true;
	}
}

function checkItem(id)
{
	if(element(id).className == 'actlink')
	{
		
		element(id).className = 'unactlink';
		
		//element(id).style.fontWeight = 'normal';
		//element(id).style.color = '#000000';
	}
	else
	{
		element(id).className = 'actlink';
		
		//element(id).style.fontWeight = 'bold';
		//element(id).style.color = '#0ea8d4';
	}
	
	xajax_filter(id, '1');
}


/**
*   Video preview
**/
function startPlayer( videoSrc, image, width, height, skin )
{
    // Config
    var root_player_path = "";
    var defaultWidth  = 520;
    var defaultHeight = 360;
    var defaultSkin   = 'snel.swf';

    // Init
    width  = typeof(width)=='undefined' ? defaultWidth : width;
    height = typeof(height)=='undefined' ? defaultHeight : height;
    skin =   typeof(skin)=='undefined' ? defaultSkin : skin;
    image =  typeof(image)=='undefined' ? '' : image;

    swfobject.embedSWF(
        root_player_path + 'player.swf',
        'videoplayer',
        width,
        height,
        '9.0.0',
        null,
        {
            // Flashvars
            skin: root_player_path + skin,
            file: videoSrc,
            image: image,
            autostart: 'false',
            duration: -1
        },
        {
            //Params
            allowfullscreen: 'true',
            allowscriptaccess: 'always'
        },
        {
            id:'player',
            name:'player'
        }
    );
}


var img_cache = new Object();

function parse_images() {
	if (document.getElementById) {
		var ar = document.getElementsByTagName('img');
		for( var x = 0; ar[x]; x++ ) {
			var im = ar[x];
			if(im.getAttribute) {
				im.hoversrc = im.getAttribute('hoversrc');
			}
			if(im.hoversrc) {
				im.rootsrc = im.src;
				im.onmouseout = function () {
					this.className = '';
					this.src = this.rootsrc;
				}
				im.onmouseover = function () {
					this.className = this.hoversrc;
				}
			}
		}
	}
}

function OpenBlock() {
	document.getElementById('fo').style.display = 'block';
	document.getElementById('fc').style.display = 'none';
}
function CloseBlock() {
	document.getElementById('fo').style.display = 'none';
	document.getElementById('fc').style.display = 'block';
}
//-->

<!--
if (top.frames.length != 0)
{
top.location.href = "http://www.pornocams.nl";
}
//-->
